Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Access to resource managers

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, it is advised to do access to resource manager ( access to enterprise beans) only in transaction context.

If so why is the above allowed in ejbCreate(), ejbremove() methods stateful beans ? However the operations are not allowed in afterCompletion() method. Why ?
[ejbCreate,ejbRemove and afterCompletion do not have a txn context in case of CMT]

Further the operations are not allowed in ejbCreate()/ejbRemove() methods of stateless beans. Why ? ( The user context is not available in the case of statless beans. But you can still access the resource managers without an user context)

Thanks in advance for the clarifications.
[ December 16, 2005: Message edited by: Sankar Subbiramaniam ]
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sankar,

CMT session bean methods ejbCreate(),ejbRemove(),ejbPassivate(),ejbActivate() runs in an "Unspecified Transaction Context". and are not considered a part of client transaction.
page 499. HFEJB
may be this clears your doubt......i am not quite sure.
vikas prasad
SCJP 1.4 SCWCD 1.4 SCBCD 1.3
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic