facebook

jndi name problems [Closed]

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

    benr242
    Participant

    sorry to be nagging you all so much now, but im new to j2ee and i promise it wont last long 😉

    im having trouble looking up beans through the jndi name. using a name like “/ejb/BeanName” i have no problems(doing it by hand). but xdoclet, through MyEclipse, generates names like “java:com/env/ejb/BeanName”, and with names with that prefix ive never been able to look up a bean successfully (i always get a ‘bean not bound’ error), either by hand or with MyEclipse. so i guess what i need is to either figure out how to change the jndi name generated with MyEclipse to exclude the ‘java:comp/env/’, or how to use it with the prefix. from what ive read, it seems the correct way is to use the prefix. in the generated Home interface, there is the JNDI_NAME and COMP_NAME, but for some reason i cant figure out it tries to lookup the home with the COMP_NAME(the one that i cant modify), not the JNDI_NAME(the one that i can). thank you

    #205803 Reply

    benr242
    Participant

    sorry, i should have mentioned that this is through trying to use the generated Util class for lookups

    #205816 Reply

    benr242
    Participant

    nm, i figured it out. for anyone else with the same problem, you need to generate a physical util class with

    @ejb.util generate = “physical”

    #205818 Reply

    Scott Anderson
    Participant

    Excellent work and thanks for posting the solution. We’ll try to be of more help next time. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: jndi name problems [Closed]

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