• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Operations permitted during bean creation

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul,

I downloaded your SCBCD Exam Study Kit ebook a few weeks ago and am about half way through it now. After reading the section on session beans there is one topic that I'm not sure I fully understand. Could you explain why resource manager access and access to other beans is permitted in an ejbCreate method for stateful session beans but is prohibited for stateless session beans?

Thanks
[ July 27, 2005: Message edited by: Norm Mattson ]
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not very sure but what I think is because ejbCreate and ejbRemove in stateful session bean are controlled by Calling client i.e. when you call home.remove(...) on Stateful session bean, the container invokes ejbRemove and same as with home.create(..). So in Client identity is available in ejbCreate and ejbRemove that's why access to Resource managers and other enterprise beans is allowed in ejbCreate and ejbRemove methods in Stateful session bean.

Someone pls correct if I am wrong.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Norm Mattson:
Paul,

I downloaded your SCBCD Exam Study Kit ebook a few weeks ago and am about half way through it now. After reading the section on session beans there is one topic that I'm not sure I fully understand. Could you explain why resource manager access and access to other beans is permitted in an ejbCreate method for stateful session beans but is prohibited for stateless session beans?

Thanks

[ July 27, 2005: Message edited by: Norm Mattson ]


Norm:
Another way of saying what Vicky said is:
Accessing resource managers (and also other enterprise beans for that matter) is prohibited in those session bean methods for which the container (at call time) does not have a meaningful transaction context or client security context. It's very important to remember that the creation and removal of a stateless session bean does not depend upon a client call.
Hope it helps.
Norm, also make sure you check the errata at Author Online forum which can be accessed from:
http://www.manning.com/sanghera
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic