Howdy,
We are in the process of moving our app of considerable size up from
jonas 1.6.1 to 2.1.1. We are very excited because we have seen a very
large performance gain! Good work folks!!!! We have run into one problem
that is blocking us, and I need some help tracking down how to solve it.
A little basics about our architecture first. We've set it up using Session
Beans as public api's who in turn call entity beans and other session beans
to accomplish their task. This makes for course grained API's and minimizes
the chatter between our client and the server.
One of the things we've noticed is that the overhead of creating
transactions, is enough that we want to aviod it when we are doing only
things that don't need to be in a transaction. The results of this is that
at some points we run into the following problem. If a method with
TX_SUPPORTS calls another method with TX_SUPPORTS and then calls a
TX_REQUIRED it appears that a connection is being placed back into the
connection pool with an XA_RESOURCE still attached to the transaction
created in the TX_REQUIRED method. Then at some point in the future, this
connection comes out of the pool, and breaks when it is used inside a
transaction because it still seems to be pointing to the old transaction.
In some ways this appears to be a race condidition of some sort, as we
generally need to run a couple client threads to see it happen. It is
slightly harder to reproduce on Solaris then it is on WinNT4.0. I'm
attaching some code that can be used to reproduce the problem. I'd like some
pointers on how this Connection is ending up in a confused state.
It looks to me like there has been a lot of evolutionary code in this area
of the system - so its kind of hard to follow.
This is very critical for us as that now that we gone and done the work to
move up to 2.1.1 and found the wonderful performance increase we really want
to use it. This one thing is the only thing that is blocking us from moving
up.
Find sample code attached. Untar into the examples sample directory. This
will create a new sample, pb. There is futher information about the problem
and how to reproduce it in the README file.
I look forward to working on killing this bug with you,
-gabe
pb.tar.Z