maximum transaction duration

Hi all,

I’m now using the Tamino API for Java. Does anyone know if there are way(s) to enable / disable exception throw when a transaction is timed out? I remember previously I can get somewhat AccessFailureException, transaction wait for too long…blahblahblah…thrown when I try to insert 10000 records within a transaction in my program. But now, I can’t get the exception thrown again, the API will just rollback after 300 (default) seconds!!! Without notify me there is a timeout, resulting in I can just get around 3000 records inserted.

Many thanks and best regards,
Lun

The transaction and session timeout parameters are Tamino server parameters. The TaminoAPI4J (and all other APIs for that matter) are dependent on possible timeouts performed by the Tamino server. Once a transaction timeout hits, the Tamino server will automatically roll back the open transaction, i.e. all modification made during that transaction are undone. With the next command, Tamino will inform the caller that the transaction has been been rolled back. This you will see as an exception in the TaminoAPI4J, but then of course it is too late to do anything about it. All your updates (or inserts) have already been negated by the server. For an application that needs to perform a lot of updates or inserts in one go, you either need to set the transaction timeout very high or better chop the updates/inserts in manageable chunks each chunk being a separate transaction. Another option is to use the mass load utility.

best regards
Martin

Transaction and non-activity timeout parameters can normally be set at session start as parameters of the CONNECT statement (e.g. http:/myhost/tamino/mydb/mycoll?_CONNECT=*&_TRANSACTIONTIMEOUT=3600
&_NONACTIVITYTIMEOUT=3600)
If these parameters are not set, then the default parameters from the registry are taken. So, if the Tamino Java API allows setting these parameters, just use them with appropriate values.

Regards,
Hermann

Disclaimer: I do not know the Tamino Java API.

It is not possible to set the non activity and transaction timeout’s using the Tamino API for Java.

Thanks all, I think I get the answer of my unasked question from Stuart. Hope that the next version of Tamino API for Java will support changing the maximum transaction duration, as it is also dynamic server properties.