@Override public boolean delistResource(XAResource xaRes, int flag) throws SystemException { return this.transactionManager.getTransaction().delistResource(xaRes, flag); }
/** {@inheritDoc} */ @Override public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException { return tx.delistResource(xaRes, flag); }
@Override public boolean delistResource(XAResource xaRes, int flag) throws SystemException { return this.transactionManager.getTransaction().delistResource(xaRes, flag); }
public boolean delistResource(final XAResource xaRes, final int flag) throws IllegalStateException, SystemException { Assert.checkNotNullParam("xaRes", xaRes); return transaction.delistResource(xaRes, flag); }
/** * Callback for Connection Closed. * * @param event ConnectionEvent Object. */ @Override public void connectionClosed(ConnectionEvent event) { if (isActive) { ManagedConnection conn = (ManagedConnection) event.getSource(); XAResource xar = null; if (xaResourcesMap.get(conn) != null) xar = (XAResource) xaResourcesMap.get(conn); xaResourcesMap.remove(conn); try { Transaction txn = transManager.getTransaction(); if (txn != null && xar != null) { txn.delistResource(xar, XAResource.TMSUCCESS); } } catch (Exception se) { String exception = "JCAConnectionManagerImpl::connectionClosed: Exception occurred due to " + se; if (logger.isDebugEnabled()) { logger.debug(exception, se); } } mannPoolCache.returnPooledConnectionToPool(conn); } }
/** * Implementation of call back function from ConnectionEventListener interface. This callback will * be invoked on connection close event. * * @param event Connection event object */ @Override public void connectionClosed(ConnectionEvent event) { if (isActive) { try { XAConnection conn = (XAConnection) event.getSource(); XAResource xar = (XAResource) xaResourcesMap.get(conn); xaResourcesMap.remove(conn); Transaction txn = transManager.getTransaction(); if (txn != null && xar != null) txn.delistResource(xar, XAResource.TMSUCCESS); provider.returnConnection(conn); } catch (Exception e) { String exception = "GemFireTransactionDataSource::connectionClosed: Exception occurred due to " + e; if (logger.isDebugEnabled()) { logger.debug(exception, e); } } } }
Transaction txn = transManager.getTransaction(); if (txn != null && xar != null) txn.delistResource(xar, XAResource.TMSUCCESS); } catch (SystemException se) { se.printStackTrace();
@Override public boolean delistResource( final XAResource xaRes, final int flag ) throws IllegalStateException, SystemException { return delegate.delistResource( xaRes, flag ); }
@Override public boolean delistResource(XAResource xaRes, int flag) throws SystemException { return this.transactionManager.getTransaction().delistResource(xaRes, flag); }
/** * @see javax.transaction.UserTransaction#rollback */ public void rollback() throws IllegalStateException, SecurityException, SystemException { int flag = XAResource.TMFAIL; tm.getTransaction().delistResource(XARes, flag); tm.rollback(); }
/** * @see javax.transaction.UserTransaction#commit */ public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException { int flag = XAResource.TMSUCCESS; tm.getTransaction().delistResource(XARes, flag); tm.commit(); }
private void delist() { if (_tm != null) { try { Transaction trans = _tm.getTransaction(); if (trans != null) trans.delistResource(this, 0); } catch (Exception e) { throw new RuntimeException(e); } } }
@Override public boolean delistResource(final XAResource xaResource, final int i) throws IllegalStateException, SystemException { final XAResource wrapper = xaResourceWrapper.wrap(xaResource, name); return transaction.delistResource(wrapper, i); }
public boolean delistResource(final XAResource xaRes, final int flag) throws IllegalStateException, SystemException { Assert.checkNotNullParam("xaRes", xaRes); return transaction.delistResource(xaRes, flag); }
@Override public boolean delistResource(final XAResource xaResource, final int i) throws IllegalStateException, SystemException { final XAResource wrapper = xaResourceWrapper.wrap(xaResource, name); return transaction.delistResource(wrapper, i); }
public boolean delistResource(XAResource xaResource, int i) throws IllegalStateException, SystemException { XAResource wrapper = xaResourceWrapper.wrap(xaResource, name); return transaction.delistResource(wrapper, i); }
public boolean delistResource(XAResource resource, int tmflag) throws TransactionException { TransactionManager txManager = muleContext.getTransactionManager(); try { Transaction jtaTransaction = txManager.getTransaction(); if (jtaTransaction == null) { throw new TransactionException(CoreMessages.noJtaTransactionAvailable(Thread.currentThread())); } return jtaTransaction.delistResource(resource, tmflag); } catch (SystemException e) { throw new TransactionException(e); } }
@Override public void deregisterXAResource(XAResource xaResource) throws JMSException { try { if (!getTransaction().delistResource(xaResource, XAResource.TMSUCCESS)) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(null); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), null); } } catch (IllegalStateException | SystemException e) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(e); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), e); } }
@Override public void deregisterXAResource(XAResource xaResource) throws JMSException { try { if (!getTransaction().delistResource(xaResource, XAResource.TMSUCCESS)) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(null); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), null); } } catch (IllegalStateException | SystemException e) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(e); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), e); } }
@Override public void deregisterXAResource(XAResource xaResource) throws JMSException { try { if (!getTransaction().delistResource(xaResource, XAResource.TMSUCCESS)) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(null); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), null); } } catch (IllegalStateException | SystemException e) { jtaLogger.i18NLogger.warn_failed_to_delist_xa_resource(e); throw getJmsException(jtaLogger.i18NLogger.get_failed_to_delist_xa_resource(), e); } }