Am Mit, 06 Sep 2000 schrieben Sie:
> First, you need a section in jboss.xml that links the EJB resource
> name "CP" to the resource manager name "CP", though it may work correctly
> without that if the defaults are set up right (I haven't tried it).
>       Next, look at the following Minerva example.  You should
> substitute the name you specified in ejb-jar.xml (here CP) for the
> poolName.
> 
> http://www.jboss.org/minerva/minerva.htm#ex13
> 
> Aaron
> 

Hello Aaron,

i've done what you told me, my new settings are now:
[jboss.conf]
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,adabasd.jar" 
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="CP">
<ARG TYPE="java.lang.String" VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
[jboss.jcml]
<mbean name="DefaultDomain:service=XADataSource,name=CP">
<attribute name="URL">jdbc:adabasd://gandalf:7200/MYDB</attribute>
<attribute name="Password">BAR</attribute>
<attribute name="JDBCUser">FOO</attribute>
[ejb-jar.xml]
<resource-ref>
<description>Customer Pro Database</description>
<res-ref-name>CP</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
[boss.xml]
<jboss>
<resource-managers>
<resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
<res-name>CP</res-name>
<res-jndi-name>CP</res-jndi-name>
</resource-manager>
</resource-managers>
</jboss>
----
starting jboss it tells me:
....
[XADataSource] Initializing
[XADataSource] Initialized
...
[Configuration] URL set to jdbc:adabasd://gandalf:7200/MYDB in 
DefaultDomain:service=XADataSource,name=CP
(+ lot of other stuff)
...
[XADataSource] Starting
[XADataSource] XA Connection pool CP bound to xa.CP
[XADataSource] Started
...
and if I call the findByPrimaryKey where I try to get a connection with:
---
Context naming = new InitialContext();
DataSource ds = (DataSource)naming.lookup("java:comp/env/CP");
Connection con = ds.getConnection();
---
jboss complains:
[CPUser] CP not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:340)
...
        at CPUserBean.openDs(CPUserBean.java:151)
        at CPUserBean.ejbLoad(CPUserBean.java:58)
---

I've tried it with using 'xa.CP' as poolname in the  bean but with the
same result (... CPUser] xa.CP not bound

So it seems I'm missing an important thing in any place: (or I'm blind
and stupid ;) - any hints ??


best regards
tom



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to