Improve clean up of thredaed JCR sessions
[lgpl/argeo-commons.git] / org.argeo.server.jcr / src / org / argeo / jcr / ThreadBoundJcrSessionFactory.java
index 193f22c48c99780e72af4c70a7956cab8ed07370..722215701b00f4544f58df0e264e568986349251 100644 (file)
@@ -37,6 +37,7 @@ import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
 
 /** Proxy JCR sessions and attach them to calling threads. */
+@Deprecated
 public abstract class ThreadBoundJcrSessionFactory {
        private final static Log log = LogFactory
                        .getLog(ThreadBoundJcrSessionFactory.class);
@@ -129,9 +130,9 @@ public abstract class ThreadBoundJcrSessionFactory {
                monitoringThread.start();
        }
 
-       public synchronized void dispose() throws Exception {
-               if (activeSessions.size() == 0)
-                       return;
+       public void dispose() throws Exception {
+               // if (activeSessions.size() == 0)
+               // return;
 
                if (log.isTraceEnabled())
                        log.trace("Cleaning up " + activeSessions.size()