wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Doubt in EJB3/Annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Doubt in EJB3/Annotation" Watch "Doubt in EJB3/Annotation" New topic
Author

Doubt in EJB3/Annotation

Rakesh Rajagopalan
Ranch Hand

Joined: Sep 19, 2006
Posts: 59
Hi all,

I have a very fundamental doubt in EJB 3/Annotation. How does using �@Stateless� annotation transforms a Java Object to a Stateless bean? Can someone explain whats going on behind the scenes?

Regards,
Rakesh.R
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Rakesh,

The exact low-level details depends on the implementation. From a high-level, the container reads the bean configuration, attaches requested container services (e.g. transactions, DI, life-cycle callbacks, thread-safety, pooling, remoting, interceptors) to the POJO and makes the EJB available via the JNDI registry for other Java EE components.

Is there a specific problem you are trying to solve?

Regards,
Reza
[ December 03, 2008: Message edited by: Reza Rahman ]

Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Rakesh Rajagopalan
Ranch Hand

Joined: Sep 19, 2006
Posts: 59
No Reza, there is no specific problem that im trying to solve. Just wanted to figure out how annotations are working. Thanks for replying.
Jerwin Louise Uy
Ranch Hand

Joined: Oct 27, 2007
Posts: 75
Hi,

If you have doubts on the annotations, then you could try looking at the source code of the application server as well as the libraries assigned to process the annotations.

Based on my experience using EJB 3.0 (Toplink), dependency injection, class level and method level annotations seems to work fine.

Regards.


Uy Jerwin Louise Vergara
Junior Developer / Research and Development at Incuventure Partners Corporation
email: jerwin.uy@incuventure.net
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Doubt in EJB3/Annotation