0 Replies Latest reply on Jul 25, 2002 5:27 AM by Kristof Van Cleemput

    Problem with finding the jndi name (not bound)

    Kristof Van Cleemput Newbie

      Hi,

      I have created a connection pool named "Wdcis"
      And i can see the output in the server dosprompt like this

      [Wdcis] Starting
      [Wdcis] XA Connection pool Wdcis bound to java:/Wdcis
      [Wdcis] Started

      I have a few beans which connects to the database.For those i get a connection like this

      Context ctx = new InitialContext();
      DataSource ds =
      (DataSource)ctx.lookup("Wdcis");

      [also tried serveral other names with and without the jdbc and java:comp/env but always get some exception]

      I'm trying to use a resource manager
      so my jboss.xml is like this :
      -----------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd">



      <enterprise-beans>


      <ejb-name>Gebruiker</ejb-name>
      <jndi-name>ejb/Gebruiker</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>Klant</ejb-name>
      <jndi-name>ejb/Klant</jndi-name>


      <ejb-name>KlantLog</ejb-name>
      <jndi-name>ejb/KlantLog</jndi-name>


      <ejb-name>Mqs_BandDetail</ejb-name>
      <jndi-name>ejb/Mqs_BandDetail</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>Mqs_Band</ejb-name>
      <jndi-name>ejb/Mqs_Band</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>Mqs_Klant</ejb-name>
      <jndi-name>ejb/Mqs_Klant</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>Mqs_KlantNotificatie</ejb-name>
      <jndi-name>ejb/Mqs_KlantNotificatie</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>Rol</ejb-name>
      <jndi-name>ejb/Rol</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>



      <ejb-name>GebruikerSession</ejb-name>
      <jndi-name>ejb/GebruikerSession</jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      <ejb-name>KlantSession</ejb-name>
      <jndi-name>ejb/KlantSession</jndi-name>


      <ejb-name>MqsSession</ejb-name>
      <jndi-name>ejb/MqsSession</jndi-name>
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <resource-name>WdcisDS</resource-name>
      </resource-ref>


      </enterprise-beans>

      <resource-managers>
      <resource-manager>
      <res-name>WdcisDS</res-name>
      <res-jndi-name>java:/Wdcis</res-jndi-name>
      </resource-manager>
      </resource-managers>


      -----------------------------------------

      While calling a bean from the client I am getting an exception like this in server dosprompt

      [DatabaseBean] naming exception javax.naming.NameNotFoundException: jdbc not bound

      My ejb-jar has the following entry for each session and entity that uses the resource.

      ---------------------
      <resource-ref>
      <res-ref-name>Wdcis</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      --------------------

      I noticed that I couldn't find the binding for the Wdcis when jboss deploys the ear.

      Did i miss something?

      Thanks in advance.
      With Regards,
      kristof