You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by ma...@ica.se on 2004/11/19 16:41:34 UTC

RE: Transaction timed out error

Hi,

I'm running into the same problems, although it's only happening when concurrent threads are trying to retrieve a broker from the pool (after the timeout). I've set my poolsize to max 1 (with no growing), and still, after a timeout, I can get two
threads to actually receive a broker from the pool. It seems like they're getting the exact same broker instance, which explains why it will be in a transaction by the time the second thread is trying to begin its transaction.

Before the timeout, a NoSuchElementException would have been thrown if I was trying to do the same thing, so something must have gone terrebly wrong during the timeout. In fact, IBM has posted some information about this issue at:

http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&uid=swg1PQ72575 (describing the problem(
http://www-1.ibm.com/support/docview.wss?uid=swg27005042 (stating that it's been fixed)

Still, the "transaction has timed out"-message is written to the log without an exception being thrown. This meens OJB goes on happily, unknowing that anything went wrong, until it tries to do anything with the timed out connection. Along the way, my
guess is that the broker's state becomes invalid, the pool gets corrupted etc.

Anyway, did you ever find a solution to this problem?

Regards,

Mattias




I don't know if I was clear describing the problem. Here's the summary of what happened:

After a container managed transaction timed out in WAS 5.0.2 server it's impossible to get any broker using
createPersistenceBroker method of PersistenceBrokerFactory class.

Could anyone, please, confirm that this is either a new issue or a known problem? Also if this is a known
problem would anyone tell me if there is a solution for it?

Thank you,
Max.

 -----Original Message-----
From:       Vesely, Max [IT]
Sent: Friday, October 29, 2004 8:07 AM
To:   ojb-user <at> db.apache.org
Subject:    Transaction timed out error

Hello,

I'm using OJB version 1.0 rc6 in managed environment with WebSphere 5.0.2 application server. I only
utilize Persistence Broker API.

Under some circumstances the transaction, I begin using declarative transaction support of EJB
container, times out due to unavailability of some database resource. When this happens I get the
following error message in WAS system out log:

[10/28/04 16:52:12:192 EDT]   226649 CoordinatorIm I WTRN0066W: Transaction (164)
0001bba9:0000000180a414ca601162f4df806ca3b99ae6ca3a93fb6cb472f1[] has timed out after 120 seconds.

After this "time out" error I'm unable to get any Persistence broker from the pool. Here's an error I keep getting:

Caused by: org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed, using PBKey
org.apache.ojb.broker.PBKey: jcdAlias=DS, user=null, password=null

Here's some of the exception stack I get:

Caused by: org.apache.ojb.broker.PBFactoryException: Error while try to participate in JTA transaction
      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:112)
      at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:104)
      ... 39 more
Caused by: org.apache.ojb.broker.PBFactoryException: Unexpected exception when start intern pb-tx
      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:106)
      ... 40 more
Caused by: org.apache.ojb.broker.TransactionInProgressException: ConnectionManager is already in transaction
      at org.apache.ojb.broker.core.PersistenceBrokerImpl.beginTransaction(PersistenceBrokerImpl.java:386)
      at org.apache.ojb.broker.core.DelegatingPersistenceBroker.beginTransaction(DelegatingPersistenceBroker.java:138)
      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl$PersistenceBrokerSyncImpl.internBegin(PersistenceBrokerFactorySyncImpl.java:208)
      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl$PersistenceBrokerSyncImpl.access$000(PersistenceBrokerFactorySyncImpl.java:162)
      at org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance(PersistenceBrokerFactorySyncImpl.java:90)

Is there something I failed to do when I first got an error?
And if not:
Is this a known issue in my version? Are there a fix available in more recent versions?

Any help will be greatly appreciated.
Thank you,
Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe <at> db.apache.org
For additional commands, e-mail: ojb-user-help <at> db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org