/** * Print a stack trace for this exception with a * given <code>PrintWriter</code>. * * @param s The <code>PrintWriter</code> to which the stack trace will * be written */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (reason != null) { s.print("at "); reason.printStackTrace(s); } }
/** * Print a stack trace for this exception with a * given <code>PrintStream</code>. * * @param s The <code>PrintStream</code> to which the stack trace will * be written */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (reason != null) { s.print("at "); reason.printStackTrace(s); } }
/** * Print a stack trace for this exception with a * given <code>PrintStream</code>. * * @param s The <code>PrintStream</code> to which the stack trace will * be written */ public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (reason != null) { s.print("at "); reason.printStackTrace(s); } }
/** * Print a stack trace for this exception with a * given <code>PrintWriter</code>. * * @param s The <code>PrintWriter</code> to which the stack trace will * be written */ public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (reason != null) { s.print("at "); reason.printStackTrace(s); } }
/** * Prints the composite message and the embedded stack trace to the * specified print stream. * * @param stream Stream to print to. */ public void printStackTrace(final PrintStream stream) { if (t == null || NestedThrowable.PARENT_TRACE_ENABLED) super.printStackTrace(stream); NestedThrowable.Util.print(t, stream); }
static public void printTrace(javax.transaction.xa.XAException e, java.io.PrintWriter printWriter, String messageHeader) { String header = messageHeader + "[" + "XAException@" + Integer.toHexString(e.hashCode()) + "]"; synchronized (printWriter) { printWriter.println(header + " javax.transaction.xa.XAException"); printWriter.println(header + " Message = " + e.getMessage()); printWriter.println(header + " Stack trace follows"); e.printStackTrace(printWriter); } } }
/** * Prints the composite message and the embedded stack trace to the * specified print writer. * * @param writer Writer to print to. */ public void printStackTrace(final PrintWriter writer) { if (t == null || NestedThrowable.PARENT_TRACE_ENABLED) super.printStackTrace(writer); NestedThrowable.Util.print(t, writer); }
static public void printTrace(javax.transaction.xa.XAException e, java.io.PrintWriter printWriter, String messageHeader) { String header = messageHeader + "[" + "XAException@" + Integer.toHexString(e.hashCode()) + "]"; synchronized (printWriter) { printWriter.println(header + " javax.transaction.xa.XAException"); printWriter.println(header + " Message = " + e.getMessage()); printWriter.println(header + " Stack trace follows"); e.printStackTrace(printWriter); } } }
@Override public void release() { try { prepare(); commit(); } catch (XAException e) { e.printStackTrace(); } super.release(); } }
@Override public void onMessage(final ClientMessage message) { Xid xid = new XidImpl(UUIDGenerator.getInstance().generateStringUUID().getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes()); try { session.start(xid, XAResource.TMNOFLAGS); } catch (XAException e) { e.printStackTrace(); } try { message.acknowledge(); } catch (ActiveMQException e) { BasicXaTest.log.error("Failed to process message", e); } try { session.end(xid, XAResource.TMSUCCESS); session.rollback(xid); } catch (Exception e) { e.printStackTrace(); failedToAck = true; try { session.close(); } catch (ActiveMQException e1) { // } } latch.countDown(); } }