What I'm trying to do is update two distributed databases (MySQL) inside the one User Transaction. I have two session objects - one for each database configuration. The problem is, if the first database is not updated properly then the second one should not be updated also - i.e. the whole user transaction should be rolled back. This however is not the case - the second database is still being updated.
I have already looked at the "extended Session pattern for long Conversations" (
http://www.hibernate.org/43.html). However, this is not so useful because the example given only updates the one database.
If anyone can shed some light on the matter that would be greatly appreciated.