JBoss JNDI Naming Question

K

Karl Uppiano

I wrote a resource adapter and a sample J2EE web application that accesses
the RA. The RA connection pool JNDI name is eis/MyResourceJNDIName. The
resource reference name is eis/MyResourceName. Based on this, the naming
lookup should be java:comp/env/eis/MyResourceName.

The resource reference in web.xml looks like this:

<resource-ref>
<res-ref-name>eis/MyResourcePoolName</res-ref-name>
<res-type>javax.resource.cci.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

The mapping in jboss-web.xml looks like this:

<jboss-web>
<resource-ref>
<res-ref-name>eis/MyResourcePoolName</res-ref-name>
<res-type>javax.resource.cci.ConnectionFactory</res-type>
<jndi-name>eis/MyResourcePoolJNDIName</jndi-name>
</resource-ref>
</jboss-web>

The ds.xml file configures connection pools like this:

<no-tx-connection-factory>
<jndi-name>eis/MyResourcePoolJNDIName</jndi-name>
<rar-name>my-ra.rar</rar-name>
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
<adaptor-display-name>MyResourcePool</adaptor-display-name>
<config-property name="serverName"
type="java.lang.String">localhost</config-property>
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
</no-tx-connection-factory>

For some reason, this assigns the JNDI name java:eis/MyResourcePoolJNDIName.
If I change jndi-name to comp/env/eis/MyResourcePoolJNDIName, looking at log
data in the java console, it appears to accept the name, but when I look in
JNDIView, the name is not listed, and the JNDI lookup does not work. Why can't
I enter a value into the expected namespace? All the other appservers
support this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top