Win a copy of Fixing your Scrum this week in the Agile 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Referencing EJB Local home from a POJO class of a separate web application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to port 2 EJB modules in my application from EJB2.1 to EJB3.0.I used the Eclipse Kepler IDE and regenerated the session beans again using an EJB3.0 configuration.I am not using an ejb-jar.xml because in EJB 3.0 that is supposed to be redundant and I have used annotations for marking my bean as Stateless and specifying the Local and Local Home Interfaces.I have still kept the Local Home interface since I wanted the basic structure of my project to be similar to what it was in EJB2.1.I have also done away with the xml bindings for the EJB while migrating.We are using a WAS 7 application server for deployment and while the EJB is getting successfully deployed without errors,I am getting a naming Exception while looking up my Local Home interface from a separate POJO class of a different web application it is required in.I basically want to call the create() method of the Local Home interface after referencing the EJB Local Home.Adding code samples below:




Also my Local and Local Home interfaces are inside my EJB client which I use as a jar file while my Session Bean is inside the actual EJB which is used as an EAR.

Following is the error I am getting:

NamingException::javax.naming.NameNotFoundException: Name global not found in context "java:".

Am I missing some configuration resulting in the JNDI lookup failing?Any help would be gratefully appreciated.Thanks in advance.

 
Marshal
Posts: 8056
569
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Please choose carefully forum you're posting your question in. This time you posted your question to Ranch Office forum, where originally it is meant to be only for questions about the Ranch.
I have moved your question to our EJB forum.
 
Subhankar Nath
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Really sorry about that.I will be more careful from next time.
 
Everybody! Do the Funky Monkey! Like this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic