This task describes how to programmatically retrieve and
call the AccessIntent API during the execution of bean managed persistence
(BMP) entity bean methods.
Results
Note: The access intent object reference retrieved
from the java:comp lookup is current for the duration of the method
in which the reference was looked up. Depending on how you configured
the application profile, subsequent calls of the same method might
not retrieve the same access intent reference. You can only look up
the object reference during the call of a BMP entity bean method;
the reference does not exist during a request on a container managed
persistence (CMP) entity bean. Therefore, do not cache access intent
object references beyond, or used outside of, the scope of the execution
of any given BMP method.