0 Replies Latest reply on Apr 14, 2005 12:15 PM by Mario Tigua

    JNDI Datasource problem!

    Mario Tigua Newbie

      Hi everbody ! I'm trying to configure a oracle datasource for JBOSS 4. My oracle-xa-ds.xml (specific jboss file) looks like:

      <jndi-name>JdelfosDataSource</jndi-name> <track-connection-by-tx/> <isSameRM-override-value>false</isSameRM-override-value> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.124.40:1521:idelfos</xa-datasource-property> <xa-datasource-property name="User">mario</xa-datasource-property> <xa-datasource-property name="Password">mario</xa-datasource-property>

      and my servlet looks like :

      javax.sql.DataSource ds =(javax.sql.DataSource) ctx.lookup("java:JdelfosDataSource");

      This functions very well.

      How I can configure oracle-xa-ds.xml (or another file) so that my servlet reference JNDI name like this : javax.sql.DataSource ds =(javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/JdelfosDataSource"); ?

      Thanks. Mario.