You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Grange, John" <jo...@bluefinger.com> on 2003/08/18 18:52:00 UTC
JNDI ()Datasource connection in Weblogic
We have, finally managed to get the <j2ee/> jndi datasources working under
weblogic. (Cedric, thanks for the help)
The solution was to alter the code
excalibur-datasource-1.1.1.jar:org.apache.avalon.excalibur.datasource.J2eeDa
taSource so that if a jndi connection with comp/env/jdbc prepended fails,
then to try again without this being prepended.
This does not appear to be a very elegant way of doing things (unless
somebody thinks that this behaviour should be included in the
excalibur-datasource codebase, in which case, let me know where to post the
code and I'll do so)
Also, the relevant fragments from the web app documents are (note, the jndi
name appears to have to be the same through all the files):
cocoon.xconf
<j2ee name="reportDataSource">
<dbname>com.lv.jdbc.oracle.ReportsTxDataSource</dbname>
</j2ee>
web.xml
<resource-ref>
<res-ref-name>com.lv.jdbc.oracle.ReportsTxDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA
Systems, Inc.//DTD Web Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<description>
Cocoon App
</description>
<reference-descriptor>
<resource-description>
<res-ref-name>com.lv.jdbc.oracle.ReportsTxDataSource</res-ref-name>
<jndi-name>com.lv.jdbc.oracle.ReportsTxDataSource</jndi-name>
</resource-description>
</reference-descriptor>
</weblogic-web-app>
John Grange
The views expressed in this email/posting are solely those of John Grange
and are neither verified nor supported by BlueFinger Ltd.