Lookup the UserTransaction and call setTransactionTimeout() on it before calling 
begin().  In the case of a non-JTA environment, there is no way to set the transaction 
timeout as transactions do not normally timeout, so it becomes irrelevant.  Of course, 
it would be possible, (even easy,) if there were a requirement, to implement a 
mechanism by which standard JDBC transactions were rolled back after a timeout, but I 
do not see a need for it right now.

ADK

> -----Original Message-----
> From: Christian Bauer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 19, 2004 10:05 AM
> To: Aaron Knauf
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Hibernate] Transaction Interface and timeouts
> 
> 
> On 19 May (09:57), Aaron Knauf wrote:
> 
> > How would you implement an async operation from an EJB?  
> And how would that help if your query takes longer than 30s?  
> It would still fail - just later.
> 
> Message Driven Beans
> 
> > Hibernate would implement setting the timeout through the 
> TransactionFactory mechanism.
> 
> And how exactly would it "set" or handle the timeout?
> 
> -- 
> Christian Bauer
> [EMAIL PROTECTED]
> http://hibernate.org/
> 
-----------------------------------------------------------------------------------------------
Have you seen our website?.... http://www.vodafone.co.nz

CAUTION: This correspondence is confidential and intended for the named recipient(s) 
only.
If you are not the named recipient and receive this correspondence in error, you must 
not copy,
distribute or take any action in reliance on it and you should delete it from your 
system and
notify the sender immediately.  Thank you.

Unless otherwise stated, any views or opinions expressed are solely those of the 
author and do
not represent those of Vodafone New Zealand Limited.

Vodafone New Zealand Limited
21 Pitt Street, Private Bag 92161, Auckland, 1020, New Zealand
Telephone + 64 9 357 5100
Facsimile + 64 9 377 0962


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to