public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) { TransportConnectionState rc = null; if (connectionId != null && connectionState != null && this.connectionId!=null){ if (this.connectionId.equals(connectionId)){ rc = connectionState; connectionState = null; connectionId = null; } } return rc; }
protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) { return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2)); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != LocalTransactionId.class) { return false; } LocalTransactionId tx = (LocalTransactionId)o; return value == tx.value && connectionId.equals(tx.connectionId); }
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) { try { Transaction transaction = iter.next(); transaction.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's transactions: ", e); } iter.remove(); } synchronized (xaTransactions) { // first find all txs that belongs to the connection ArrayList<XATransaction> txs = new ArrayList<XATransaction>(); for (XATransaction tx : xaTransactions.values()) { if (tx.getConnectionId() != null && tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) { txs.add(tx); } } // then remove them // two steps needed to avoid ConcurrentModificationException, from removeTransaction() for (XATransaction tx : txs) { try { tx.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e); } } } next.removeConnection(context, info, error); }
public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) { TransportConnectionState rc = null; if (connectionId != null && connectionState != null && this.connectionId!=null){ if (this.connectionId.equals(connectionId)){ rc = connectionState; connectionState = null; connectionId = null; } } return rc; }
public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) { TransportConnectionState rc = null; if (connectionId != null && connectionState != null && this.connectionId!=null){ if (this.connectionId.equals(connectionId)){ rc = connectionState; connectionState = null; connectionId = null; } } return rc; }
public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) { TransportConnectionState rc = null; if (connectionId != null && connectionState != null && this.connectionId!=null){ if (this.connectionId.equals(connectionId)){ rc = connectionState; connectionState = null; connectionId = null; } } return rc; }
public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) { TransportConnectionState rc = null; if (connectionId != null && connectionState != null && this.connectionId!=null){ if (this.connectionId.equals(connectionId)){ rc = connectionState; connectionState = null; connectionId = null; } } return rc; }
protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) { return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2)); }
protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) { return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2)); }
protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) { return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2)); }
protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) { return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2)); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != LocalTransactionId.class) { return false; } LocalTransactionId tx = (LocalTransactionId)o; return value == tx.value && connectionId.equals(tx.connectionId); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != LocalTransactionId.class) { return false; } LocalTransactionId tx = (LocalTransactionId)o; return value == tx.value && connectionId.equals(tx.connectionId); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != LocalTransactionId.class) { return false; } LocalTransactionId tx = (LocalTransactionId)o; return value == tx.value && connectionId.equals(tx.connectionId); }
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || o.getClass() != LocalTransactionId.class) { return false; } LocalTransactionId tx = (LocalTransactionId)o; return value == tx.value && connectionId.equals(tx.connectionId); }
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) { try { Transaction transaction = iter.next(); transaction.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's transactions: ", e); } iter.remove(); } synchronized (xaTransactions) { // first find all txs that belongs to the connection ArrayList<XATransaction> txs = new ArrayList<XATransaction>(); for (XATransaction tx : xaTransactions.values()) { if (tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) { txs.add(tx); } } // then remove them // two steps needed to avoid ConcurrentModificationException, from removeTransaction() for (XATransaction tx : txs) { try { tx.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e); } } } next.removeConnection(context, info, error); }
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) { try { Transaction transaction = iter.next(); transaction.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's transactions: ", e); } iter.remove(); } synchronized (xaTransactions) { // first find all txs that belongs to the connection ArrayList<XATransaction> txs = new ArrayList<XATransaction>(); for (XATransaction tx : xaTransactions.values()) { if (tx.getConnectionId() != null && tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) { txs.add(tx); } } // then remove them // two steps needed to avoid ConcurrentModificationException, from removeTransaction() for (XATransaction tx : txs) { try { tx.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e); } } } next.removeConnection(context, info, error); }
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) { try { Transaction transaction = iter.next(); transaction.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's transactions: ", e); } iter.remove(); } synchronized (xaTransactions) { // first find all txs that belongs to the connection ArrayList<XATransaction> txs = new ArrayList<XATransaction>(); for (XATransaction tx : xaTransactions.values()) { if (tx.getConnectionId() != null && tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) { txs.add(tx); } } // then remove them // two steps needed to avoid ConcurrentModificationException, from removeTransaction() for (XATransaction tx : txs) { try { tx.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e); } } } next.removeConnection(context, info, error); }
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) { try { Transaction transaction = iter.next(); transaction.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's transactions: ", e); } iter.remove(); } synchronized (xaTransactions) { // first find all txs that belongs to the connection ArrayList<XATransaction> txs = new ArrayList<XATransaction>(); for (XATransaction tx : xaTransactions.values()) { if (tx.getConnectionId() != null && tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) { txs.add(tx); } } // then remove them // two steps needed to avoid ConcurrentModificationException, from removeTransaction() for (XATransaction tx : txs) { try { tx.rollback(); } catch (Exception e) { LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e); } } } next.removeConnection(context, info, error); }