You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2008/02/05 21:52:13 UTC
svn commit: r618774 -
/activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java
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() {