Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Stateful Session Bean question

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii..

my question:

At pag 80 of EJB 2.0 spec the table specifies that for ejbCreate is

possible to make an access to a Resource manager but ejbCreate is

associated with a unspecified transaction context and this seems in

contrast with the affermation that accessing resorce managers and

enterprise beans is disallowed in the session bean methods for wich the

Container dos not have a meaningful tx context like declared in the specs.

bohh!

Thanks in advance !

Gabriele
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It struck me too in the beginning and i reasoned as below. If someone knows better, then pls let us know

For BMT, the bean can use UserTransaction to start a transaction. So, it can call on resource manager's methods and other enterprise beans.

For CMT, probably the bean can call other enterprise beans which (probably) do not need a transaction and can manage their own transaction. I am not sure what the bean can do with Resource Managers.

Same for a Stateless session bean, it can call getUserTransaction in it's ejbCreate but cannot use any of its methods. So, it can just hold on to it. Its something like "being allowed a cake but it's just too soon to eat it".
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic