• 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

Doubt about transaction context in statefull session Bean

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can statefull session bean access another bean or database in ejbCreate,ejbActivate,ejbPassivate and ejbRemove methods,because ejbCreate,ejbActivate,ejbPassivate and ejbRemove run in unspecified transaction context.

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

Not sure..just trying to help you...wouldn't this rule just be applied for STATELESS session beans?

Ttyl
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stateless session bean cannot access DB or access another bean in ejbCreate and ejbRemove because there is no transaction context.
In stateless session bean it is fine as per logic

I have doubt in statefull bean.
if there is no transaction context for ejbCreate,ejbActivate,ejbPassivate and ejbRemove methods then How can statefull session bean access another bean or database.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gowher Naik:
How can statefull session bean access another bean or database in ejbCreate,ejbActivate,ejbPassivate and ejbRemove methods,because ejbCreate,ejbActivate,ejbPassivate and ejbRemove run in unspecified transaction context.

Thanks


Hi Gowher
I think in order to access other bean methods it needs jndi context that is available inside ejbCreate,ejbActivate,ejbPassivate and ejbRemove methods also as the bean has acquired its beenhood it has access to resource manager connection factory which helps to get database base connection.
Let me know if i am wrong..
 
reply
    Bookmark Topic Watch Topic
  • New Topic