A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB Certification (SCBCD/OCPJBCD)
Diffrence between @EJB and SessionContext.getBusinessObject(InterfaceName.class) ?
Joined: Aug 01, 2009
Aug 03, 2012 12:06:59
May I know which to use when ?
Creator of Enthuware JWS+ V6
Joined: Apr 07, 2010
Aug 04, 2012 01:48:22
@EJB is used to inject an
in your (client) code.
SessionContext.getBusinessObject(InterfaceName.class) is used to get a reference to "your own" EJB (and pass it for instance to another EJB), as you can't use the "this" keyword.
subject: Diffrence between @EJB and SessionContext.getBusinessObject(InterfaceName.class) ?
How to Inject session bean from session bean and viceversa
Diffrence from JDK , JDBC ,JSDK , JVM , JSDKEE
why some classes are called deprecated & some legacy?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014