Hi !
I'm tried to use 2.2 version of jackrabbit and got some strange behaviour:
After logging out jcr session i see following logs:
2010-12-15 13:30:08.054 INFO [http-0.0.0.0-8080-4]
TransientRepository.java:423 Session closed
2010-12-15 13:30:08.057 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1075 Shutting down repository...
2010-12-15 13:30:08.064 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:759 Index closed:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/repository/index
2010-12-15 13:30:08.067 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:2143 shutting down workspace 'default'...
2010-12-15 13:30:08.069 INFO [http-0.0.0.0-8080-4]
ObservationDispatcher.java:121 Notification of EventListeners stopped.
2010-12-15 13:30:08.083 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:759 Index closed:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/default/index
2010-12-15 13:30:08.098 INFO [http-0.0.0.0-8080-4]
DerbyConnectionHelper.java:94 Database
'/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/default/db'
shutdown.
2010-12-15 13:30:08.099 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:2150 workspace 'default' has been shutdown
2010-12-15 13:30:08.100 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:2143 shutting down workspace 'security'...
2010-12-15 13:30:08.102 INFO [http-0.0.0.0-8080-4]
ObservationDispatcher.java:121 Notification of EventListeners stopped.
2010-12-15 13:30:08.106 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:759 Index closed:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/security/index
2010-12-15 13:30:08.119 INFO [http-0.0.0.0-8080-4]
DerbyConnectionHelper.java:94 Database
'/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/security/db'
shutdown.
2010-12-15 13:30:08.120 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:2150 workspace 'security' has been shutdown
2010-12-15 13:30:08.136 INFO [http-0.0.0.0-8080-4]
DerbyConnectionHelper.java:94 Database
'/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/version/db'
shutdown.
2010-12-15 13:30:08.140 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1170 Repository has been shutdown
2010-12-15 13:30:08.142 INFO [http-0.0.0.0-8080-4]
TransientRepository.java:290 Transient repository shut down
2010-12-15 13:30:08.173 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:278 Starting repository...
2010-12-15 13:30:08.174 INFO [http-0.0.0.0-8080-4]
LocalFileSystem.java:164 LocalFileSystem initialized at path
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/repository
2010-12-15 13:30:08.224 INFO [http-0.0.0.0-8080-4]
LocalFileSystem.java:164 LocalFileSystem initialized at path
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/version
2010-12-15 13:30:08.420 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1991 initializing workspace 'default'...
2010-12-15 13:30:08.421 INFO [http-0.0.0.0-8080-4]
LocalFileSystem.java:164 LocalFileSystem initialized at path
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/default
2010-12-15 13:30:08.610 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:552 Index initialized:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/repository/index
Version: 3
2010-12-15 13:30:08.687 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:552 Index initialized:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/default/index
Version: 3
2010-12-15 13:30:08.688 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1995 workspace 'default' initialized
2010-12-15 13:30:08.689 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:466 SecurityManager = class
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager
2010-12-15 13:30:08.690 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1991 initializing workspace 'security'...
2010-12-15 13:30:08.690 INFO [http-0.0.0.0-8080-4]
LocalFileSystem.java:164 LocalFileSystem initialized at path
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/security
2010-12-15 13:30:08.833 INFO [http-0.0.0.0-8080-4]
SearchIndex.java:552 Index initialized:
/home/max/work/jboss4/server/default/data/detachment-data/jackrabbit/workspaces/security/index
Version: 3
2010-12-15 13:30:08.835 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:1995 workspace 'security' initialized
2010-12-15 13:30:08.835 INFO [http-0.0.0.0-8080-4]
SimpleSecurityManager.java:137 init: using Repository LoginModule
configuration for Jackrabbit
2010-12-15 13:30:08.836 INFO [http-0.0.0.0-8080-4]
RepositoryImpl.java:380 Repository started (663ms)
2010-12-15 13:30:08.836 INFO [http-0.0.0.0-8080-4]
TransientRepository.java:280 Transient repository initialized
2010-12-15 13:30:08.838 INFO [http-0.0.0.0-8080-4]
TransientRepository.java:384 Session opened
My enviroment is:
gentoo linux
Java(TM) SE Runtime Environment (build 1.6.0_20-b02) - Java
HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
jboss 4.2.3
jackrabbit-jca 2.2.0
Repository retrieved using this code:
repository = (Repository) new
InitialContext().lookup("java:jcr/local");
and stored is application context
New jcr session created for each request (when needed) :
boolean live = false;
if (session != null) {
try {
live = session.isLive();
} catch (IllegalStateException e) {
}
}
if (!live) {
debug("get jackrabbit session...");
String userId = "admin";
session = repository.login(new SimpleCredentials(userId,
"password".toCharArray()));
}
and logged out when request ends
Now it looks like JCR Repository is shut down and initialized again
after every jcr session logout.
datasource xml is:
<connection-factories>
<tx-connection-factory>
<jndi-name>jcr/local</jndi-name>
<xa-transaction/>
<rar-name>jackrabbit-jca-2.2.0.rar</rar-name>
<connection-definition>javax.jcr.Repository</connection-definition>
<config-property name="repositoryURI"
type="java.lang.String">jcr-jackrabbit://jackrabbit</config-property>
<config-property name="bindSessionToTransaction"
type="java.lang.Boolean">true</config-property>
<config-property name="homeDir" type="java.lang.String">[my path
to jackrabbit repo directory here]</config-property>
</tx-connection-factory>
</connection-factories>