About Question enthuware.oce-ejbd.v6.2.419 :

Moderator: admin

Post Reply
Ciprian Mihalache
Posts: 51
Joined: Wed Sep 28, 2011 12:14 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.419 :

Post by Ciprian Mihalache »

Your explanation seems reasonable. Thank you :)

PS: I just discovered another question that has a similar option: enthuware.oce-ejbd.v6.2.420

admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.419 :

Post by admin »

Updated here as well.
If you like our products and services, please help us by posting your review here.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.419 :

Post by himaiMinh »

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:

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;

admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.419 :

Post by admin »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests