Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
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.
I agree. Here's the link:
subject: Diffrence between @EJB and SessionContext.getBusinessObject(InterfaceName.class) ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013