• 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
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Can stateless session bean acess UserTransaction in ejbCreate and ejbRemove

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer given by HFEJB to mock exam question 14 on page 248 is C only. However according to spec page 90, stateless session bean ejbRemove and ejbCreate can access UserTransaction as well if it is BMT.

So I think the answer should be A B C.

Am I right?
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right stateless SB can call getUserTransaction() in ejbCreate & ejbRemove but stateful SB cannot do so. The question is asking methods that both stateful SB and stateless SB can access userTransaction methods.

So the answer is C only.
 
Calson LI
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right stateless SB can call getUserTransaction() in ejbCreate & ejbRemove but stateful SB cannot do so. The question is asking methods that both stateful SB and stateless SB can access userTransaction methods.

So the answer is C only.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Calson Hope there is typing err in your post...

You are right stateless SB[ can not ]call getUserTransaction() in ejbCreate & ejbRemove but stateful SB [ can ] do so. The question is asking methods that both stateful SB and stateless SB can access userTransaction methods.
 
Calson LI
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for rajan's reminder and pratta's question.

I double-checked the ejb 2.0 spec.

Spec p.80 is for stateful SB, p.90 is for stateless SB.

Pratta, yes, you are correct, both BMT stateful and stateless SB can access getUserTransaction in ejbCreate and ejbRemove. So HFEJB, p.248, Q14 answer should be A, B and C.
 
Calson LI
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for rajan's reminder and pratta's question.

I double-checked the ejb 2.0 spec.

Spec p.80 is for stateful SB, p.90 is for stateless SB.

Pratta, yes, you are correct, both BMT stateful and stateless SB can access getUserTransaction in ejbCreate and ejbRemove. So HFEJB, p.248, Q14 answer should be A, B and C.
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic