JBoss Community

Re: JNDI lookup issue - EJB not bound

created by Sam Tsang in JNDI and Naming - View the full discussion

Just to post the progress of solving the JNDI lookup issues I am facing.

 

Previously I only used a ejb-jar.xml to specify ejb names but I didn't use a jboss.xml to specify jndi names. In JBoss 3.2.5, which is the previous JBoss version I have been using, a default JNDI name was given to the ejb object if no jndi name is specified. For some reason JBoss is able to look it up without a jboss.xml file and wouldn't put something like local/EBMyBean@11368117 as the jndi name.

 

When I use JBoss 6 this doesn't work. I have to put a jboss.xml to specify jndi names. So I just put ejb/EBMyBean as the jndi name and JBoss is able to look it up as ejb/EBMyBean. I can also change the name to whatever I like but I guess the default jndi name always contain some number in it so it is hard to know what the default jndi name is.

 

After changing the jndi names in a jboss.xml file I no longer see this EJB not bound error.

 

My jboss.xml is something like this:

 

<jboss>

     <entity>
        <ejb-name>EBMyBean</ejb-name>
        <local-jndi-name>ejb/EBMyBean</local-jndi-name>
    </entity>

</jboss>

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community