• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance Issues - Transaction Isolation Levels  RSS feed

 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I suppose, we can set Transaction Isolation Levels at the Bean Level as well as the method level.
Will setting Transaction Isolation Level at different Levels have an impact on Performance?Also, if we donot set Transaction Isolation Levels (since it is normally taken care by the DB), will it improve the EJB application performance.
Thanks in advance.
Regards,
Sandeep

  • Sun Certified Programmer for Java 2 Platform Scored 93 per cent
  • Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  • IBM Enterprise Connectivity with J2EE Scored 72 per cent
  • Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

  • [This message has been edited by Desai Sandeep (edited May 09, 2001).]
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transaction Isolation was explicitly set in the ejb 1 specification at deployment. Since the change to ejb 1.1 deployment descriptor this feature has been removed and is not available at deployment.

Will setting Transaction Isolation Level at different Levels have an impact on Performance?Also, if we donot set Transaction Isolation Levels (since it is normally taken care by the DB), will it improve the EJB application performance.

I think that some db's commit transactions whenever there is a change in the isolation level. This is what is being specified in the ejb 1.1 specification. It asks us not to change the transaction level once it has been set in a single transaction.
First i think that you can set the transaction isolation level only in an Entity with a BMP. This is through the connection object. You would say Connection.setTransactionIsolation().
To the issue of whether setting of transaction level at the method level or the class level i think that at the method level it would provide better performance. why one can ask. This is because in my opnion suppose if one method required transaction serializable isolation level. If you want to apply this then you would make the whole bean with an isolation of serializable. This would have an effect on performance for the whole bean.
At the method level you can make those beans that require a restrictive isolation level to a serializable while also making those beans that require a lower isolation level.

------------------

Mahindrakar
IBM Application Server Forum Moderator
Consultant - Zensar Technologies.
SCJP2 & SCJEA (Part I)
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mahindrakar,
Thanks for your response.
Yes, I agree that setting Isolation Levels at method level would give better performance than setting it at Bean Level.You can have more restrictive isolation levels at method level, that
at a Bean Level - taking the advantage of method level declared isolations overiding bean level declared isolations -- Correct??

I think, you can set Isolation Levels also for CMT Entity/Session Beans.The EJB Specs 2.0 mentions about this to be managed by data access classes provided by Persistence managed provider's tools - which needs to be in sync with that provided by what your DB Resource Manager supports.I presume the Specs wants to highlight tools like that shown in Ed Roman's book on Page 285
Now, given a choice of setting isolation levels, which one should we prefer from the performance prospective?Will setting isolation levels in the middle-tier hamper the performance?Should the DB be allowed to take care of the isolation levels, as it is closer to the data?
Please advise.
Regards,
Sandeep

  • Sun Certified Programmer for Java 2 Platform Scored 93 per cent
  • Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  • IBM Enterprise Connectivity with J2EE Scored 72 per cent
  • Enterprise Development on the Oracle Internet Platform Scored 44 out of 56


  • [This message has been edited by Desai Sandeep (edited May 09, 2001).]
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

set Isolation Levels also for CMT Entity/Session Beans

You cannot have Entity beans that are CMT's. This is definate. what is left is Session beans which can have CMT's.

Now, given a choice of setting isolation levels, which one should we prefer from the performance prospective?Will setting isolation levels in the middle-tier hamper the performance?Should the DB be allowed to take care of the isolation levels, as it is closer to the data?

I am sorry i cannot answer this question for now. I am myself looking out for this answer. Lets see if someone else has the Answer.
Anyone???
------------------

Mahindrakar
IBM Application Server Forum Moderator
Consultant - Zensar Technologies.
SCJP2 & SCJEA (Part I)
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mahindrakar,
I think, we can set Isolation Levels in the middle-tier for the Entity Beans.The following excerpt from EJB 2.0 Public Draft, suggests this:

For entity beans with container-managed persistence, transaction isolation is managed by the data access classes that are generated by the persistence manager provider´┐Żs tools. The tools
must ensure that the management of the isolation levels performed by the data access classes will not result in conflicting isolation level requests for a resource manager within a transaction.

The figure in Ed Roman's book on Page 285 looks like Persistence Manager Provider's tools.Did I get it wrong??
As regards setting isolation levels in the layers, I am looking forward to the group for their views.
Thanks,
Sandeep
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!