3 Replies Latest reply on May 20, 2003 1:56 AM by rroos

    Oracle Datasource configuration problem

    sameer_inn Newbie

      Hello
      I have configured Oracle Datasource name "OracleDS"

      I am able to access the datasource from ejb.

      but when i access from the client it's give me
      OracleDS not bound Exception.

      my code is
      String jndi="java:/OracleDS";
      InitialContext sc=new InitialContext();
      DataSource ds = (DataSource)sc.lookup(jndi);

      and i am able to access datasource from client
      in weblogic.

      could u help me out how to access datasource from client in jboss

      help is appreciated
      sameer

        • 1. Re: Oracle Datasource configuration problem
          janekclaus Newbie

          The bound JNDI name is local to the JBoss instance you're running. The reason I assume is the datasource would be part of the local name space of the application, bean etc. has. Since you can not reference it in another JVM, you can not have access to it.
          IMHO there are two ways to get access to that datasource:
          1: write a session bean wrapper but better
          2: create a jboss service wrapper.

          Janek

          • 2. Re: Oracle Datasource configuration problem
            Seet Seet Newbie

            Hi Sameer,

            Did u configure the jboss.jcml file for Oracle configuration for your connection pool?

            If yes, Please post the file jboss.jcml here or paste the code.

            Seetesh

            • 3. Re: Oracle Datasource configuration problem
              rroos Newbie

              Configure your default datasource in
              JBOSS_HOME\server\default\conf\standardjbosscmp-jdbc.xml

              like :
              <jbosscmp-jdbc>


              <!--datasource>java:/DefaultDS</datasource-->
              <!--datasource-mapping>Hypersonic SQL</datasource-mapping-->

              <!--datasource>java:/MSSQLDS
              <datasource-mapping>MS SQLSERVER</datasource-mapping-->

              <!--datasource>java:/DB2DS
              <datasource-mapping>DB2</datasource-mapping-->

              java:/OracleDS
              <datasource-mapping>Oracle8</datasource-mapping>

              .....