As you say it run in different environments, does it fail for all or work in some? In that case I suppose a configuration issue.
Does you set autocommit for the datasource, set explicit to false as it should not enabled.
- are you sure that the transaction annotations are the same for all environments, if there is no one the default is "required"
- are the data written to the db in any case, maybe the uncommitted data is never going to the db
- in case of Exception handling the problem might that checked Exceptions do not rollback (RuntimeEx do a rollback) the Tx
Hi Fink. Thanks for your reply.
Everythings works fine in Dev and QA env but issue appears only on Prod env.
We have checked 'persistance.xml' file. No configuration property related to 'autocommit' is defined there.
Transaction attributes are same for all environments.
We are looking against checked exceptions as per your suggestion.
I'm not sure, but it might be that the connection/database use autocommit by default in same case. Maybe on DB setup or (different) jdbc driver.
You might check that with a simple app and a debugger to stop between two actions.