• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interesting.

 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no meaningful transaction context, hence no access to a resource manager. Resource managers always have a transaction context of some sort. Spec page 81.
 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic