Hi,
I am busy working on a system where there is a need to persist data into two tables - this is one transaction. We currently use Direct
JDBC but I am open to looking at other solutions (Hibernate,
EJB CMPs, etc).
The data in Table1 is inserted by an outside system and my application must update a row in the table if it exists (only one update to this table occurs in transaction).
The data in Table2 is inserted by my application for each field that is updated in Table1 - this is the audit trail of changes to Table1.
To prove the concept I currently build up all the SQL statements, insert them into a java.sql.Statement object as a batch and then execute the batch.
This is working fine during development but I dont want to get surprised in three months when we deliver to the client.
Thanks
Chris
[ March 09, 2006: Message edited by: Chris Brat ]
[ March 09, 2006: Message edited by: Chris Brat ]
[ March 09, 2006: Message edited by: Chris Brat ]