Hello again Alasdair,
I finally got around to test configuration of Aries Transaction. I created
the following configuration (using PID org.apache.aries.transaction):
aries.transaction.timeout=1
aries.transaction.howl.logFileDir=${karaf.data}/txlog/
I set the logfile directory as well as the transaction timeout (I peeked at
how they do it in Servicemix). I set the timeout to a low value in order to
test that I actually get a transaction timeout. I also perform a 5s sleep
in a transacted method to force a transaction timeout.
But, I never get a transaction timeout and I never get a transaction log
file in the "logFileDir" directory. I'm not beginning to fear that my
methods are not transacted. How can I verify this?
Under what circumstances would a transaction log file be created? I assumed
that it would be created when the first transaction was created. Or, do I
also need to add the following line?
aries.transaction.recoverable=true
I've tried that but still no logfile was created.
I also noticed that the default value for
"aries.transaction.howl.maxBuffers" is 0 while the default value for
"aries.transaction.howl.minBuffers" is 4. Is that correct? At first sight I
would think it should be the other way around.
/Bengt
2011/12/29 Bengt Rodehav <[email protected]>
> Thanks Alasdair - will look into it.
>
> /Bengt
>
>
> 2011/12/28 Alasdair Nottingham <[email protected]>
>
>> Hi,
>>
>> The pid for configuring transactions is "org.apache.aries.transaction".
>>
>> Alasdair
>>
>>
>> On 14 December 2011 14:33, Bengt Rodehav <[email protected]> wrote:
>>
>>> It turned out that my error was not due to the transaction timing out
>>> but to violation of unique constraints. Nevertheless, I would like to know
>>> how to control the transaction timeout in Aries transaction.
>>>
>>> /Bengt
>>>
>>>
>>> 2011/12/14 Bengt Rodehav <[email protected]>
>>>
>>>> Thanks for your reply David,
>>>>
>>>> I'll see if I can figure out the pid although this seems like something
>>>> that really needs to be documented in Aries. If the default timeout is 600
>>>> seconds then this is probably not the reason of the errors I see. I need a
>>>> time out of about 30 s which then is much less than the default.
>>>>
>>>> I have been using MySql but I'm in the process of switching to SQL
>>>> Server 2005. MySql worked fine but I started having problems committing the
>>>> longer transactions with SQL Server 2005 which caused me to suspect a
>>>> transaction timeout. Perhaps the timeout is not propagated to SQL Server
>>>> like you hinted.
>>>>
>>>> /Bengt
>>>>
>>>>
>>>> 2011/12/14 David Jencks <[email protected]>
>>>>
>>>>> Transaction is set up as a managed service factory. I haven't figured
>>>>> out exactly how this results in a tm instance without any visible
>>>>> configuration.
>>>>>
>>>>> If you can figure out what is triggering the creation of a tm and the
>>>>> pid, the property to set is called aries.transaction.timeout and the
>>>>> default value is 600 (seconds) or 10 minutes.
>>>>>
>>>>> If you thing some of the resource managers might be timing out
>>>>> earlier, let me know. I'm not sure we are propagating the tm timeout to
>>>>> the resource managers in each transaction.
>>>>>
>>>>> thanks
>>>>> david jencks
>>>>>
>>>>> On Dec 13, 2011, at 2:10 PM, Bengt Rodehav wrote:
>>>>>
>>>>> I use Aries JPA and Aries Transaction with OpenJpa. I have problems
>>>>> with some long transactions that time out (I think anyway). I cannot see
>>>>> where I can configure the transaction timeout for Aries Transaction. The
>>>>> only interaction I have with Aries Transaction is my blueprint definition
>>>>> where I create beans with transaction properties set and publish them as
>>>>> services. Below is an example of one of my blueprint definitions.
>>>>>
>>>>> Can anyone advice me as to how one can configure the transacation
>>>>> timeout? (and what is the default?)
>>>>>
>>>>> *<?xml version="1.0" encoding="UTF-8"?>*
>>>>> *<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*
>>>>> * xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>>>> xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0"*
>>>>> * xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0">*
>>>>> *
>>>>> *
>>>>> * <bean id="statementService"
>>>>> class="se.digia.skistory.domain.impl.StatementService">*
>>>>> * <tx:transaction method="*" value="Required" />*
>>>>> * <jpa:context property="entityManager" unitname="skistPU" />*
>>>>> * </bean>*
>>>>> *
>>>>> *
>>>>> * <service ref="statementService"
>>>>> interface="se.digia.skistory.domain.api.IStatementService">*
>>>>> * </service>*
>>>>> *
>>>>> *
>>>>> * <bean id="customerService"
>>>>> class="se.digia.skistory.domain.impl.CustomerService">*
>>>>> * <tx:transaction method="*" value="Required" />*
>>>>> * <jpa:context property="entityManager" unitname="skistPU" />*
>>>>> * </bean>*
>>>>> *
>>>>> *
>>>>> * <service ref="customerService"
>>>>> interface="se.digia.skistory.domain.api.ICustomerService">*
>>>>> * </service>*
>>>>> *
>>>>> *
>>>>> *</blueprint>*
>>>>>
>>>>> /Bengt
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>> --
>> Alasdair Nottingham
>> [email protected]
>>
>
>