Websphere Scheduler
Websphere Scheduler is using scheduler datasource XA driver . When task is executed by scheduler it is starti开发者_Python百科ng 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
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.
精彩评论