geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santosh Koti" <Santosh_K...@infosys.com>
Subject Transaction timeout exception ?!
Date Thu, 01 Jun 2006 14:19:23 GMT





Hi all,



I am getting transaction timeout exception , may I know the
reasons/workaround for it?



I guess this the container is try ing to commit, but is waiting for the
DB to accept the request ?



Here is the following code snippet from Geronimo
TransactionImpl.java(commit ()) :



-------------Begin-----------------

                                       //Transaction method, does 2pc
221 public void commit() throws HeuristicMixedException
<http://www.kickjava.com/3071.htm> , HeuristicRollbackException
<http://www.kickjava.com/3072.htm> , RollbackException
<http://www.kickjava.com/3072.htm> , SecurityException
<http://www.kickjava.com/1840.htm> , SystemException
<http://www.kickjava.com/2975.htm>  {
222         beforePrepare();
223
224         try {
225                       boolean timedout = false;
226                       if (TransactionTimer.getCurrentTime() >
timeout)
227                       {
228                           status = Status.STATUS_MARKED_ROLLBACK;
229                           timedout = true;
230                       }
231
232             if (status == Status.STATUS_MARKED_ROLLBACK) {
233                 rollbackResources(resourceManagers);
234                               if(timedout)
235                               {
236                                   throw new RollbackException
<http://www.kickjava.com/3072.htm> ("Transaction timout");
237                               }
238                               else
239                               {
240                                   throw new RollbackException
<http://www.kickjava.com/3072.htm> ("Unable to commit");
241                               }
242             }
243             synchronized (this) {
244                 if (status == Status.STATUS_ACTIVE) {
245                     if (this.resourceManagers.size() == 0) {
246                         // nothing to commit
247 status = Status.STATUS_COMMITTED;
248                     } else if (this.resourceManagers.size() == 1) {
249                         // one-phase commit decision
250 status = Status.STATUS_COMMITTING;
251                     } else {
252                         // start prepare part of two-phase





-------------End--------------------

Thanks,

Santosh.

"Don't talk about yourself; it will be done when you leave. "





**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of
the addressee(s). If you are not the intended recipient, please notify the sender by e-mail
and delete the original message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are unlawful. This e-mail
may contain viruses. Infosys has taken every reasonable precaution to minimize this risk,
but is not liable for any damage you may sustain as a result of any virus in this e-mail.
You should carry out your own virus checks before opening the e-mail or attachment. Infosys
reserves the right to monitor and review the content of all messages sent to or from this
e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys
e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
Mime
View raw message