• 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
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

a session bean contacts an entity bean

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when a session bean wants to contact an entity bean,
it does not use JNDI to do the lookup. What kind of
way it should use? Does it depend on type of Server?
What if I use Weblogic Server? Could someone show me
that piece of code?
Please help ASAP!
Thanks in advance,
Sarah
 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Calling of a entity bean from a session bean is not app server dependent. If a session bean needs to invoke methods of entity bean, it has to do in the same standard way. It does have to use the JNDI lookup too. And you can of course use weblogic server.
For example :

The above is session bean. The client invokes the calcBonus() method and this method creates an instance of Entity Bean, the code given as follows.

Also refer : http://www.javaranch.com/ubb/Forum11/HTML/000594.html
The link mentioned in the above has examples with various combinations of J2EE technologies.
HTH
 
reply
    Bookmark Topic Watch Topic
  • New Topic