• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB3 JNDI lookup in WAS7

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to invoke ejb3 beans in my struts2 action class in Websphere 7 server. As struts action is not a container managed component, I could not use DI to inject EJB3 beans. I 'm using the below JNDI lookup code in Websphere 7 server, but fails. Could anyone help me to provide JNDI EJB3 lookup URL/code for WAS7? What are the JNDI lookup methods available in WAS 7 for ejb3 and where could i find the documents please?. Thank you very much for helping me.



Exception:






 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just change



to



and your JNDI lookup should work.

The other thing you can do is to look in the SystemOut.log for binding information for SampleEjbLocal. The log provides both short and long form JNDI bindings for all the objects that bind to the JNDI directory.

Let me know if this doesnt work
 
Viji San
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Deepak!!

The below lookup code worked, prefixed "ejblocal:" with the full qualified interface name. I found this in System.out log as you mentioned.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting the below error while looking up EJB3.0 version bean, any suggestions?


[color=red]javax.naming.ConfigurationException: NamingManager.getURLContext cannot find the factory for this scheme[/color]






Thanks
Rafi.
 
Attractive, successful people love this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic