• 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

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic