Isolation level specified in JDBC data source not
Posted in 2012
Topics: Connectivity: ODBC / JDBC / .NET, Transactions, Locking & Isolation
I am using Glassfish 3.1.2 and Informix 11.7. Through the Glassfish administrative console, I have arranged for the setIfxIFX_ISOLATION_LEVEL method on an Informix DataSource implementation to be called with a value of 5. My database guru reports, when watching the connections that this pool makes, that the isolation level is NOT 5 (read committed with the "last committed" option). Are there any other places where I can specify this default isolation level in a way that Informix will use? Best, Laird -- http://about.me/lairdnelson --f46d0442835ccbd2b004c02e4ffd
You can set it in the SQL stream after connecting or you can have it set in the <username>.sysdbopen() function which is executed when the owner log into the server (if it exists). You can create a sysdbopen function to do things like set the default isolation level and set lock mode to wait without having to modify your applications. The sysdbopen function owned by user 'informix' is run for all users who do not have a private sysdbopen function if it exists. Similarly the server will execute the sysdbclose() function for the user whenever the session disconnects or closes the database. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, May 16, 2012 at 5:50 PM, Laird Nelson <ljnelson@gmail.com> wrote: > I am using Glassfish 3.1.2 and Informix 11.7. > > Through the Glassfish administrative console, I have arranged for the > setIfxIFX_ISOLATION_LEVEL method on an Informix DataSource implementation > to be called with a value of 5. > > My database guru reports, when watching the connections that this pool > makes, that the isolation level is NOT 5 (read committed with the "last > committed" option). > > Are there any other places where I can specify this default isolation level > in a way that Informix will use? > > Best, > Laird > > -- > http://about.me/lairdnelson > > --f46d0442835ccbd2b004c02e4ffd > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --90e6ba6e8eb8528c0c04c02ebab3
I believe your previous questions were already answered by Art.
Regarding this, you shoudl check which version of the JDBC driver you're
using. Make sure it's the last one if there isn't any reason to go with it.
Having said this it should work....
In any case, and I'm assuning you're starting something new, we can go a
bit back and talk about something I think no one mentioned...
Since version 11.1, when the LAST COMMITTED option was introduced, you can
set it system wide in $INFORMIXDIR/etc/$ONCONFIG by defining a parameter
called:
USELASTCOMMITTED
It can be set to:
None
Committed Read
Dirty Read
All
This is automatically promote the specified level of isolation level to
COMMITTED READ LAST COMMITTED
It can be a workaround your situation, although the most correct answer
would be to figure out what's wrong with the drver/parameter/glassfish
I personally don't like to use that on a system wide scope because the
applications may depend on the original levels. But if you're stating
something new and you feel comfortable, I don't see why you couldn't use it.
Regards.
On Wed, May 16, 2012 at 10:50 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> I am using Glassfish 3.1.2 and Informix 11.7.
>
> Through the Glassfish administrative console, I have arranged for the
> setIfxIFX_ISOLATION_LEVEL method on an Informix DataSource implementation
> to be called with a value of 5.
>
> My database guru reports, when watching the connections that this pool
> makes, that the isolation level is NOT 5 (read committed with the "last
> committed" option).
>
> Are there any other places where I can specify this default isolation level
> in a way that Informix will use?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d0442835ccbd2b004c02e4ffd
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--20cf3074d46208df2504c02f5201
On Wed, May 16, 2012 at 7:03 PM, Fernando Nunes <domusonline@gmail.com>wrote: > I believe your previous questions were already answered by Art. > Regarding this, you shoudl check which version of the JDBC driver you're > using. Make sure it's the last one if there isn't any reason to go with > it. Having said this it should work.... > Thanks, Fernando. It is indeed the latest version. Oh well. > Best, Laird -- http://about.me/lairdnelson --0016e6d5895e0f335104c02f8df6