You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jason Tesser <ja...@dotmarketing.com> on 2008/01/24 17:32:22 UTC
Maybe Bug with ConnectionFactory and JNDI setup
OK I am trying to use the
<PersistenceManager class="
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager">
<param name="bundleCacheSize" value="8"/>
<param name="consistencyCheck" value="false"/>
<param name="consistencyFix" value="false"/>
<param name="driver" value="javax.naming.InitialContext"/>
<param name="url" value="java:comp/env/jdbc/myPool"/>
<param name="schemaObjectPrefix" value="jr_"/>
<param name="errorHandling" value=""/>
<param name="blockOnConnectionLoss" value="false"/>
</PersistenceManager>
The problem is that it uses
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionFactory.getConnectionwhich
has the following code
// JNDI context
Context context = (Context) d.newInstance();
DataSource ds = (DataSource) context.lookup(url);
return ds.getConnection(user, password);
Which is not supoprted by a basic datasource in Tomcat. You would need to
return ds.getConnection();
I would think JR would want to support this.
My datasource is set up as follows
<!-- POSTGRESQL -->
<Resource name="jdbc/myPool" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver
"
url="jdbc:postgresql://127.0.0.1/jrbranch"
username="postgres" password="xxxxx" maxActive="50" maxIdle="10"
maxWait="-1"
removeAbandoned="true" removeAbandonedTimeout="60"
logAbandoned="true"/>
Is there another way to use this with JNDI or do I need to chnage the
ConnectionFactory's source and recompile :-) ?
--
Jason S. Tesser
Lead Programmer
www.dotmarketing.com
www.dotcms.org
Dotmarketing, Inc.
3059 Grand Avenue
Suite 440
Miami, FL 33133
T: 305.858.1422 x279
F: 786.594.5288
Re: Maybe Bug with ConnectionFactory and JNDI setup
Posted by Thomas Mueller <th...@gmail.com>.
Hi,
This problem is already solved in
http://issues.apache.org/jira/browse/JCR-1305, and committed to the
trunk and 1.4 branch. Unfortunately, it didn't make it in the
Jackrabbit 1.4 release.
Regards,
Thomas