Hi, we've encountered a serious problem with jackrabbit - keeping a database connection for each active workspace. A jira entry already exists [1] and it's targetted for 1.5, but so far there hasn't seem to be much activity.
I'm willing to provide a patch that might be of some help to you, but first I'd like to have some things clarified of how the thing should work (from user perspective). My idea so far is to have new config section (toplevel, inside <Repository>) that would allow to register data sources Something like <DataSource id="ds1" class="com.mypackage.MyDataSource"> <param name="url" value="jdbc:postgresql:jackrabbittest"/> <param name="user" value="postgres"/> <param name="password" value="postgres"/> </DataSource> Multiple data sources could be defined per repository. Jackrabbit would create and manage data source instances (each class is required to implement DataSource interface). All components that require a SQL connection would have dataSource attribute that would specify the data source instance. i.e. <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> <param name="dataSource" value="ds1"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> <param name="externalBLOBs" value="false"/> </PersistenceManager> Alternatively there might be also a way to register data source per workspace, so the instance would be workspace specific. Though I personally don't see much value in this. It would be great to get any feedback on this. Kind regards, -Matej Knopp [1] https://issues.apache.org/jira/browse/JCR-1456