I have a doubt in Transactions with respect to Container Managed Persistant Entity beans. I read some notes on Transactions which states that, with ejb(CMP), to specify Transaction Isolation level such as Transaction_Read_Committed, we have to depend on the container tools(or some sort of it). And the notes further states that as we cannot mention the same in Deployment Descriptors for the bean, it is not possible to set/use Transaction Isolation levels with CMP.. With BMP and Session beans, we can directly write the database code in which we can set transaction isolation levels, for example, with jdbc Connection interface, we can set the Isolation levels
So Please any one help me how to achieve Transaction Isolation in case of CMP Beans...
Thanks in advance,
There are some development enviroment which provides the functionality to set the Transaction Isolation level.Visual Age is one of the example. Another thing is From EJB specs 1.1 onwards Transaction Isolation levels are not required for cmp beans as it is done by the container it self. So you don't worry about it.
First of all thanks for your response.. Infact I didn't work with any tools so far in my ejb development, so at this moment,I'm unaware of what you'r explaining. I would surely look for that...
But now some questions arise.... If the container takes care of transactions(For CMP beans) is the point here, my question
is, what kind of transaction isolation it uses? Further more, the users of ejb must have the flexibility to
specify what kind of isolation they want... Does the container provide the tools to speficy this?
I'm just asking this question because,different transaction isolation levels have different impact on the performance....for example, the strongest isolation level, that is TRANSACTION SERIALIZABLE is going to make a lot of resource usage(may be because of the external locking of resources)...
You can specify the transaction in the deploment Descriptor in the <container-transaction> element
<trans-attribute>..any one of the six
for more info chekc the Monson-Haefel Oreilly 3rd Edition