Hi to all,
I had spend a few days trying to solve a problem that is now a headache. Probably I forget something or I can´t be able to see the solution for myself, so I'll be pleased is someone can help me to get a solution.
I'm developing an application with is own and old persistence layer. This persistence layer uses transactions to operate with the database (I'll name them "legacy transactions"). This persistence layer make CRUD operations (create, read, update and delete) in some tables of the database (old tables)
Well, actually we're developing new modules for this application and we're using hibernate instead of the old persistence layer, so the new modules are using hibernate transactions to operate with the new tables in the database.
The problem appears when is necessary write or update in old and new tables simultaneously in an unique ACID operation. There are a persistence layer for the old tables and hibernate for the new tables, so the write or update operation in the old table is made with "legacy transactions" and the write or update operation in the new table is made with hibernate transactions.
I've tried to solve the problem in a few ways, but I'm able to write or in old tables or in new tables, never in both. Before explain you my "experiments" I'll pleased if someone can explain me if this unique ACID operation with two transactions is possible. If not, I'll study another alternatives.
Thanks in advance for your time and sorry for my English :),
Raúl
|