Hi!

This is starting to become an chalenge...
You are having deadlock problems caused by two transactions waiting for each
other to terminate. This happens in Interbase default lock resolution
(WAIT).
(If you could set the default lock resolution to "NO WAIT" then the second
transaction would quit with a error and rolledback, but thats not what we
want and even if it was you can't set this parameter with Jonas)

The problem is that you have two beans being stored at the same time on two
transactions that update the same data.
Like :

transaction A: "update a set a=1"
transaction B: "update a set b=1"
transaction A: "update a set b=1"
transaction B: "update a set a=1"

DEADLOCK!!!!

This is catched by deadlock scans (every 10 seconds) that chooses one
transaction to win the race and gives an error to the other. You should have
an exception handler that rollbacks the transaction that looses so the other
can commit.
In other databases this would not happen cause they use locks!! (hugh!!).
Once you do an update to a row on a table this table/page or row become
locked and no other transaction can change it (it waits or gives error,
depends of the lock resolution). Interbase has the multigenerational aproach
that is much more flexible (it creates copys of the updated rows so other
transactions can see them unchanged and only cares about update
conflicts...)

BUT:

in this situation, Jonas controls everything and I dont know how to solve
it. Let me think a little more....
Offcourse if you used Bean Managed Persistence that would work, but i guess
that this is not an option.

Another try is using

datasource.isolationlevel    serializable

this should work but you get all the transactions serializabled and that
might hurt performance badly

Let try to solve this one...

Pedro Costa


----- Original Message -----
From: "Blasius Lofi Dewanto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, August 28, 2001 11:44 AM
Subject: Re: Your problem with Interbase


> Hi Pedro,
>
> thanks for the new driver. With this new interclient.jar
> the "java.lang.VerifyError" is solved.
>
> But now I'm getting the error, you have found before:
>
> ------------------------------------------------------------------------
> See API reference for exception interbase.interclient.DeadlockException
>  JContextEntity.storeIfModified raised EJBException
>  Failed to store bean to
> database:interbase.interclient.DeadlockException:
> [interclient][interbase] deadlock
> update conflicts with concurrent update
>
> See API reference for exception interbase.interclient.DeadlockException
>  JContextEntity.storeIfModified raised EJBException
>  Rollback during beforeCompletion in SubCoordinator.commit_one_phase
>  Commit local transaction -> rolled back!
>  Unreferenced: Stateless Session Bean in use!
> ------------------------------------------------------------------------
>
> Although I already put "datasource.isolationlevel read_commited"
> in my interbase.properties.
>
> datasource.name jdbc_openuss
> datasource.url jdbc:interbase:...
> datasource.isolationlevel    read_commited
> datasource.classname interbase.interclient.Driver
> datasource.username     ...
> datasource.password     ...
>
> Is the order of the datasource.isolationlevel entry important?
>
> Sorry for troubling you, but I'm really stuck now.
> I have no idea any longer... :-(
> What kind of environment do you use?
> I use JDK 1.3, JOnAS 2.3, InterBase 6, and
> InterClient 2 (with your new interclient.jar).
>
> Do you have any idea?
> --
> ---------------------------------------------------
> Blasius Lofi Dewanto
> ---------------------------------------------------
> OpenUSS - Open University Support System
> http://openuss.sourceforge.net
> ---------------------------------------------------
> E-Mail   : [EMAIL PROTECTED]
> ICQ      : 39343280
> ---------------------------------------------------

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to