The problem is as follows:
I need to start "global" transaction in certain "main" thread.
Then a few "child" threads started in "main" thread and all of these threads share that "global" transaction.
Main thread waits until each of child thread finishes and then commits (or rollbacks) the changes made in the child threads.

Unfortunately neither the task can be simplified and made single threaded nor the specific changes can be made in data schema, e.g. adding 'validity' flags to the tables the mentioned threads operating with.

I guess it's possible in JTA as the spec says "Multiple threads may concurrently be associated with the same global transaction." - JTA 1.1, section 3.2, page 13.

My application is deployed on a pretty ordinary servlet container (Jetty) and one transaction manager is used - DataSourceTransactionManager.
DB is Oracle (and AFAIK it does support nested transaction so the "shared" transaction is possible, at least theoretically).

Could you please point me to the right direction?
Any help is greatly appreciated.