This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt about EJB annotation's attributes and resource annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Doubt about EJB annotation Watch "Doubt about EJB annotation New topic
Author

Doubt about EJB annotation's attributes and resource annotation

Edwin Gonzales
Greenhorn

Joined: Jul 22, 2013
Posts: 12

Hello,

i would like to know the difference between name, beanName, and lookup attributes of EJB annotations. Because when i call an EJB using the lookup attribute, also i can use name attribute for locate the EJB.

And when i'm using MDB, i can use mappedName attribute with resource (that is EJB's attribute too) annotation for locate JMS's resource factory and JMS's destination resources.

Regards.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1629
    
  23

Hi Edwin,

i would like to know the difference between name, beanName, and lookup attributes of EJB annotations. Because when i call an EJB using the lookup attribute, also i can use name attribute for locate the EJB.

Just have a look at my notes (ScbcdLinks, chapter 7).

And when i'm using MDB, i can use mappedName attribute with resource (that is EJB's attribute too) annotation for locate JMS's resource factory and JMS's destination resources.

The usage of mappedName is not specified by the EJB specs and therefore provider specific. So you should check your provider details on this.

Regards,
Frits
Edwin Gonzales
Greenhorn

Joined: Jul 22, 2013
Posts: 12

Thanks, I understand it now, thanks.

By the way, I will buy your mock exam, I think that it would be helpful.

Regards.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1629
    
  23

Edwin Gonzales wrote:
By the way, I will buy your mock exam, I think that it would be helpful.

Please do and don't hesitate to hit the discuss button when you have a question or doubt!

Regards,
Frits
 
 
subject: Doubt about EJB annotation's attributes and resource annotation
 
Similar Threads
@Resource(name="x",lookup="y")
what is JNDI
How to declare session bean with local view in ejb-jar.xml
EJB Accessibility
Lookup EJB on Different Application servers