How can I call one EJB from inside of another EJB?
Answers were Sorted based on User's Feedback
Answer / anil prasad
One EJB can be called from another EJB by using interfaces
EJBLocalHome and EJBLocalRemote. In the ejbCreate() of the
Home interface of another bean the remote reference of the
local EJB can be obtained. In any case the local ejb
cannot be accessed by the client outside the ejb container.
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / kameshwar
EJBs can be clients of other EJBs. It just works. Use JNDI
to locate the Home Interface of the other bean, then acquire
an instance reference, and so forth.
Is This Answer Correct ? | 3 Yes | 1 No |
What’s the difference between hibernate and ejb 3?
What are types in SessionBeans?
Can stateful session beans are persistent?
what is the Relationship between EJB and CORBA architecture?
What is ejb in java with example?
What is stateless and stateful session bean in ejb?
What is EJB server provider?
Should services be stateless?
How is an entity bean created?
Can more than a single table be mapped in cmp?
Can tomcat run ejb?
An instance of stateful session ejb when accessed simultaneously from more than one clients on same vm results in remoteexception or ejbexception. In case the client is a servlet thread, which of the techniques can be used to avoid remoteexception/ejbexception?