mirror of https://github.com/apache/openjpa.git
OPENJPA-117: provide registered TransactionListeners as unmodifiable collection
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@835280 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
70fc46f93e
commit
befbc83945
|
@ -261,6 +261,13 @@ public interface Broker
|
|||
* @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
|
||||
|
|
|
@ -808,6 +808,10 @@ public class BrokerImpl
|
|||
endOperation();
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<Object> getTransactionListeners() {
|
||||
return _transEventManager.getListeners();
|
||||
}
|
||||
|
||||
public int getTransactionListenerCallbackMode() {
|
||||
return _transCallbackMode;
|
||||
|
|
|
@ -825,6 +825,14 @@ public class DelegatingBroker
|
|||
throw translate(re);
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<Object> getTransactionListeners() {
|
||||
try {
|
||||
return _broker.getTransactionListeners();
|
||||
} catch (RuntimeException re) {
|
||||
throw translate(re);
|
||||
}
|
||||
}
|
||||
|
||||
public int getTransactionListenerCallbackMode() {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue