• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stateful EJB with CMT

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am going to save the itinerary into the db as soon as the customer confirms it. And saving the itinerary also requires saving all the segments it is made of.
My question is: what type of transaction is better to use in such a situation? BMT or CMT? I would prefer to use CMT for the following reason:
1. the operations to be performed on the db are not so complex
2. I would use CMP (CMP+BMT should not be possible)

Anyway, I still have a doubt because the ejb which interfaces entity beans for saving itineraries is a stateful session bean and I read somewhere that it is a risk to use stateful session bean with CMT because the container could destroy the ejb instance if an exception occurs. Is this true? Can you give me your suggestion about it?

Thanks a lot in advance. Regards
Eleonora Di Pietro
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, Incase of system exception only the container destroys the bean instance otherwise there will not be a problem. And this is the same case even BMT aswell.

So I would say CMP,CMT,SSB would be fine for your requirement.


Thnx,
Sam
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic