activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r618774 - /activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java
Date Tue, 05 Feb 2008 20:52:13 GMT
Author: rajdavies
Date: Tue Feb  5 12:52:10 2008
New Revision: 618774

URL: http://svn.apache.org/viewvc?rev=618774&view=rev
Log:
return a lock for the store

Modified:
    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/JPAReferenceStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java?rev=618774&r1=618773&r2=618774&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
Tue Feb  5 12:52:10 2008
@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
@@ -43,12 +45,17 @@
     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)
{
         this.adapter = adapter;
         this.destination = destination;
         this.destinationName = destination.getQualifiedName();
         this.wireFormat = this.adapter.getWireFormat();
+    }
+    
+    public Lock getStoreLock() {
+        return lock;
     }
 
     public ActiveMQDestination getDestination() {



Mime
View raw message