本文整理了Java中javax.resource.spi.ConnectionEvent.<init>()
方法的一些代码示例,展示了ConnectionEvent.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConnectionEvent.<init>()
方法的具体详情如下:
包路径:javax.resource.spi.ConnectionEvent
类名称:ConnectionEvent
方法名:<init>
[英]Construct a ConnectionEvent object. Exception defaults to null.
[中]构造ConnectionEvent对象。异常默认为null。
代码示例来源:origin: camunda/camunda-bpm-platform
void closeHandle(JcaExecutorServiceConnection handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
public PrintWriter getLogWriter() throws ResourceException {
代码示例来源:origin: apache/cxf
private Object handleCloseMethod(Object proxy, Method method,
Object[] args) {
handles.remove(proxy);
associatedHandle = null;
ConnectionEvent event = new ConnectionEvent(ManagedConnectionImpl.this,
ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(proxy);
sendEvent(event);
return null;
}
}
代码示例来源:origin: org.tranql/tranql-connector
protected void unfilteredConnectionError(Exception e) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, e);
for (int i = listeners.size() - 1; i >= 0; i--) {
ConnectionEventListener listener = listeners.get(i);
listener.connectionErrorOccurred(event);
}
}
代码示例来源:origin: apache/cxf
public void error(Exception ex) {
LOG.warning(ex.toString());
sendEvent(new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex));
}
}
代码示例来源:origin: org.tranql/tranql-connector
protected void localTransactionRollback(boolean isSPI) throws ResourceException {
if (!isSPI) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
for (int i = 0; i < listeners.size(); i++) {
ConnectionEventListener listener = listeners.get(i);
listener.localTransactionRolledback(event);
}
}
}
代码示例来源:origin: org.tranql/tranql-connector
protected void localTransactionCommit(boolean isSPI) throws ResourceException {
if (!isSPI) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
for (int i = listeners.size() - 1; i >= 0; i--) {
ConnectionEventListener listener = listeners.get(i);
listener.localTransactionCommitted(event);
}
}
}
代码示例来源:origin: org.tranql/tranql-connector
protected void localTransactionStart(boolean isSPI) throws ResourceException {
if (!isSPI) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
for (int i = listeners.size() - 1; i >= 0; i--) {
ConnectionEventListener listener = listeners.get(i);
listener.localTransactionStarted(event);
}
}
}
代码示例来源:origin: com.caucho/resin
/**
* When closed, the item is not put into the idle pool.
*/
void killPool()
{
if (_listener != null) {
ConnectionEvent event;
event = new ConnectionEvent(this,
ConnectionEvent.CONNECTION_ERROR_OCCURRED);
_listener.connectionErrorOccurred(event);
}
}
代码示例来源:origin: org.tranql/tranql-connector
public void connectionClosed(U handle) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
//count down in case sending the event results in a handle getting removed.
for (int i = listeners.size() - 1; i >= 0; i--) {
ConnectionEventListener listener = listeners.get(i);
listener.connectionClosed(event);
}
}
代码示例来源:origin: apache/cxf
public void close(Object closingHandle) throws ResourceException {
LOG.fine("Closing handle: " + closingHandle);
ConnectionEvent coEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
coEvent.setConnectionHandle(closingHandle);
sendEvent(coEvent);
}
代码示例来源:origin: net.java.xadisk/xadisk
void connectionClosed(XADiskConnection connection) {
connectionHandles.remove(connection);
ConnectionEvent connectionEvent = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
connectionEvent.setConnectionHandle(connection);
raiseConnectionEvent(connectionEvent);
}
代码示例来源:origin: fish.payara.cloud.connectors.azuresb/azure-sb-jca-api
void removeHandle(AzureSBConnectionImpl handle) {
connectionHandles.remove(handle);
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener listener : listeners) {
listener.connectionClosed(event);
}
}
代码示例来源:origin: payara/Cloud-Connectors
void remove(KafkaConnectionImpl conn) {
connectionHandles.remove(conn);
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(conn);
for (ConnectionEventListener listener : listeners) {
listener.connectionClosed(event);
}
}
代码示例来源:origin: payara/Cloud-Connectors
void removeHandle(AmazonSQSConnection connection) {
connectionHandles.remove(connection);
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(connection);
for (ConnectionEventListener listener : listeners) {
listener.connectionClosed(event);
}
}
代码示例来源:origin: ModeShape/modeshape
/**
* Close handle
*
* @param handle The handle
*/
protected void closeHandle( JcrSessionHandle handle ) {
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(handle);
for (ConnectionEventListener cel : listeners) {
cel.connectionClosed(event);
}
}
代码示例来源:origin: com.caucho/resin
void close()
{
if (_listener != null) {
ConnectionEvent evt;
evt = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
evt.setConnectionHandle(this);
_listener.connectionClosed(evt);
}
}
代码示例来源:origin: net.sf.tsl2nano/tsl2.nano.serviceaccess
/**
* @param con
*/
protected void detachConnection(FsConnectionImpl con) {
LOG.debug("detachConnection con=" + con);
con.setManagedConnection(null);
connections.remove(con);
final ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
event.setConnectionHandle(con);
fireConnectionEvent(event);
}
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-storage-sql
private void sendEvent(int type, ConnectionImpl connection, Exception cause) {
ConnectionEvent event = new ConnectionEvent(this, type, cause);
if (connection != null) {
event.setConnectionHandle(connection);
}
sendEvent(event);
}
代码示例来源:origin: apache/jackrabbit
/**
* Send event.
*/
private void sendEvent(int type, Object handle, Exception cause) {
ConnectionEvent event = new ConnectionEvent(this, type, cause);
if (handle != null) {
event.setConnectionHandle(handle);
}
sendEvent(event);
}
代码示例来源:origin: org.firebirdsql.jdbc/jaybird-jdk17
@Override
public void errorOccurred(Object source, SQLException ex) {
log.trace(ex.getMessage());
if (!FatalGDSErrorHelper.isFatal(ex))
return;
ConnectionEvent event = new ConnectionEvent(FBManagedConnection.this, ConnectionEvent.CONNECTION_ERROR_OCCURRED,
ex);
FBManagedConnection.this.notify(connectionErrorOccurredNotifier, event);
}
内容来源于网络,如有侵权,请联系作者删除!