Hi
You must use
<resource-ref>
<res-ref-name>jdbc/Mtx</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
in web.xml
and some mapping in weblogic web xml descriptor
For jboss, for example, I use
<resource-ref>
<res-ref-name>jdbc/Mtx</res-ref-name>
<jndi-name>java:/jdbcMtx</jndi-name>
</resource-ref>
in jboss-web.xml
By
----- Original Message -----
From: "Antonio Jean Claude" <[EMAIL PROTECTED]>
To: "Slide Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 4:23 PM
Subject: J2EEStore with Weblogic 8.1
Hello,
I manage to configure JDBC Store script to work with MySQL.
But when I want to switch to use J2EE store, but I get the following
error.
"22 Dec 2003 14:43:10 - org.apache.slide.common.Domain - ERROR - Service
[EMAIL PROTECTED] init
ialization failed : While trying to look up jdbcMtx in java:comp/env.
Service [EMAIL PROTECTED] initialization
failed : While trying to look up jdbcMtx in java:comp
/env."
So I tested my call to JNDI with a piece of code:
- When I call without subcontext, I manage to get a datasource.
Context initCtx = new InitialContext();
DataSource ds = (DataSource)
initCtx.lookup(jndi);
- When I call with subcontext, I manage to get a "name not found"
exception.
Context initCtx = new InitialContext();
Context envCtx = (Context)
initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)
envCtx.lookup(jndi);
What should I do to have a subcontext in Weblogic? I looked at the one
for TC at http://jakarta.apache.org/slide/howto-j2eestore.html, there
was no subcontext defined either.
Thanks for your help
Jean-Claude
--- DATA SOURCE DEFINITION in WEBLOGIC ---
<JDBCConnectionPool DriverName="org.gjt.mm.mysql.Driver"
Name="jdbcMtxPool" Password="{3DES}gcuedhGXQrE="
Properties="user=slideDB" Targets="portalServer"
URL="jdbc:mysql://antonio-jc:3306/slidedb"/>
<JDBCTxDataSource JNDIName="jdbcMtx" Name="jdbcMtx"
PoolName="jdbcMtxPool" Targets="portalServer"/>
--- DEFINITION FOR J2EE ---
<definition>
<store name="j2ee">
<nodestore classname="slidestore.j2ee.J2EEDescriptorsStore">
<parameter name="datasource">jdbcMtx</parameter>
</nodestore>
<securitystore>
<reference store="nodestore"/>
</securitystore>
<lockstore>
<reference store="nodestore"/>
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore"/>
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore"/>
</revisiondescriptorstore>
<contentstore classname="slidestore.j2ee.J2EEContentStore">
<parameter name="datasource">jdbcMtx</parameter>
<parameter name="version">true</parameter>
<parameter name="resetBeforeStarting">false</parameter>
</contentstore>
</store>
<scope match="/" store="j2ee"/>
</definition>
--- DEFINITION FOR JDBC ---
<definition>
<store name="jdbc">
<nodestore
classname="slidestore.reference.JDBCDescriptorsStore">
<parameter
name="driver">org.gjt.mm.mysql.Driver</parameter>
<parameter
name="url">jdbc:mysql://antonio-jc:3306/slidedb</parameter>
<parameter name="user">root</parameter>
<parameter name="password"></parameter>
</nodestore>
<securitystore>
<reference store="nodestore" />
</securitystore>
<lockstore>
<reference store="nodestore" />
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore" />
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore" />
</revisiondescriptorstore>
<contentstore
classname="slidestore.reference.JDBCContentStore">
<parameter
name="driver">org.gjt.mm.mysql.Driver</parameter>
<parameter
name="url">jdbc:mysql://antonio-jc:3306/slidedb</parameter>
<parameter name="user">root</parameter>
<parameter name="password"></parameter>
<parameter name="version">true</parameter>
<parameter name="resetBeforeStarting">false</parameter>
</contentstore>
</store>
<scope match="/" store="jdbc" />
</definition>
Jean-Claude
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]