I wrote a Java application to add articles to a Joomla site.
I’m using JDBC to connect and run queries on Mysql database.
To create an article I need to run a query on _contents table (an insert) and 3 queries on _assets table (Two Updates & One Insert).
the three queries that should be executed on _assets table are used to insert an item to a “Nested List Tree”; so if one of these queries fail the Nested List Tree will break.
My program is accessing to database from a remote system (So Internet connectivity problems or anything else can interrupt queries).
How can I get sure that all three queries run with each other without any of them get missed?
Thanks
I think transactions is what you are looking for.
http://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html