aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes a session bean  contacts an entity bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "a session bean  contacts an entity bean" Watch "a session bean  contacts an entity bean" New topic
Author

a session bean contacts an entity bean

sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
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
Madhu Juneja
Ranch Hand

Joined: Mar 10, 2001
Posts: 176
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: a session bean contacts an entity bean
 
Similar Threads
session object survival after server crash
using session facade pattern to call entity bean
Calling Entity Bean from SessionBean
on EJB Topic
session bean, session bean instance and session object!!!