Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Initial Context Lookup - Basic Question  RSS feed

 
richard marais
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm new to EJB. I am trying to do a JNDI lookup on the Initial Context.
ie. Object homeObject=initial.lookup("xxxx");
How do you know what the "xxxx" should be?
I have tried the HomeInterface, RemoteInterface, Bean but I continually get:
javax.naming.NameNotFoundException: xxxx
Please help.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xxxx refers to the JNDI Name by which the EJBHome is bound in the Application server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!