[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-commits
Subject:    svn commit: r729940 - in
From:       rajdavies () apache ! org
Date:       2008-12-29 16:50:21
Message-ID: 20081229165021.D4589238889E () eris ! apache ! org
[Download RAW message or body]

Author: rajdavies
Date: Mon Dec 29 08:50:21 2008
New Revision: 729940

URL: http://svn.apache.org/viewvc?rev=729940&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1842

Modified:
    activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAMessageStore.java
  activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java


Modified: activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAMessageStore.java
                
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jpa-store/src/main/java/org/ \
apache/activemq/store/jpa/JPAMessageStore.java?rev=729940&r1=729939&r2=729940&view=diff
 ==============================================================================
--- activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAMessageStore.java \
                (original)
+++ activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAMessageStore.java \
Mon Dec 29 08:50:21 2008 @@ -30,6 +30,7 @@
 import org.apache.activemq.command.MessageId;
 import org.apache.activemq.store.MessageRecoveryListener;
 import org.apache.activemq.store.MessageStore;
+import org.apache.activemq.store.AbstractMessageStore;
 import org.apache.activemq.store.jpa.model.StoredMessage;
 import org.apache.activemq.usage.MemoryUsage;
 import org.apache.activemq.usage.SystemUsage;
@@ -37,17 +38,16 @@
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.wireformat.WireFormat;
 
-public class JPAMessageStore implements MessageStore {
+public class JPAMessageStore extends AbstractMessageStore {
 
     protected final JPAPersistenceAdapter adapter;
     protected final WireFormat wireFormat;
-    protected final ActiveMQDestination destination;
     protected final String destinationName;
     protected AtomicLong lastMessageId = new AtomicLong(-1);
 
     public JPAMessageStore(JPAPersistenceAdapter adapter, ActiveMQDestination \
destination) { +        super(destination);
         this.adapter = adapter;
-        this.destination = destination;
         this.destinationName = destination.getQualifiedName();
         this.wireFormat = this.adapter.getWireFormat();
     }
@@ -76,10 +76,6 @@
         adapter.commitEntityManager(context, manager);
     }
 
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
     public Message getMessage(MessageId identity) throws IOException {
         Message rc;
         EntityManager manager = adapter.beginEntityManager(null);
@@ -190,13 +186,4 @@
     public void resetBatching() {
         lastMessageId.set(-1);
     }
-
-    public void setMemoryUsage(MemoryUsage memoeyUSage){
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
 }

Modified: activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java
                
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jpa-store/src/main/java/org/ \
apache/activemq/store/jpa/JPAReferenceStore.java?rev=729940&r1=729939&r2=729940&view=diff
 ==============================================================================
--- activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java \
                (original)
+++ activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java \
Mon Dec 29 08:50:21 2008 @@ -32,24 +32,24 @@
 import org.apache.activemq.command.MessageId;
 import org.apache.activemq.store.MessageRecoveryListener;
 import org.apache.activemq.store.ReferenceStore;
+import org.apache.activemq.store.AbstractMessageStore;
 import org.apache.activemq.store.jpa.model.StoredMessageReference;
 import org.apache.activemq.usage.MemoryUsage;
 import org.apache.activemq.usage.SystemUsage;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.wireformat.WireFormat;
 
-public class JPAReferenceStore implements ReferenceStore {
+public class JPAReferenceStore extends AbstractMessageStore implements \
ReferenceStore {  
     protected final JPAPersistenceAdapter adapter;
     protected final WireFormat wireFormat;
-    protected final ActiveMQDestination destination;
     protected final String destinationName;
     protected AtomicLong lastMessageId = new AtomicLong(-1);
     protected final Lock lock = new ReentrantLock();
     
     public JPAReferenceStore(JPAPersistenceAdapter adapter, ActiveMQDestination \
destination) { +        super(destination);
         this.adapter = adapter;
-        this.destination = destination;
         this.destinationName = destination.getQualifiedName();
         this.wireFormat = this.adapter.getWireFormat();
     }
@@ -58,10 +58,6 @@
         return lock;
     }
 
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
     public void addMessage(ConnectionContext context, Message message) throws \
IOException {  throw new RuntimeException("Use addMessageReference instead");
     }
@@ -206,15 +202,6 @@
         lastMessageId.set(-1);
     }
 
-    public void setMemoryUsage(MemoryUsage memoeyUSage){
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
     public void setBatch(MessageId startAfter) {
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic