You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Fabien JALABERT <fa...@laposte.net> on 2008/12/10 16:03:23 UTC

detecting timeout in service

Hello,

can somebody tell me what is done the timeout is over when I do a 
runSync("myService") in Java ? Can you give me a message or trace sample ?

Thanks a lot.





Re: detecting timeout in service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Please Fabien, remember this kind of question should be on user ML (you will not get much answers here)

From: "Fabien JALABERT" <fa...@laposte.net>
>
> Hello,
>
> can somebody tell me what is done the timeout is over when I do a runSync("myService") in Java ? Can you give me a message or
> trace sample ?

Not sure to well understand the question. But I guess the answer is : unless you use use-transaction="false" and there is not alredy 
a running transaction, each service is done in a transaction and in such case (time-out) the surrounding transaction is simply 
rolled back

Note that you can specify a transaction-timeout in seconds (defaults to 60) but it only works when a new transaction is started. By 
default, you can have a new transaction if there is not already a running transaction (in this case the service engine create a new 
transation for you by default, unless you use use-transaction="false") or if you set require-new-transaction to true. In latter case 
the new transaction can be embedded in an existing transaction.  A roll-back on the new transaction will also roll-back the 
surrounding transaction or all (2 transactions) is commited, if it's ok.

HTH

Jacques

> Thanks a lot.
>
>
>
>


Re: detecting timeout in service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Please Fabien, remember this kind of question should be on user ML (you will not get much answers here)

From: "Fabien JALABERT" <fa...@laposte.net>
>
> Hello,
>
> can somebody tell me what is done the timeout is over when I do a runSync("myService") in Java ? Can you give me a message or
> trace sample ?

Not sure to well understand the question. But I guess the answer is : unless you use use-transaction="false" and there is not alredy 
a running transaction, each service is done in a transaction and in such case (time-out) the surrounding transaction is simply 
rolled back

Note that you can specify a transaction-timeout in seconds (defaults to 60) but it only works when a new transaction is started. By 
default, you can have a new transaction if there is not already a running transaction (in this case the service engine create a new 
transation for you by default, unless you use use-transaction="false") or if you set require-new-transaction to true. In latter case 
the new transaction can be embedded in an existing transaction.  A roll-back on the new transaction will also roll-back the 
surrounding transaction or all (2 transactions) is commited, if it's ok.

HTH

Jacques

> Thanks a lot.
>
>
>
>