> Is there a way for torque and jta to play well together?
> 
> I would like jta to handle the transactions, which I understand requires 

> making sure that a DataSource is used for the database, which doesn't 
> seem to be a problem.
> 
> The generated torque code however uses a JDBC transaction instead - is 
> there a way to work around this at all?
> 

I am not really qualified to answer this, because I do not know how JTA 
works internally. So use healthy scepticism with the answer below.

With all external transaction frameworks, the problem is that at the 
moment, Torque does not have a "Transaction Info" object which is passed 
around in a transaction, it only passes a jdbc connection around (There is 
a Transaction object but it does not contain information about the current 
transaction). So the problem is that there is not really a way to pass 
transaction info around.

But maybe one can use a custom Data source providing a custom Connection 
wrapper object which contains the connection information and the 
transaction information. This would probably mean some ugly casts, and 
patches to the Torque Transaction object, but perhaps it could work.

   Thomas

Reply via email to