Nps Ferreira wrote:
Hi all,
I´m doing the assignment of the SCEA certification and i have a doubt:
How to use dependency injection in a session bean (EJB3) calling another session bean, how to represent this action in a Sequence diagram?
cheers,
Nuno Ferreira
Actually there are two ways of calling another bean form a bean one way is through JNDI
and other way is using dependency injection You can do it by specifying.
dependency injection way
JNDI way (Assume you have a bean called TestBean)
The point that you have to remember when calling a bean using JNDI is, when you looking up and bean you dont
need to specify an JNDI initialization parameter, you can use the default initial context.