The answer you got was the short, easy answer, not the whole answer. The 
java:/OracleDB URL works because that's where the datasource is bound by 
JBoss to make it available to the deployer layers. This URL will only 
work in JBoss, really.

To use 'java:comp/env/jdbc/OracleDB' you'll need to set up the mapping 
in jboss.xml:

<jboss>
   <enterprise-beans>
      <session>
         <ejb-name>name</ejb-name>
         <jndi-name>name</jndi-name>
         <resource-ref>
            <res-ref-name>jdbc/OracleDB</res-ref-name>
            <resource-name>Oracle</resource-name>
         </resource-ref>
      </session>
    </enterprise-beans>

    <resource-managers>
       <resource-manager>
          <res-name>Oracle</res-name>
          <res-jndi-name>java:/OracleDB</res-jndi-name>
       </resource-manager>
    </resource-managers>
</jboss>

You'll also want to change your ejb-jar.xml so that the res-ref-name in 
that is 'jdbc/OracleDB' as well.

-danch

De Closmadeuc, Etienne wrote:

> You kindly answer me that I must use "java:/OracleDB" as datasource JNDI
> name, and it works.
> 
> But I wonder that it's the right way ! The specification is "java:/comp/env"
> for any resource and "java:comp/env/jdbc" is recommended for datasource
> references.
> 
> To be continued ...
> 
> Etienne de Closmadeuc ([EMAIL PROTECTED])
> Logica SA
> 183, route de Canéjan 33173 GRADIGNAN CEDEX
> Tél : 05.56.75.77.00
> 
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to