facebook

Question about Naming lookup [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #197493 Reply

    kalak2
    Member

    I am using MyEclipse 2.5.1 jboss 3.2.1 and jsdk1.4.2 and I have a simple session bean: com.test.ejb.Test

    When I run XDoclet I get the com.test.interfaces.TestHome interface generated with the COMP_NAME and JNDI_NAME fields. JNDI_NAME = “ejb/TestHome”.

    But when I try to look up in JNDI on the name TestHome.JNDI_NAME, it doesn’t find the bean. I had to list all jndi names in order to find that the bean was bound as just ‘Test’. If I use that name everything works. This seems strange to me. Can someone explain why? Even the META-INF/jboss.xml is says that “<jndi-name>ejb/TestHome</jndi-name>”.

    #197494 Reply

    Scott Anderson
    Participant

    You can specify the JNDI names you want generated with the following XDoclet tags:

    
     * @ejb.bean   local-jndi-name = "ejb/TestHome"
     *                   jndi-name = "ejb/TestHome"
    

    You can omit one or the other if you’re only generating local or remote interfaces, respectively. Did you specify these tags appropriately, because they directly control the settings you get for COMP_NAME and JNDI_NAME?

    If your jboss.xml shows the correct name, it makes no sense for them to be listed somewhere else on the JNDI tree, since this is exactly the entry that governs that. If jboss.xml is in the META-INF directory, this doesn’t make any sense. Is there anything in the JBoss console output regarding the JNDI mappings when the application is deployed?

    –Scott
    MyEclipse Support

    #197503 Reply

    kalak2
    Member

    Ok, I found the error. The jboss.xml wasn’t being generated in the META-INF directory, but it was placed directly under it in the project tree so I didn’t notice it before checking the files in the deplyment directory. I resolved the issue by setting XDoclet property jboss/destDir to ‘src/META-INF’.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Question about Naming lookup [Closed]

You must be logged in to post in the forum log in