Package javax.transaction.xa

Examples of javax.transaction.xa.XAException.initCause()


                prepared = true;
            }
            return result;
        } catch (SQLException e) {
            XAException xa = new XAException(XAException.XAER_RMERR);
            xa.initCause(e);
            throw xa;
        } finally {
            JdbcUtils.closeSilently(stat);
        }
    }
View Full Code Here


        return getTraceObjectName() + ": " + physicalConn;
    }

    private static XAException convertException(SQLException e) {
        XAException xa = new XAException(e.getMessage());
        xa.initCause(e);
        return xa;
    }

    private static String quoteFlags(int flags) {
        StringBuilder buff = new StringBuilder();
View Full Code Here

            catch (SQLException e)
            {
                NucleusLogger.CONNECTION.debug("Managed connection "+this.toString()+
                    " failed to commit connection for transaction "+xid.toString()+" with flags "+flags);
                XAException xe = new XAException(StringUtils.getStringFromStackTrace(e));
                xe.initCause(e);
                throw xe;
            }
        }

        public void end(Xid xid, int flags) throws XAException
View Full Code Here

            catch (SQLException e)
            {
                NucleusLogger.CONNECTION.debug("Managed connection "+this.toString()+
                    " failed to rollback connection for transaction "+xid.toString());
                XAException xe = new XAException(StringUtils.getStringFromStackTrace(e));
                xe.initCause(e);
                throw xe;
            }
        }

        public boolean setTransactionTimeout(int arg0) throws XAException
View Full Code Here

            xae = new XAException(message);
        else
            xae = new XAException(XAException.XAER_RMERR);
       
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14)
            xae.initCause(se);
        return xae;
    }
 
    /**
     * Map a Standard exception to appropriate XAException.
View Full Code Here

            // Rollback the global transaction
            try {
                conn.xa_rollback();
            } catch (SQLException sqle) {
                XAException ex = new XAException(XAException.XAER_RMERR);
                ex.initCause(sqle);
                throw ex;
            }

            // Do the cleanup on the resource
            creatingResource.returnConnectionToResource(this, xid);
View Full Code Here

            xaErrorCode = XAException.XAER_RMERR;
       
        xae = new XAException(message);
        xae.errorCode = xaErrorCode;
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14)
            xae.initCause(se);
        return xae;
    }
 
    /**
     * Map a Standard exception to appropriate XAException.
View Full Code Here

      if (result == null)
      {
         XAException xae = new XAException("Error trying to connect to provider " + providerName);
         xae.errorCode = XAException.XAER_RMERR;
         if (error != null)
            xae.initCause(error);
         log.debug("Cannot get delegate XAResource", xae);
         throw xae;
      }
     
      return result;
View Full Code Here

            xae = new XAException(message);
        else
            xae = new XAException(XAException.XAER_RMERR);
       
        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14)
            xae.initCause(se);
        return xae;
    }
 
    /**
     * Map a Standard exception to appropriate XAException.
View Full Code Here

      if (result == null)
      {
         XAException xae = new XAException("Error trying to connect to provider " + providerName);
         xae.errorCode = XAException.XAER_RMERR;
         if (error != null)
            xae.initCause(error);
         log.debug("Cannot get delegate XAResource", xae);
         throw xae;
      }
     
      return result;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.