Hey,
look in jboss.jcml and almost at the top there is the transaction mbean. You
will find there the transaction timeout value, that overrides the one in the
code.
Simon
> -----Original Message-----
> From: sujith s.pillai. [mailto:[EMAIL PROTECTED]]
> Sent: mercoledì 4 aprile 2001 21:48
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] Transaction timeout
>
>
> Hi,
>
> I am not sure whether this is the right forum for
> posting this doubt. I have already sent this to jboss
> users' forum. Sorry for the cross-posting.
>
> I am running JBoss 2.1 alongwith Jetty 3.0.2 / JDK
> 1.3.
>
> We have a stateful session bean running with bean
> managed transaction. It has got the transaction
> boundaries set as follows:
> getFirstName() is where the transaction is initiated
> by UserTransaction.begin(). In getNextName(), the
> transaction is committed by UserTransaction.commit().
>
> Now, the two methods are invoked by two different
> servlets. When the user calls the first servlet, it
> calls the bean's getFirstName() method, and fetches
> the values for us. When the user clicks on the "Next"
> button on the form, the second servlet is invoked, and
> it calls the bean's getNextName() and fetches the
> required values; and commits the transaction.
>
> Our problem is, when the user invokes the first
> servlet, and then, chooses to remain idle for more
> than 5 minutes, the transaction gets timed out, and
> then, if we try to invoke the second servlet, it gives
> a RollbackException in the getNextName().
>
> This is because the org.jboss.tm.TxManager class has
> got the timeout value hard-coded in it as :
> ----START OF JBOSS SOURCE CODE-------------
>
> /**
> * Default timeout in milliseconds.
> * Must be >= 1000!
> */
> long timeOut = 5*60*1000;
>
> ----END OF JBOSS SOURCE CODE---------------
>
> Because of this, we cannot let the user remain idle
> for more than 5 minutes.
>
> However, our application, which is a conversion
> project from AS/400, needs to have the timeout set to
> a higher limit as in the earlier AS/400 version of the
> application.
>
> Can we change this timeout value in the
> org.jboss.tm.TxManager class, without affecting
> anything else?
>
>
> Thanks,
> Sujith.
>
> Additional info:
>
> From the org.jboss.tm.TxCapsule class:
>
> ------------JBOSS SOURCE CODE-----------------------
> /**
> * Create a new TxCapsule.
> *
> * @param tm The transaction manager for this
> transaction.
> * @param timeout The timeout for this transaction
> in milliseconds
> * (timeouts are not yet
> implemented).
> */
> TxCapsule(TxManager tm, long timeout)
> {
> this(tm);
>
> status = Status.STATUS_ACTIVE;
>
> start = System.currentTimeMillis();
> this.timeout =
> TimeoutFactory.createTimeout(start+timeout, this);
> branchXids = new HashMap();
> }
> ----------END OF JBOSS SOURCE CODE--------------------
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development