Home Interface from inside an EJB

Written by Joseph Ottinger

Sometimes, an EJB needs to do something - execute a finder method, for example - using its own home reference. It can do so with the following function:

context.getEJBHome()

...where context is the instance of javax.ejb.EJBContext set by the EJB setEntityContext(EntityContext ctx) or setSessionContext(SessionContext ctx) methods.

Copyright © 2007 IronFlare AB