• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Doubt in operations allowed in bean methods

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I wrote the same doubt in:
https://coderanch.com/t/162349/java-EJB-SCBCD/certification/stateful-CMT-calls-ejbCreate

You can get more information in:
http://forum.java.sun.com/thread.jspa?threadID=563498&messageID=2779964
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic