• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Session Bean TX

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For stateful Session Bean
- You can access resource manager, other beans from ejbCreate(), ejbRemove(), ejbActivate(), ejbPassivate()
- Methods ejbCreate(), ejbRemove(), ejbActivate(), ejbPassivate() runs in 'unspecified transaction context'

Now tell me, how can you access other beans / resource managers from 'unspecified transacrtion context' - i think they can be accessed only from transactional context.

Am i missing something? Please give your input.


Thanks.

Katyan.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what the specs mention on this subject P364

====================================================================
The EJB specification does not prescribe how the Container should manage the execution of a method with an unspecified transaction context´┐Żthe transaction semantics are left to the Container implementation.
====================================================================

so to answer your question accessing other beans / resource managers is left solely to the implementation of the container. The specs give some examples of possible solutions .......

=====================================================================
->The Container may execute the method and access the underlying resource managers without a transaction context.
->The Container may treat each call of an instance to a resource manager as a single transaction (e.g. the Container may set the auto-commit option on a JDBC connection).
->The Container may merge multiple calls of an instance to a resource manager into a single transaction.
->The Container may merge multiple calls of an instance to multiple resource managers into a single transaction.
->If an instance invokes methods on other enterprise beans, and the invoked methods are also designated to run with an unspecified transaction context, the Container may merge the resource manager calls from the multiple instances into a single transaction.
->Any combination of the above.
=====================================================================

I hope this helps !!
 
Manish Katyan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply, David.

Sometimes it really gets confusing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic