Dain Sundstrom wrote: > > Ole Husgaard wrote: > > There is a problem with holding on to a TxCapsule reference: > > TxCapsule instances are relatively heavy-weight, and may be > > reused to control other transactions. > > How heavyweight? If you scrap the reuse code, what is the performance > impact?
Not very heavyweight. Almost no state is reused for the next transaction. That leaves only the (empty) tables holding: - Synchronization objects. - XAResource objects. - XAResource states. - XAResource resource manager equality. - Branch XIDs for resource branches. The reuse code is actually very simple: - An int variable in the TxCapsule instance denoting the generation, incremented at each reuse. - A check for this variable whenever lock congestion requires we wait to get the lock. - A call to transactionImpl.setDone() to clear the txCapsule reference in the frontend when the transaction is terminated. - A static LinkedList of SoftReference to unused TxCapsule instances. > I am trying to push the discussion toward the simplest solution. I > rather have the system is easy to understand and maintain then a system > that is 1% faster. Agreed. This code ought to be simpler. I wouldn't mind scrapping the TxCapsule reuse code. And when TxCapsule instances are no longer reused, we no longer need a seperate TransactionImpl frontend. Should I try to give it a go? Best Regards, Ole Husgaard. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development