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

Usertransaction and Entity Beans

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic