openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r835280 - in /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel: Broker.java BrokerImpl.java DelegatingBroker.java
Date Thu, 12 Nov 2009 07:35:26 GMT
Author: ppoddar
Date: Thu Nov 12 07:35:26 2009
New Revision: 835280

URL: http://svn.apache.org/viewvc?rev=835280&view=rev
Log:
OPENJPA-117: provide registered TransactionListeners as unmodifiable collection

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java?rev=835280&r1=835279&r2=835280&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java Thu Nov
12 07:35:26 2009
@@ -261,6 +261,13 @@
      * @since 0.2.5
      */
     public void removeTransactionListener(Object listener);
+    
+    /**
+     * Gets an umodifiable collection of currently registered lsteners.
+     * 
+     * @since 2.0.0
+     */
+    public Collection<Object> getTransactionListeners();
 
     /**
      * The callback mode for handling exceptions from transaction event

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=835280&r1=835279&r2=835280&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java Thu
Nov 12 07:35:26 2009
@@ -808,6 +808,10 @@
             endOperation();
         }
     }
+    
+    public Collection<Object> getTransactionListeners() {
+        return _transEventManager.getListeners();
+    }
 
     public int getTransactionListenerCallbackMode() {
         return _transCallbackMode;

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java?rev=835280&r1=835279&r2=835280&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java
Thu Nov 12 07:35:26 2009
@@ -825,6 +825,14 @@
             throw translate(re);
         }
     }
+    
+    public Collection<Object> getTransactionListeners() {
+        try {
+            return _broker.getTransactionListeners();
+        } catch (RuntimeException re) {
+            throw translate(re);
+        }
+    }
 
     public int getTransactionListenerCallbackMode() {
         try {



Mime
View raw message