On 2002.12.09 13:52:54 -0500 Dain Sundstrom wrote: > On Monday, December 9, 2002, at 12:34 PM, David Ward wrote: > > > I guess my fundamental question is, is it a transaction that has a > > reference to a thread (which seems pretty limited - probably for good > > reasons initially), or is it the thead that carries the reference to > > the transaction (context)? If it's the later, that's when I suggested > > that InheritableThreadLocal could come into service. Each spawned > > thread could still access the tx from the InheritableThreadLocal. If > > it's the prior, then I'll have learned something and retract with my > > tail between my legs - no problem. > > I think you would have a very difficult time building a transaction > manager that could allow multiple threads in a single transaction. > Just to start with, you would have a huge problem with serialized > isolation. Then you would have a big problem with connectors as > everyone assumes you only have one thread in a tx at a time (this is a > huge step forward from the days when you could only have a single > thread per tx and it always had to be the same one... old junk).
That explains a lot :-)) > > Anything is possible, but is it worth it, when you can get 95% of the > need from a JMS queue and new transactions? Well, the jms messages aren't processed in the same tx, so the semantics are very different from a hypothetical original implementation with resources accessed in one thread serially. I think it could work ok if you prevented 2 threads from ever accessing the same connector within one transaction. (For imported transactions, this would be "within the same external method call in the transaction" so different external method calls could be imported in different threads even within one (externally controlled) transaction) Ole suggested sending the prepare and commit messages from the tx manager all at once in different threads. I don't think the tx manager would have a problem supporting this (lots of threads doing work in a tx), it's the consistency... david jencks > > -dain > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user