3 Replies Latest reply on Aug 12, 2002 5:56 PM by tbfmicke

    JNDI question

    chumps

      Can somebody help?

      I want to deploy a sample bean under a specific jndi name so that other J2EE components have access to it. Here are the relevant parts of my deployment descriptors:
      (ejb-jar.xml)

      <display-name>DatabaseBrokerEJB</display-name>
      <ejb-name>DatabaseBrokerEJB</ejb-name>
      org.canlii.ejb.DatabaseBrokerHome
      org.canlii.ejb.DatabaseBroker
      ...

      (jboss.xml)

      <enteprise-beans>

      <ejb-name>DatabaseBrokerEJB</ejb-name>
      <jndi-name>SimpleDatabaseBroker</jndi-name>


      when I deploy this jar eveything seems fine except that i don't get any message that says that the bean is bind to the the jndi name SimpleDatabaseBroker. Further, when I use the JNDIView page I see that my bean is deployed under the default (i.e. the <ejb-name> element) DatabaseBrokerEJB and not SimpleDatabaseBroker. Is there something I don't understand or that I'm not doing? Do I need to configure jndi so that it accepts the names indicated in jboss.xml ?

      Thanks for any help.

        • 1. Re: JNDI question
          tbfmicke

          If this is copy/pasted directly from your file
          you have a spelling error, a missing 'r' in
          enterprise-beans.

          > (jboss.xml)
          >
          > <enteprise-beans>
          >
          > <ejb-name>DatabaseBrokerEJB</ejb-name>
          > <jndi-name>SimpleDatabaseBroker</jndi-name>
          >

          • 2. Re: JNDI question
            chumps

            Thanks it was my mistake.
            I'll try to look less stupid next time. By the way, maybe the jboss people could make their dtds available under http://www.jboss.org/j2ee/dtd/ as mentioned in the PUBLIC identifier of their dtds so that XML tools could validate the deployment descriptors and prevent others from making the same kind of mistake I did. Or maybe JBoss should complain about invalid deployment descriptors...
            These are just thoughts...
            Thanks again...

            Regards,
            Chumps

            • 3. Re: JNDI question
              tbfmicke

              Open the conf/jboss-service.xml file and search for the string ValidateDTDs :-)