• 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

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic