users@glassfish.java.net

Glassfish UserTransaction transaction-timeout functionality ??

From: <glassfish_at_javadesktop.org>
Date: Mon, 14 Jul 2008 07:08:44 PDT

we use Methodes in SLSB for updating the database see the code-snippet :

----------------------------------------------------------------------------------
 UserTransaction tr = LookupService.createUserTransaction(new InitialContext());
 tr.setTransactionTimeout(4);
 tr.begin();
        process();
 tr.commit();

----------------------------------------------------------------------------------

when we try this Bean with a process that consumes more than 20 second's
we should get a TransactionTimeoutException after 4 seconds

this doesn't work !

so we have to wait for 20 seconds to get a RollbackException !

is it possible to get immediately after transaction-timeout occurs ?
[Message sent by forum member 'thomas_x' (thomas_x)]

http://forums.java.net/jive/thread.jspa?messageID=286421