Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in operations allowed in bean methods

 
Mini Sarin
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

The EJB spec says: 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.

ejbCreate, ejbRemove, ejbActivate and ejbPassivate of stateful session bean run in unspecified transaction context, then howcome these methods have Resource manager access and Enterprise bean access.

What is client security context?

I am not able to understand when access is allowed to these resources in different bean methods by different types of beans.

Please guide.

Thanks
Mini (preparing for SCBCD)
 
Loka Nalla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very good question Mini,
I went through the spec and the HFEJB for this problem but no clue.
It would be great if anybody could explain it.

Thanks
 
M Mistroni
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
was going thru forums to refresh my knowledge since i have SCBCD in 2 days..
saw your question.. got me confused and searched the internet.
i found no answer, then i re-read your post

The EJB spec says: 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.

and i found the answer:

which the container does not have a meaningful transaction context OR client security context.

in SFSB, you dont have meaningful tx context, but you DO have a client security context (each SFSB is associated with 1 and only 1 client).

in SLSB, you don't have neither tx nor client security context since SLSB are not specific to a client

i think this is the anser

any comments welcome

hth
marco
 
David Crecente
Greenhorn
Posts: 7
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic