As Gavin King likes to ask:

"What is the difference between:

@EJB MyEntity e;

and

MyEntity e = (MyEntity) initialContext.lookup(MyEntity.class.getName);

or, if you don't like to cast, write a utility to lookup:

MyEntity e = MyJNDILookupUtil.getMyEntityViaJNDI();"

Annotations to inject your EJB references is really not the strongest EJB3 
feature - there is really no difference between wanting to use @EJB to inject 
your bean or wanting to use JNDI lookups.

POJO persistence is by far the biggest gain you get when go EJB3.  And you can 
use your entity POJOs inside any client and work with them like any POJO - web 
frameworks, standalone Java clients, or whatever. 

Look past the issue of using JNDI lookups and continue evaluating EJB3 - you'll 
find it extremely useful nonetheless.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943399#3943399

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943399


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to