I don't need any debugging lines any more, but could you change it back to
use standard jboss formatting? (no tabs, 3 spaces at least)
Thanks!
david jencks
On 2001.11.18 23:06:04 -0500 David Maplesden wrote:
> User: dmaplesden
> Date: 01/11/18 20:06:04
>
> Modified: src/main/org/jboss/mq/pm/rollinglogged SpyTxLog.java
> Log:
> Remove debugging line (you don't need it anymore David J?)
>
> Revision Changes Path
> 1.5 +100 -100 jbossmq/src/main/org/jboss/mq/pm/rollinglogged/SpyTxLog.java
>
> Index: SpyTxLog.java
> ===================================================================
> RCS file:
>/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/pm/rollinglogged/SpyTxLog.java,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- SpyTxLog.java 2001/11/10 21:38:05 1.4
> +++ SpyTxLog.java 2001/11/19 04:06:04 1.5
> @@ -18,107 +18,107 @@
> *
> * @created August 16, 2001
> * @author: Hiram Chirino ([EMAIL PROTECTED])
> - * @version $Revision: 1.4 $
> + * @version $Revision: 1.5 $
> */
> public class SpyTxLog {
>
> - /////////////////////////////////////////////////////////////////////
> - // Attributes
> - /////////////////////////////////////////////////////////////////////
> - private IntegrityLog transactionLog;
> - private int liveTransactionCount = 0;
> - private Object counterLock = new Object();
> -
> - /////////////////////////////////////////////////////////////////////
> - // Constructors
> - /////////////////////////////////////////////////////////////////////
> - SpyTxLog( File file )
> - throws JMSException {
> - try {
> - transactionLog = new IntegrityLog( file );
> - } catch ( IOException e ) {
> - throwJMSException( "Could not open the queue's tranaction
> log: " + file.getAbsolutePath(), e );
> - }
> - System.out.println("created SpyTxLog: " + this);
> - new Exception().printStackTrace();
> - }
> -
> - /////////////////////////////////////////////////////////////////////
> - // Public Methods
> - /////////////////////////////////////////////////////////////////////
> - public synchronized void close()
> - throws JMSException {
> - try {
> - transactionLog.close();
> - } catch ( IOException e ) {
> - throwJMSException( "Could not close the queue's tranaction
> log.", e );
> - }
> - }
> -
> - public synchronized void delete()
> - throws JMSException {
> - try {
> - transactionLog.delete();
> - } catch ( IOException e ) {
> - throwJMSException( "Could not delete the queue's tranaction
> log.", e );
> - }
> - }
> -
> -
> - public void createTx()
> - throws JMSException {
> - synchronized ( counterLock ) {
> - ++liveTransactionCount;
> - }
> - }
> -
> - public boolean completed()
> - throws JMSException {
> - synchronized ( counterLock ) {
> - return ( liveTransactionCount == 0 );
> - }
> - }
> -
> -
> - public synchronized void restore( java.util.TreeSet result )
> - throws JMSException {
> - try {
> - result.addAll( transactionLog.toTreeSet() );
> - } catch ( Exception e ) {
> - throwJMSException( "Could not restore the transaction log.",
> e );
> - }
> - }
> -
> - public synchronized void commitTx( org.jboss.mq.pm.Tx id )
> - throws JMSException {
> -
> - try {
> - transactionLog.addTx( id );
> - transactionLog.commit();
> - synchronized ( counterLock ) {
> - --liveTransactionCount;
> - }
> - } catch ( IOException e ) {
> - throwJMSException( "Could not create a new transaction.", e
> );
> - }
> -
> - }
> -
> - public void rollbackTx( org.jboss.mq.pm.Tx txId )
> - throws JMSException {
> - synchronized ( counterLock ) {
> - --liveTransactionCount;
> - }
> - }
> -
> -
> - /////////////////////////////////////////////////////////////////////
> - // Private Methods
> - /////////////////////////////////////////////////////////////////////
> - private void throwJMSException( String message, Exception e )
> - throws JMSException {
> - JMSException newE = new SpyJMSException( message );
> - newE.setLinkedException( e );
> - throw newE;
> - }
> + /////////////////////////////////////////////////////////////////////
> + // Attributes
> + /////////////////////////////////////////////////////////////////////
> + private IntegrityLog transactionLog;
> + private int liveTransactionCount = 0;
> + private Object counterLock = new Object();
> +
> + /////////////////////////////////////////////////////////////////////
> + // Constructors
> + /////////////////////////////////////////////////////////////////////
> + SpyTxLog( File file )
> + throws JMSException {
> + try {
> + transactionLog = new IntegrityLog(
> file );
> + } catch ( IOException e ) {
> + throwJMSException( "Could not open
> the queue's tranaction log: " + file.getAbsolutePath(), e );
> + }
> + System.out.println("created SpyTxLog: " +
> this);
> + //new Exception().printStackTrace();
> + }
> +
> + /////////////////////////////////////////////////////////////////////
> + // Public Methods
> + /////////////////////////////////////////////////////////////////////
> + public synchronized void close()
> + throws JMSException {
> + try {
> + transactionLog.close();
> + } catch ( IOException e ) {
> + throwJMSException( "Could not close
> the queue's tranaction log.", e );
> + }
> + }
> +
> + public synchronized void delete()
> + throws JMSException {
> + try {
> + transactionLog.delete();
> + } catch ( IOException e ) {
> + throwJMSException( "Could not delete
> the queue's tranaction log.", e );
> + }
> + }
> +
> +
> + public void createTx()
> + throws JMSException {
> + synchronized ( counterLock ) {
> + ++liveTransactionCount;
> + }
> + }
> +
> + public boolean completed()
> + throws JMSException {
> + synchronized ( counterLock ) {
> + return ( liveTransactionCount == 0 );
> + }
> + }
> +
> +
> + public synchronized void restore( java.util.TreeSet result )
> + throws JMSException {
> + try {
> + result.addAll( transactionLog.toTreeSet()
> );
> + } catch ( Exception e ) {
> + throwJMSException( "Could not restore
> the transaction log.", e );
> + }
> + }
> +
> + public synchronized void commitTx( org.jboss.mq.pm.Tx id )
> + throws JMSException {
> +
> + try {
> + transactionLog.addTx( id );
> + transactionLog.commit();
> + synchronized ( counterLock ) {
> + --liveTransactionCount;
> + }
> + } catch ( IOException e ) {
> + throwJMSException( "Could not create
> a new transaction.", e );
> + }
> +
> + }
> +
> + public void rollbackTx( org.jboss.mq.pm.Tx txId )
> + throws JMSException {
> + synchronized ( counterLock ) {
> + --liveTransactionCount;
> + }
> + }
> +
> +
> + /////////////////////////////////////////////////////////////////////
> + // Private Methods
> + /////////////////////////////////////////////////////////////////////
> + private void throwJMSException( String message, Exception e )
> + throws JMSException {
> + JMSException newE = new SpyJMSException(
> message );
> + newE.setLinkedException( e );
> + throw newE;
> + }
> }
>
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development