import org.argeo.ArgeoException;
/** Proxy JCR sessions and attach them to calling threads. */
-public class ThreadBoundJcrSessionFactory {
+public abstract class ThreadBoundJcrSessionFactory {
private final static Log log = LogFactory
.getLog(ThreadBoundJcrSessionFactory.class);
}
/** Logs in to the repository using various strategies. */
- protected Session login() {
+ protected synchronized Session login() {
if (!isActive())
throw new ArgeoException("Thread bound session factory inactive");
/** Monitors registered thread in order to clean up dead ones. */
private class MonitoringThread extends Thread {
+ public MonitoringThread() {
+ super("ThreadBound JCR Session Monitor");
+ }
+
@Override
public void run() {
while (isActive()) {