Win a copy of Functional Design and Architecture this week in the Functional programming 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Accessing beans remotely

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
I have created and deployed a stand alone EJB module. Now i want to contact this bean from a client; say a servlet deployed in a different machine in the network. What are the necessary steps i need to do? I know the JNDI name of my EJB module (which i noted from the server log). But no idea as how to use it in the client. Can someone point me in the right direction? A proper resource in the net will also do. I know that injection or lookup is needed for this. I have performed fair bit of googling.. but no real solution i could find.

Thanks for your valuable time.
 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have setup the JNDI properties properly in your servlet and you have the necessary libraries (vendor specific and stubs), then getting the reference of the bean is same as what you do with a local client. Location transparency is a key feature.


In this forum, there is a similar thread, which you should look into. How to access EJB residing in a different container ?
 
vijaya raj
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Raja wrote:If you have setup the JNDI properties properly in your servlet and you have the necessary libraries (vendor specific and stubs), then getting the reference of the bean is same as what you do with a local client. Location transparency is a key feature.



Thanks a lot dear Kumar. I would definitely work on the lines. . Would update the results.
 
We can walk to school together. And we can both read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic