views:

166

answers:

1

Websphere Scheduler is using scheduler datasource XA driver . When task is executed by scheduler it is starting a global transaction, but in our application we are creating a new connection to another database and explicitly commiting the data and closing the connection. This data source configured using non-XA driver datasource. For the application we have also enabled the Accept heuristic hazard (Last participant support extension) . Now while running the scheudler we are getting the exception DSRA9350E: Operation Connection.commit is not allowed during a global transaction .

Can any one help me out in this

A: 

Your task runs in a transaction and probably you call commit in that transaction. So you should call your db operations, commit and close db outside that transaction. Create bean-managed transaction session bean

@TransactionManagement(TransactionManagementType.BEAN)

and move db and transaction related code into the new bean.

ondrej kosatka