I’m using Tamino4J from within a servlet. When a call is made to my servlet that requires data to be sent to/taken from Tamino a connection is created and stored in context. A TLocalTransaction is obtained from this connection and setup to commit when the back-end process is successful or rollback and changes when there are problems. This all works successfully.
I have now had to build a process the current transaction periodically in some cases because large queries are causing the transaction to fail because they take so long. So I’m trying to get take the connection from my context and get the transaction from it and the commit. I tried
transaction = connection.useLocalTransactionMode()
but this gave me the following exception
com.softwareag.common.instrumentation.contract.ViolatedPrecondition: Violated Precondition: Currently no autocommit mode given. Local transaction mode cannot be initiated!
so then I tried using
transaction = (TLocalTransaction) connection.getTransaction();
but this doesn’t seem to do anything? no exception, and no time out
Should this work? Can I use getTransaction() to make a commit?
Thanks for your help