On Friday 01 November 2002 08:58 am, Langelage, Frank wrote:
> Neal Sanche wrote:
> >Hi All,
> >
> >For the most part, the default transaction timeout of 5 minutes is
> >reasonable for my application. However there is one operation that
> >the server needs to perform that, depending on the size of the
> > files involved, can take 20 minutes, an hour, or more.
> >
> >I'm interested in setting the transaction timeout for specific
> >transactions to something much higher. Is that possible? I'm using
> >JBoss 3.0.3, not using Tyrex, and Jetty for the web container.
> >
> >Thanks for any advice.
> >
> >-Neal
>
> You can use a UserTransaction and set the TransactionTimeout:
>
>         javax.transaction.UserTransaction trans;
>
>          trans = (javax.transaction.UserTransaction)ctx.lookup(
> "UserTransaction" );
>          trans.begin();
>          trans.setTransactionTimeout( 86400 );
>
>
>         if ( error )
>             trans.rollback();
>         else
>             trans.commit();

For the most part I've been using Container Managed transactions. So 
for my Session EJB, I would create the UserTransaction before calling 
the session EJB? What would I set the transaction level to for the 
Session bean method?

I'll have to read through the EJB spec regarding transactions and 
learn more about that. Thanks.

-Neal


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to