• Post Reply Bookmark Topic Watch Topic
  • New Topic

How unspacified Txn have access to resources

 
sandeep vaid
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In spacification page 80. the table is given in case of stateful session bean.

In that table it is shown that

ejbCreate()
ejbRemove()
ejbPassicate()
ejbActivate()

can have:

access to Resource Managers
access to Enterprise Beans

How these methods access these when they run under unsapcifed context when CMT is used ???

Ok in case of BMT we can access if we begin our transaction with UserTransaction which is allowed in these methods !!!




Thanks !!!
Sandy
 
sandeep vaid
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok regarding this i got one answer so let me tell u if it is wrong

� 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.transaction context or client security context.

so we have proper client security context.

Thanks ! ! !
Sandy
 
James Turner
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the main requirement is a client security context rather then a transaction context. This is because other EJB's and resources need to know if they can grant access to their methods or not, therefore client security context is needed. Some methods and resources may not want to run in a transaction, i.e. NotSupported, Never; therefore, transaction contexts may not always be necessary.

Basically, from my point of view: To access another EJB or resource we must always have a client security context, but not necessarily a transaction context.

Regards,

James.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!