• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

all container call backs are invoked in unspecified transaction?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does all container call backs of all bean types are invoked in un specified transaction context?
SessionSynchronization.afterCompletion() is invoked in no transaction.

is no transaction and unspecified transactions are same?.

can we use setRollbackOnly() on unspecified transactions?

Thanks,
Yamini.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yamini,

if you haven't obtained a copy of the EJB specification from SUN you should because you can find it there:

1. Not all. The specification lists the callbacks that run in an unspecified transaction context.
2. Unspecified transaction context means that the specification doesn't demand anything from the container. Some containers may use a transaction, others may use no transaction at all.
3. No. See e.g. table in par. 7.6.1. I believe the container will throw a java.lang.IllegalStateException.

Hope this helps,
Paulus
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic