wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes A Couple of questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "A Couple of questions" Watch "A Couple of questions" New topic

A Couple of questions

Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236
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?
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: A Couple of questions
Similar Threads
beanName property fo the jsp:useBean and exam
Mock Exam Q - confusing?
Two questions from HFEJB
JNDI naming and DI in EJB 3
WA #1.....word association