|>It is impossible to call recover in SpySession.java
|>
|>here is why:
|>
|>
|>    if ( transacted ) {
|>          throw new IllegalStateException( "The session is transacted" );
|>       }
|>    if ( !transacted ) {
|>             throw new IllegalStateException( "The session is not
|>transacted"
|>);
|>          }
|>
|>This obviously doesnt make sense.


LOL

marcf

|>nontransacted session and have my unacknowledged messages
|redelivered. Here
|>is the code that needs to be fixed:
|>
|>==================================================================
|==========
|>=====
|>
|>   //Rollback a transacted session
|>    public synchronized void rollback()
|>       throws JMSException {
|>
|>       synchronized ( runLock ) {
|>
|>          if ( spyXAResource != null ) {
|>             throw new javax.jms.TransactionInProgressException( "Should
|>not
|>be call from a XASession" );
|>          }
|>          if ( closed ) {
|>             throw new IllegalStateException( "The session is closed" );
|>          }
|>          if ( !transacted ) {
|>             throw new IllegalStateException( "The session is not
|>transacted"
|>);
|>          }
|>
|>          // rollback transaction
|>          try {
|>             connection.spyXAResourceManager.endTx( currentTransactionId,
|>true );
|>             connection.spyXAResourceManager.rollback(
|currentTransactionId
|>);
|>          } catch ( javax.transaction.xa.XAException e ) {
|>             throw new SpyJMSException( "Could not rollback", e );
|>          } finally {
|>             try {
|>                currentTransactionId =
|>connection.spyXAResourceManager.startTx();
|>             } catch ( Exception ignore ) {
|>             }
|>          }
|>
|>       }
|>    }
|>
|>
|>    public synchronized void recover()
|>       throws JMSException {
|>       if ( closed ) {
|>          throw new IllegalStateException( "The session is closed" );
|>       }
|>       if ( transacted ) {
|>          throw new IllegalStateException( "The session is transacted" );
|>       }
|>
|>       rollback();
|>
|>    }
|>
|>
|>_______________________________________________________________
|>
|>Don't miss the 2002 Sprint PCS Application Developer's Conference
|>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
|>
|>_______________________________________________
|>Jboss-development mailing list
|>[EMAIL PROTECTED]
|>https://lists.sourceforge.net/lists/listinfo/jboss-development
|
|
|
|_________________________________________________________________
|Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
|
|
|_______________________________________________________________
|
|Don't miss the 2002 Sprint PCS Application Developer's Conference
|August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to