-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Isolation levels/transactions for session EJBs
PostPosted: Mon Jan 10, 2005 8:37 am 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
From reading the documentation and the hibernate in action book (page 165 - setting an isolation level) my understanding is that the isolation level cannot be changed for conenctions obtained from a datasource in a managed environment.

We are using Websphere 5.1, Session Beans calling hibernate code via Spring, conenction to DB2 UDB for iSeries

What we are finding is that in a multi-user test, the whole files are getting locked - this to me is consistent with an isolation level of read uncommited.

When setting up an iSeries datasource I can't see an option to set a default transaction isolation level - when writing manual SQL stuff we have always set the isolation level on the session bean.

Can someone clarify where I should be setting the isolation level so that the default is repeatable read ? Is it in the hibernate properties file, on the session bean, or on the datasource ?

_________________
On the information super B road


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 8:48 am 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
Sorry, I answered my own question - it was a Monday morning.....

You set the "transaction isolation" property on the datasource to be "repeatable read".

_________________
On the information super B road


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 10:03 am 
Beginner
Beginner

Joined: Wed Nov 24, 2004 10:54 am
Posts: 48
Hi Paul, I am having was I believe is a concurrency problem with my Java app running on an iSeries. I am seeing SQL errros (SQL99999) and when I do my research, this error can happen when my isolation level is not set correctly and/or my autocommit is set on. My issue is that our physical files on the iSeries are NOT journaled. That means I can not have transactions. This limits me in what I can do. Would you have any suggestions how to get around this type of issue?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 1:13 pm 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
jiseller wrote:
My issue is that our physical files on the iSeries are NOT journaled. That means I can not have transactions. This limits me in what I can do. Would you have any suggestions how to get around this type of issue?


There is no way you can have transactions (well on DB2 for iSeries at least, who knows for other things), without having your physical files journalled. This is because the transaction has to do eitehr a commit or a rollback depending on whether it worked or not, the job has to be running under commitment control (you don't have to worry about that, the JT400 JDBC driver handles all that for you).

Setting up journalling on tables is a very trivial task - what's the issue with them not being journalled ?

This may be teaching you to suck eggs, but if you want to journal them, creat a journal receiver using CRTJRNRCV, create a journal using CRTJRN, specifying the journal receiver you just created, then start journalling on each table via the STRJRNPF command. If you set up a PDM option to start journalling that will make things easier.

_________________
On the information super B road


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.