org.apache.openjpa.kernel.Broker.addTransactionListener()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中org.apache.openjpa.kernel.Broker.addTransactionListener()方法的一些代码示例,展示了Broker.addTransactionListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.addTransactionListener()方法的具体详情如下:
包路径:org.apache.openjpa.kernel.Broker
类名称:Broker
方法名:addTransactionListener

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);
}

相关文章

微信公众号

最新文章

更多

Broker类方法