本文整理了Java中org.apache.openjpa.kernel.Broker.addTransactionListener()
方法的一些代码示例,展示了Broker.addTransactionListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.addTransactionListener()
方法的具体详情如下:
包路径:org.apache.openjpa.kernel.Broker
类名称:Broker
方法名:addTransactionListener
[英]Register a listener for transaction-related events.
[中]注册事务相关事件的侦听器。
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
} catch (RuntimeException re) {
throw translate(re);
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
} catch (RuntimeException re) {
throw translate(re);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
} catch (RuntimeException re) {
throw translate(re);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
} catch (RuntimeException re) {
throw translate(re);
}
}
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
public void addTransactionListener(Object listener) {
try {
_broker.addTransactionListener(listener);
} catch (RuntimeException re) {
throw translate(re);
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
/**
* Add factory-registered lifecycle listeners to the broker.
*/
protected void addListeners(Broker broker) {
if (_lifecycleListeners != null && !_lifecycleListeners.isEmpty()) {
for (Map.Entry<Object,Class<?>[]> entry : _lifecycleListeners.entrySet()) {
broker.addLifecycleListener(entry.getKey(), entry.getValue());
}
}
if (_transactionListeners != null && !_transactionListeners.isEmpty()) {
for (Iterator<Object> itr = _transactionListeners.iterator();
itr.hasNext(); ) {
broker.addTransactionListener(itr.next());
}
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Add factory-registered lifecycle listeners to the broker.
*/
protected void addListeners(Broker broker) {
if (_lifecycleListeners != null && !_lifecycleListeners.isEmpty()) {
for (Map.Entry<Object,Class<?>[]> entry : _lifecycleListeners.entrySet()) {
broker.addLifecycleListener(entry.getKey(), entry.getValue());
}
}
if (_transactionListeners != null && !_transactionListeners.isEmpty()) {
for (Iterator<Object> itr = _transactionListeners.iterator();
itr.hasNext(); ) {
broker.addTransactionListener(itr.next());
}
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
/**
* Add factory-registered lifecycle listeners to the broker.
*/
protected void addListeners(Broker broker) {
if (_lifecycleListeners != null && !_lifecycleListeners.isEmpty()) {
for (Map.Entry<Object,Class<?>[]> entry : _lifecycleListeners.entrySet()) {
broker.addLifecycleListener(entry.getKey(), entry.getValue());
}
}
if (_transactionListeners != null && !_transactionListeners.isEmpty()) {
for (Iterator<Object> itr = _transactionListeners.iterator();
itr.hasNext(); ) {
broker.addTransactionListener(itr.next());
}
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
/**
* Add factory-registered lifecycle listeners to the broker.
*/
protected void addListeners(Broker broker) {
if (_lifecycleListeners != null && !_lifecycleListeners.isEmpty()) {
for (Map.Entry<Object,Class<?>[]> entry : _lifecycleListeners.entrySet()) {
broker.addLifecycleListener(entry.getKey(), entry.getValue());
}
}
if (_transactionListeners != null && !_transactionListeners.isEmpty()) {
for (Iterator<Object> itr = _transactionListeners.iterator();
itr.hasNext(); ) {
broker.addTransactionListener(itr.next());
}
}
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) {
assertOpen();
makeReadOnly();
DelegatingStoreManager dsm = createDelegatingStoreManager();
((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization);
// if we're using remote events, register the event manager so
// that it can broadcast commit notifications from the broker
RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager();
if (remote.areRemoteEventsEnabled())
broker.addTransactionListener(remote);
loadPersistentTypes(broker.getClassLoader());
_brokers.add(broker);
_conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) {
assertOpen();
makeReadOnly();
DelegatingStoreManager dsm = createDelegatingStoreManager();
((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization);
// if we're using remote events, register the event manager so
// that it can broadcast commit notifications from the broker
RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager();
if (remote.areRemoteEventsEnabled())
broker.addTransactionListener(remote);
loadPersistentTypes(broker.getClassLoader());
_brokers.add(broker);
_conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) {
assertOpen();
makeReadOnly();
DelegatingStoreManager dsm = createDelegatingStoreManager();
((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization);
// if we're using remote events, register the event manager so
// that it can broadcast commit notifications from the broker
RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager();
if (remote.areRemoteEventsEnabled())
broker.addTransactionListener(remote);
loadPersistentTypes(broker.getClassLoader());
_brokers.add(broker);
_conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) {
assertOpen();
makeReadOnly();
DelegatingStoreManager dsm = createDelegatingStoreManager();
((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization);
// if we're using remote events, register the event manager so
// that it can broadcast commit notifications from the broker
RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager();
if (remote.areRemoteEventsEnabled())
broker.addTransactionListener(remote);
loadPersistentTypes(broker.getClassLoader());
_brokers.add(broker);
_conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
}
内容来源于网络,如有侵权,请联系作者删除!