The problem is in the following. There is Websphere 8.5 application server where is set up XA datasource. And there is an application which is written on Spring 3.2.2 with Hibernate 4.1.7. I have a DAO class which has one persist() method marked with @Transactional annotation and should just persist an object to the database. As a result it returns persisted object with id (hibernate performs request for the new one), but actually the object is not written to the database and there are no stacktraces in the logs. TransactionSynchronizationManager.isActualTransactionActive() returns true in the method persist().
All persistence objects are configured with annotations.
Spring configuration is in xml-form and looks like this:
Do you have any ideas how could I make DAO save an object to the database?
And there are no other transactions in that unit flow? In other words, are there other resources involved, that could have caused a rollback, which cascaded to your persist? E.g. you can have 2 datasources, this one succeeded and the other one failed, and since you are using XA, I guess you are capable of multi-resource rollback.