Introduce OSAuthentication
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / main / java / org / argeo / jcr / ThreadBoundJcrSessionFactory.java
index 1c33a43dec9a6788831fa92a2e8b83326645438c..d548b6eddaa227a63be3449994e08ba6ad6da326 100644 (file)
@@ -35,13 +35,9 @@ import javax.jcr.SimpleCredentials;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
 
 /** Proxy JCR sessions and attach them to calling threads. */
-public class ThreadBoundJcrSessionFactory implements FactoryBean,
-               InitializingBean, DisposableBean {
+public class ThreadBoundJcrSessionFactory {
        private final static Log log = LogFactory
                        .getLog(ThreadBoundJcrSessionFactory.class);
 
@@ -126,12 +122,12 @@ public class ThreadBoundJcrSessionFactory implements FactoryBean,
                return proxiedSession;
        }
 
-       public void afterPropertiesSet() throws Exception {
+       public void init() throws Exception {
                monitoringThread = new MonitoringThread();
                monitoringThread.start();
        }
 
-       public synchronized void destroy() throws Exception {
+       public synchronized void dispose() throws Exception {
                if (activeSessions.size() == 0)
                        return;