WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Error while trying to recover from inactive connection

Re: Error while trying to recover from inactive connection

by Ludovic Orban-2 :: Rate this Message:

| View in Thread

Do you have a special need for manual enlistment? If not, I advise you to set automaticEnlistingEnabled back to true and try setting allowMultipleLrc to true and see if that helps.

Otherwise, you will have to wait as I don't know when I'll find time to work on this.


2011/5/31 rJassal <jassal.ravinderjit@...>

Thanks for the reply.

I will wait for your testing results.


Ludovic Orban-2 wrote:
>
> The automaticEnlistingEnabled property has nothing to do with the single
> LRC
> resource limitation. Unless you have a ver strong reason to manually
> enlist
> XAResources yourself you should leave that to true.
>
> BTW, you can disable the multiple-LRC enlistment check by enabling the
> allowMultipleLrc property on the transaction manager's configuration.
> Please
> just keep in mind that you're basically giving up the 2PC recovery
> guarantee
> when you use multiple LRC resources in a single transaction.
>
> Nevertheless, you may have found a bug which prevents resources configured
> for manual enlistment to be recovered. I'll do some testing in that area
> to
> make sure nothing's obviously broken.
>
>
> 2011/5/30 rJassal <jassal.ravinderjit@...>
>
>>
>> Hi All,
>>
>> I am working with non-XA database.
>>
>> I define two datasource in properties file also I am using property
>> 'testQuery' to check stale connection. But it shows errors for second
>> datasource.
>>
>> As Bitronix allows a single non-XA database to participate in a XA
>> transaction, I used the property 'automaticEnlistingEnabled' and set it
>> to
>> 'false'.
>>
>> Below is the error I am getting.
>> [bitronix.tm.recovery.Recoverer] (bitronix-recovery-thread:) error
>> running
>> recovery on resource 'jdbc/seconddb', resource marked as failed
>> (background
>> recoverer will retry recovery)
>> bitronix.tm.recovery.RecoveryException: cannot start recovery on a
>> PoolingDataSource containing an XAPool of resource jdbc/seconddb with 30
>> connection(s) (30 still available)
>>        at
>>
>> bitronix.tm.resource.jdbc.PoolingDataSource.startRecovery(PoolingDataSource.java:227)
>>        at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:253)
>>        at
>> bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:223)
>>        at bitronix.tm.recovery.Recoverer.run(Recoverer.java:138)
>>        at java.lang.Thread.run(Thread.java:662)
>> Caused by: bitronix.tm.internal.BitronixRuntimeException: cannot get
>> valid
>> connection from an XAPool of resource jdbc/jndinextgendb with 30
>> connection(s) (30 still available) after trying for 30s
>>        at
>> bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:156)
>>        at
>>
>> bitronix.tm.resource.jdbc.PoolingDataSource.startRecovery(PoolingDataSource.java:223)
>>        ... 4 more
>> Caused by: com.mysql.jdbc.CommunicationsException: Communications link
>> failure due to underlying exception:
>>
>> datasource properties.
>>
>> resource.ds2.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
>> resource.ds2.uniqueName=jdbc/firstdb
>> resource.ds2.allowLocalTransactions=true
>> resource.ds2.driverProperties.driverClassName=com.mysql.jdbc.Driver
>> resource.ds2.driverProperties.url=jdbc:mysql://localhost:3306/firstdb
>> resource.ds2.testQuery=SELECT current_timestamp
>>
>> resource.ds3.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
>> resource.ds3.uniqueName=jdbc/seconddb
>> resource.ds3.driverProperties.driverClassName=com.mysql.jdbc.Driver
>> resource.ds3.driverProperties.url=jdbc:mysql://localhost:3306/seconddb
>> resource.ds3.allowLocalTransactions=true
>> resource.ds3.automaticEnlistingEnabled=false
>> resource.ds3.testQuery=SELECT current_timestamp
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Error-while-trying-to-recover-from-inactive-connection-tp31730814p31730814.html
>> Sent from the Bitronix Transaction Manager mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>

--
View this message in context: http://old.nabble.com/Error-while-trying-to-recover-from-inactive-connection-tp31730814p31737601.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



 « Return to Thread: Error while trying to recover from inactive connection