• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

A Couple of questions

 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Just two questions.
1)How to set ISOLATION LEVELS in an Entity Bean which is using CMP?
2)Why Stateless Bean cannot use BMT?
thanks,
Manjunath
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1)How to set ISOLATION LEVELS in an Entity Bean which is using CMP?


Setting isolation levels is not specified by the EJB specification. It is left to your app server, so check your vendor's documentation to see if they allow it and how.
There can be some really bad problems if you are not careful how you do this. I'd suggest at least reading Section 17.3.2 of the
EJB 2.0 Spec about isolation levels.


2)Why Stateless Bean cannot use BMT?


They can. The restriction is that Stateless Session Beans with Bean Managed Transactions must start and commit or rollback the transaction within the same method call. So a transcation can not span multiple methods - the reason is that there is no way to keep a reference to the in-work transaction since the bean is stateless.
Entity beans can not use BMT because the container has to be able to control the transaction since it must make calls to things like ejbLoad, ejbStore, etc. using the same transaction context set for a business method. If the business mehtod started the transaction, it is too late for the container to call ejbLoad using that transaction.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic