• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Dependency Injection for remote containner

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

Can someone tell me how to inject a remote EJB reference? For example, I have a Web app deployed on machine A, and an EJB deployed on machine B. How do I refer to the EJB in my web app? Lookup is not an option in my case.

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

You can do it two ways other ways besides look-up:
1. Use jndi.properties to point to the remote server.
2. You can use app-server specific global JNDI naming to connect to a remote EJB via DI/@EJB/XML DD.

Here is a reference for GlassFish as a starting point: https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html. Here is a helpful forum discussion: http://forums.java.net/jive/message.jspa?messageID=254961.

Regards,
Reza
[ December 02, 2008: Message edited by: Reza Rahman ]
 
frank meng
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great! Thank you Reza!

~Frank
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic