Your explanation seems reasonable. Thank you
PS: I just discovered another question that has a similar option: enthuware.oce-ejbd.v6.2.420
About Question enthuware.oce-ejbd.v6.2.419 :
Moderator: admin
-
- Posts: 51
- Joined: Wed Sep 28, 2011 12:14 pm
- Contact:
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.419 :
Updated here as well.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.419 :
Maybe, this is out of the scope of this question.
Session 21.3.2 JNDI Requirements: All EJB container must make available at least the following objects in the name space:
- The local business interface of other EJB ....
- EJBContext objects
- the resource factories used by the EJB ...
Does it mean without lookup or name attribute, we can inject a ConnectionFactory like this: ?
We can inject EJBContext or UserTransaction or other EJB like this without any name/lookup attributes in @Resource:
Session 21.3.2 JNDI Requirements: All EJB container must make available at least the following objects in the name space:
- The local business interface of other EJB ....
- EJBContext objects
- the resource factories used by the EJB ...
Does it mean without lookup or name attribute, we can inject a ConnectionFactory like this:
Code: Select all
@Resource
private ConnectionFactory connectionFactory;
We can inject EJBContext or UserTransaction or other EJB like this without any name/lookup attributes in @Resource:
Code: Select all
@Resource
EJBContext context;
@UserTransaction
UserTransaction ut;
@EJB //assume MyRemoteRef is the remote view of a bean in the same module;
MyRemoteRef myRemoteBean;
@EJB // assume MyLocalBean is the no-interface view of a bean in the same module;
MyLocalBean myLocalBean;
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.419 :
Yes, the container tries to inject appropriate object based on name and/or type.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 66 guests