jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Stör <mar...@frightanic.com>
Subject Re: Replacement for JNDIDatabasePersistenceManager?
Date Thu, 22 Aug 2013 15:07:01 GMT
On 22.08.2013 15:13, Jeroen Reijn wrote:
> The configuration looks like this:
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
>        <param name="driver" value="javax.naming.InitialContext"/>
>        <param name="url" value="java:comp/env/jdbc/repositoryDS"/>

Indeed, thanks a lot!

When I asked the search engine about 
org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager it 
turned up 
and from there I found 

-> "...support a JNDI data source in place of the JDBC driver and 
database URL"

<param name="driver" value="javax.naming.InitialContext"/> works just 
fine but it's certainly an ugly shortcut and everything but intuitive. 
There must be an 'instanceof' is 'isAssignable' somewhere in the source. 
Bingo... oaj.core.util.db.ConnectionFactory.createDataSource():

Class<?> driverClass = getDriverClass(driver);
if (driverClass != null && Context.class.isAssignableFrom(driverClass)) {
} else {
   return getDriverDataSource(driverClass, url, user, password);


Marcel Stör, http://frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

View raw message