afterCompletion() has a clent security context . So , eventhough it doesnt have a transaction context , it should be able to accesss resource mgr and beans . but the specification(on pg 80) says not so!! please check this
Infact page 81 of the spec says that "Accessing resource managers and enterprise beans is disallowed in the session bean methods for which the Container does not have a meaningful transaction context or client security context." For ex , even ejbCreate() , ejbRemove(),ejbActivate() and ejbPassivate() methods of SFSB will be in unspecified transactional context . But they can access resource mgrs and other Enterprise beans because they have a security context attached with them . Its the same case with afterCompletion . ie.Though this doesnt have a transactional context , it has a security context (for ex , it can call getCallerPrincipal and isCallerInRole(String roleName)) . But i do not really understand why this afterCompletion(boolean isCommitted) can not access resource mgrs and other beans while ejbCreate() etc can access ...Please Clarify .