http://ofbiz.116.s1.nabble.com/OFBiz-Users-Transaction-timeout-tp136461p136463.html
is because the actions run _after_ the transaction is begun. It has
in a transaction.
context parameter in the web.xml file called TRANSACTION_TIMEOUT.
element in the screen def XML files. Just specify the number of
seconds for the timeout there. You can also use the
FlexibleStringExpander syntax in it (ie ${whatever}).
Enjoy...
> Hi Christopher,
>
> I too have noticed something similar and I'd like to help you find
> what is causing this problem.
> First of all:
>
> the value that you set in the TRANSACTION_TIMEOUT parameter is used
> in the following class:
>
> framework\widget\src\org\ofbiz\widget\screen\ModelScreen.java
>
> in the method "renderScreenString" (line 120)
>
> Could you try to add a few debug statements in that class to see if
> the parameter is correctly used?
> Also, you could test the value of the "beganTransaction" boolean
> variable returned in line 120:
>
> beganTransaction = TransactionUtil.begin(transactionTimeout);
>
> If it is false, this means that the transaction has been already
> started (with a different transaction timeout?) in a different
> place... if this is the case, maybe the transaction timeout set in
> line 120 is ignored?
>
> Hope this helps,
>
> Jacopo
>
>
> Christopher Farley wrote:
>> I've been having problems with transactions timing out. I first
>> noticed this when trying to import large XML files. I am now
>> trying to create a screen widget that calls a script that can take
>> a while to execute. I am
>> getting what I believe to be transaction timeout errors.
>> The not-too-helpful error message returned to the UI is: [problem
>> creating the newEntity value: SQL Exception occurred on commit
>> (Cannot commit a transactional connection: See JDBC 2.0 Optional
>> Package Specification section 7.1 (p25))]
>> This happens after about 65-70 seconds consistently. If I break
>> the task
>> down to smaller data sets that execute faster than this,
>> everything works
>> as expected, so I'm pretty sure I am not feeding corrupt data.
>> To set the TRANSACTION_TIMEOUT in a screen, I have been doing
>> something
>> like this:
>> <screen name="Whatever">
>> <actions>
>> <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>
>> </actions>
>> ....
>> </screen>
>> This seems to have no effect. I added a debug statement to the
>> TransactionUtil class, and the begin() method is always being called
>> with a value of "0". Is this the proper way to change the
>> transaction timeout? Is there something
>> else that might be timing out? Thanks for any help you can give...
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users