2 Replies Latest reply on Sep 12, 2002 12:42 PM by davidjencks

    Please help, emergency!!!

    hsteven29

      Hi all:

      I am runing client application out of Jboss VM. So I need nothing to do with jboss.xml, ejb-jar.xml etc. I have two configuration files configured like:

      jboss.jcml:

      <!-- =======================================================-->
      <!-- JDBC-->
      <!-- =======================================================-->


      oracle.jdbc.driver.OracleDriver,org.hsqldb.jdbcDriver



      DefaultDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:oracle:thin:@127.0.0.1:test
      test
      test
      25
      1
      1800000
      true
      1.0


      standardjaws.xml:
      jaws>
      java:/DefaultDS
      <type-mapping>Oracle8</type-mapping>
      false
      Is any other configure file I need to take care? because those two files don't have jndi name for datasource, what is the client lookup statement: ctx.lookup("DefaultDS") or something else. If I need use jndi name like 'jdbc/MyDataSource'(using ctx.lookup("jdbc/MyDataSource"), what I should modify those two files. I am new to Jboss. Your help would be very much appreciated.

      Best wishes.

      Steven.

      P.S.: (From java: namespace of JndiView, I can see DefaultDS, does that mean that jndi name is "DefaultDS". If it is true, I should have no problem to lookup ctx.lookup("DefaultDS") from out of Jboss or ctx.lookup("java:DefaultDS") from inside Jboss. Please point out if I am wrong)

        • 1. Re: Please help, emergency!!!
          jaime

          Hi,

          Do you have set the Context.INITIAL_CONTEXT_FACTORY and the Context.PROVIDER_URL properties for get an InitialContex?

          If no:

          Hashtable c = new Hashtable( );
          c.put( Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory" );
          c.put( Context.PROVIDER_URL,"jnp://localhost:1099" );

          Context ctx = new InitialContext( c );

          Object ref = ctx.lookup( "SomeXXX" );

          JaimeS

          • 2. Re: Please help, emergency!!!
            davidjencks

            What would induce you to look around a little bit to find that the answer to this question has been posted maybe 100 times? What would induce you to use an informative subject line?