Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

comminication in EJB

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

I am new to EJB world,reading EJB in Action book to get the basic concepts. I understood that EJB is useful for writing reusable business compoents(pure business project) in any orgnization.To implement this i tried a HelloWorld example with below approach

1. Installed RAD with WAS7 for writing a EJB component in my local system
2.Installed JDK in my local system
3. BY pointing to WAS7 JDK, written below code and deployed to WAS7 successfully



Now i want to write a client application by pointing to Installed JDK, am i need to genrate any stubs for this?If so how can i genrate the stubs?
In webservices the interaction will be done in the form of XML's,so how the interaction will done from client to SessionBean in EJB?

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
You are right with web service usually we have SOAP(xml) over HTTP, for EJBs it will simply be RMI the data being serialized.
To call your EJB the way you do it depends on the type of client.
But basically the idea is to do JNDI lookup to get a local proxy of your remote EJB.
In a server you can use dependency injection @Resource, outside a server you'll have to code manually the JNDI lookup.

I hope that'll help
 
reply
    Bookmark Topic Watch Topic
  • New Topic