Prev | Next | J2EETM Developer's Guide
Entity Beans |
this
reference. Instead, you must pass the entity bean's object reference. The following code snippet shows how to retrieve the object reference by calling getEJBObject
on the EntityContext
of an entity bean.
public void setEntityContext(EntityContext ec) { // save the entity context in an instance variable this.context = ec; } . . . public void passItOn(Inventory tally) { // pass the object reference tally.copyItems(context.getEJBObject()); }