You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/07/13 16:10:31 UTC

svn commit: r1361227 - in /activemq/trunk/activemq-core/src/main: java/org/apache/activemq/store/kahadb/ proto/

Author: tabish
Date: Fri Jul 13 14:10:31 2012
New Revision: 1361227

URL: http://svn.apache.org/viewvc?rev=1361227&view=rev
Log:
apply patch for: https://issues.apache.org/jira/browse/AMQ-3849

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TransactionIdConversion.java
    activemq/trunk/activemq-core/src/main/proto/journal-data.proto

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java?rev=1361227&r1=1361226&r2=1361227&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java Fri Jul 13 14:10:31 2012
@@ -43,9 +43,9 @@ import java.util.Set;
 /**
  * An implementation of {@link PersistenceAdapter} designed for use with
  * KahaDB - Embedded Lightweight Non-Relational Database
- * 
+ *
  * @org.apache.xbean.XBean element="kahaDB"
- * 
+ *
  */
 public class KahaDBPersistenceAdapter implements PersistenceAdapter, BrokerServiceAware {
     private final KahaDBStore letter = new KahaDBStore();
@@ -202,7 +202,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the journalMaxFileLength
-     * 
+     *
      * @return the journalMaxFileLength
      */
     public int getJournalMaxFileLength() {
@@ -212,7 +212,7 @@ public class KahaDBPersistenceAdapter im
     /**
      * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can
      * be used
-     * 
+     *
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
      */
     public void setJournalMaxFileLength(int journalMaxFileLength) {
@@ -225,7 +225,7 @@ public class KahaDBPersistenceAdapter im
     public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack) {
         this.letter.setMaxFailoverProducersToTrack(maxFailoverProducersToTrack);
     }
-    
+
     public int getMaxFailoverProducersToTrack() {
         return this.letter.getMaxFailoverProducersToTrack();
     }
@@ -237,14 +237,14 @@ public class KahaDBPersistenceAdapter im
     public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth) {
         this.letter.setFailoverProducersAuditDepth(failoverProducersAuditDepth);
     }
-    
+
     public int getFailoverProducersAuditDepth() {
         return this.letter.getFailoverProducersAuditDepth();
     }
-    
+
     /**
      * Get the checkpointInterval
-     * 
+     *
      * @return the checkpointInterval
      */
     public long getCheckpointInterval() {
@@ -253,7 +253,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Set the checkpointInterval
-     * 
+     *
      * @param checkpointInterval
      *            the checkpointInterval to set
      */
@@ -263,7 +263,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the cleanupInterval
-     * 
+     *
      * @return the cleanupInterval
      */
     public long getCleanupInterval() {
@@ -272,7 +272,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Set the cleanupInterval
-     * 
+     *
      * @param cleanupInterval
      *            the cleanupInterval to set
      */
@@ -282,7 +282,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the indexWriteBatchSize
-     * 
+     *
      * @return the indexWriteBatchSize
      */
     public int getIndexWriteBatchSize() {
@@ -302,7 +302,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the journalMaxWriteBatchSize
-     * 
+     *
      * @return the journalMaxWriteBatchSize
      */
     public int getJournalMaxWriteBatchSize() {
@@ -322,7 +322,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the enableIndexWriteAsync
-     * 
+     *
      * @return the enableIndexWriteAsync
      */
     public boolean isEnableIndexWriteAsync() {
@@ -331,7 +331,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Set the enableIndexWriteAsync
-     * 
+     *
      * @param enableIndexWriteAsync
      *            the enableIndexWriteAsync to set
      */
@@ -341,7 +341,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the directory
-     * 
+     *
      * @return the directory
      */
     public File getDirectory() {
@@ -358,7 +358,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the enableJournalDiskSyncs
-     * 
+     *
      * @return the enableJournalDiskSyncs
      */
     public boolean isEnableJournalDiskSyncs() {
@@ -367,7 +367,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Set the enableJournalDiskSyncs
-     * 
+     *
      * @param enableJournalDiskSyncs
      *            the enableJournalDiskSyncs to set
      */
@@ -377,7 +377,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the indexCacheSize
-     * 
+     *
      * @return the indexCacheSize
      */
     public int getIndexCacheSize() {
@@ -397,7 +397,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Get the ignoreMissingJournalfiles
-     * 
+     *
      * @return the ignoreMissingJournalfiles
      */
     public boolean isIgnoreMissingJournalfiles() {
@@ -406,7 +406,7 @@ public class KahaDBPersistenceAdapter im
 
     /**
      * Set the ignoreMissingJournalfiles
-     * 
+     *
      * @param ignoreMissingJournalfiles
      *            the ignoreMissingJournalfiles to set
      */
@@ -476,7 +476,7 @@ public class KahaDBPersistenceAdapter im
     public void setMaxAsyncJobs(int maxAsyncJobs) {
         letter.setMaxAsyncJobs(maxAsyncJobs);
     }
-    
+
     /**
      * @return the databaseLockedWaitDelay
      */
@@ -573,15 +573,15 @@ public class KahaDBPersistenceAdapter im
             LocalTransactionId t = (LocalTransactionId) txid;
             KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId();
             kahaTxId.setConnectionId(t.getConnectionId().getValue());
-            kahaTxId.setTransacitonId(t.getValue());
-            rc.setLocalTransacitonId(kahaTxId);
+            kahaTxId.setTransactionId(t.getValue());
+            rc.setLocalTransactionId(kahaTxId);
         } else {
             XATransactionId t = (XATransactionId) txid;
             KahaXATransactionId kahaTxId = new KahaXATransactionId();
             kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier()));
             kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
             kahaTxId.setFormatId(t.getFormatId());
-            rc.setXaTransacitonId(kahaTxId);
+            rc.setXaTransactionId(kahaTxId);
         }
         return rc;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java?rev=1361227&r1=1361226&r2=1361227&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java Fri Jul 13 14:10:31 2012
@@ -90,7 +90,7 @@ public class MultiKahaDBPersistenceAdapt
                 kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
                 kahaTxId.setFormatId(t.getFormatId());
             }
-            rc.setXaTransacitonId(kahaTxId);
+            rc.setXaTransactionId(kahaTxId);
             return rc;
         }
     };

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TransactionIdConversion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TransactionIdConversion.java?rev=1361227&r1=1361226&r2=1361227&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TransactionIdConversion.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TransactionIdConversion.java Fri Jul 13 14:10:31 2012
@@ -33,8 +33,8 @@ public class TransactionIdConversion {
         LocalTransactionId t = (LocalTransactionId) tx;
         KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId();
         kahaTxId.setConnectionId(t.getConnectionId().getValue());
-        kahaTxId.setTransacitonId(t.getValue());
-        rc.setLocalTransacitonId(kahaTxId);
+        kahaTxId.setTransactionId(t.getValue());
+        rc.setLocalTransactionId(kahaTxId);
         return rc;
     }
 
@@ -53,20 +53,20 @@ public class TransactionIdConversion {
             kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier()));
             kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
             kahaTxId.setFormatId(t.getFormatId());
-            rc.setXaTransacitonId(kahaTxId);
+            rc.setXaTransactionId(kahaTxId);
         }
         return rc;
     }
 
     static TransactionId convert(KahaTransactionInfo transactionInfo) {
-        if (transactionInfo.hasLocalTransacitonId()) {
-            KahaLocalTransactionId tx = transactionInfo.getLocalTransacitonId();
+        if (transactionInfo.hasLocalTransactionId()) {
+            KahaLocalTransactionId tx = transactionInfo.getLocalTransactionId();
             LocalTransactionId rc = new LocalTransactionId();
             rc.setConnectionId(new ConnectionId(tx.getConnectionId()));
-            rc.setValue(tx.getTransacitonId());
+            rc.setValue(tx.getTransactionId());
             return rc;
         } else {
-            KahaXATransactionId tx = transactionInfo.getXaTransacitonId();
+            KahaXATransactionId tx = transactionInfo.getXaTransactionId();
             XATransactionId rc = new XATransactionId();
             rc.setBranchQualifier(tx.getBranchQualifier().toByteArray());
             rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray());

Modified: activemq/trunk/activemq-core/src/main/proto/journal-data.proto
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/proto/journal-data.proto?rev=1361227&r1=1361226&r2=1361227&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/proto/journal-data.proto (original)
+++ activemq/trunk/activemq-core/src/main/proto/journal-data.proto Fri Jul 13 14:10:31 2012
@@ -137,14 +137,14 @@ message KahaDestination {
 }
 
 message KahaTransactionInfo {
-  optional KahaLocalTransactionId local_transaciton_id=1;
-  optional KahaXATransactionId xa_transaciton_id=2;
+  optional KahaLocalTransactionId local_transaction_id=1;
+  optional KahaXATransactionId xa_transaction_id=2;
   optional KahaLocation previous_entry=3;
 }
 
 message KahaLocalTransactionId {
   required string connection_id=1;
-  required int64 transaciton_id=1;
+  required int64 transaction_id=1;
 }
 
 message KahaXATransactionId {