1 Reply Latest reply on Apr 6, 2004 5:19 AM by dannyyates

    Error looking up DS

    sanjaymistry

      hi All,

      When I run jmx-console on my local server running jboss3.2.x I see following output on the screen:

      java:comp namespace of the AccountEJB bean:

      +- env (class: org.jnp.interfaces.NamingContext)
      | +- jdbc (class: org.jnp.interfaces.NamingContext)
      | | +- account[link -> java:/AccountDS] (class: javax.naming.LinkRef)

      java: Namespace
      +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
      +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
      +- AccountDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)


      So, it seems like my java:/comp/jdbc/account is referring to java:/AccountDS

      Now, when I try to access my DS thorough java:comp as follows, I get error that name not bound:
      ds = (DataSource) ic.lookup("java:/comp/env/jdbc/account);

      But, at the same configuration if I try to access my DS as follow, I can access it.
      ds = (DataSource)ic.lookup("java:/AccountDS");

      Why is that ?What am I doing wrong here ?

      Any help or clues ?

      Thanks.