• 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

Usertransaction and Entity Beans

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Does anybody knows why UserTransaction are not permitted in Entity beans?
Regards
Mini
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy -- I was told it was something like, "Entity beans are always connected to an underlying persistent store, which means they are inherently transactional." Which I think translates to something more like, "We want to make it more harder for you to mess up the database." People can still mess things up, of course, with a bad combination of transaction attributes, but *forcing* you to put transaction attributes on the key methods of entity beans means you have to acknowledge that you're doing important things (INSERT, UPDATE, etc.) to the cricital data. So it's just a protection.
Of course, you could have a development tool that puts in all transaction attributes defaults for you, so that you STILL don't have to acknowledge transactions with your entity beans... but a decent tool will put in "Required" as the default, so that you WILL have a transaction unless you specifically make a point of saying that you don't support a transaction or something.
In other words, the specification makes it a more work for you to *not* use transactions with entity beans.
One more big difference between EJB and jini -- EJB gives you all sorts of protections so it's harder to really do Bad Things ("we don't completely trust you to protect the enterprise data"), while Jini says, "you are on your own... we trust you, and if you want to blow the place up, that's your business."
cheers,
Kathy
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kathy. That clears my doubt.
cheers
mini
btw are you from britian?
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kathy,
I am new to EJB.
WRT the above question does that mean an entity bean can not have a Bean Managed Transaction at all?
Thanks
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nileesha ,
Thats right, Entity Beans cannot have Bean Managed Transactions.
Bean Managed Transaction are meant only for Session Beans.
Regards
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
------------------------------------------------------------------------------------
Thats right, Entity Beans cannot have Bean Managed Transactions.
Bean Managed Transaction are meant only for Session Beans.
-------------------------------------------------------------------------------------
Bean Managed Transactions are meant for Sessiona and MessageDriven Beans
Entity Beans can use only Container managed Transactions
Praveena
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic