Introduce Jcr singleton, making using Jcr less verbose.
[lgpl/argeo-commons.git] / org.argeo.jcr / src / org / argeo / jcr / JcrUtils.java
index 5bbc207ea3e918eec41aa5536b5c009b1ca89142..331164cf2b442dec485bb7a71ebb0d7a0c50dd65 100644 (file)
@@ -1074,15 +1074,19 @@ public class JcrUtils {
                }
        }
 
-       /** Logs out the session, not throwing any exception, even if it is null. */
+       /**
+        * Logs out the session, not throwing any exception, even if it is null.
+        * {@link Jcr#logout(Session)} should rather be used.
+        */
        public static void logoutQuietly(Session session) {
-               try {
-                       if (session != null)
-                               if (session.isLive())
-                                       session.logout();
-               } catch (Exception e) {
-                       // silent
-               }
+               Jcr.logout(session);
+//             try {
+//                     if (session != null)
+//                             if (session.isLive())
+//                                     session.logout();
+//             } catch (Exception e) {
+//                     // silent
+//             }
        }
 
        /**