This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Get EJB Home from another EJB method?

Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?


Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic