Hi Jack,


By the Java EE spec, all local references (ejb-ref, resource-ref, env-ref) are supposed to be under java:comp/env/. The specs also says this prefix is ommited from the standard deployment descriptors (web.xml, ejb-jar.xml) and so JBoss AS is simply being consistent by omitting also from its proprietary deploymento descriptos (jboss-web.xml, jboss.xml)


[]s, Fernando Lozano

---- Original Message ----
From: Jack Stevens <do-not-reply@jboss.com>
To: "User development" <jboss-user@lists.jboss.org>
Sent: Qui, Jun 2, 2011, 6:19 AM
Subject: [jboss-user] [Beginner's Corner] - Re: javax.naming.NameNotFoundException: jdbc not bound

JBoss Community

Re: javax.naming.NameNotFoundException: jdbc not bound

created by Jack Stevens in Beginner's Corner - View the full discussion

Hi Peter,

 

For this:

jboss-web.xml:

<jboss-web>

<resource-ref>

<res-ref-name>jdbc/TheDS</res-ref-name>

<jndi-name>java:jdbc/SomeDS</jndi-name>

</resource-ref>

</jboss-web>

why wouldn't it be:

jboss-web.xml:

<jboss-web>

<resource-ref>

<res-ref-name>java:comp/env/jdbc/TheDS</res-ref-name>

<jndi-name>java:jdbc/SomeDS</jndi-name>

</resource-ref>

</jboss-web>

How does JBoss know to include java:comp/env/ in the <res-ref-name> if we just put <res-ref-name>jdbc/TheDS</res-ref-name>

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community