Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get EJB Home from another EJB method?  RSS feed

A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've drawn a complete blank with this & am begining to think I'm the only one in the entire world that's tried it!

From one EJB I want to get the home object for another EJB - but I HAVE to use something like -

home = (EJBLocalHome) context.lookup("ejb/EJB1");


home = (EJBLocalHome) context.lookup("java:comp/env/ejb/EJB1");

throws a NamingException

From another class such as a Struts Action method the latter works fine!

Is this what's supposed to happen, is it my fault or what?

As far as I can see all <ejb-local-ref> are setup fine!

Please someone put me out of my misery! - can this be done?


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!