/** * Async process completed with a wrapped Fault. Must only be invoked once. * @param w - the wrapped Fault to send * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously */ public void setWrappedFault(AsyncFaultWrapper w) { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); Throwable e; try { // Set the TCCL to the classloader of the business interface Thread.currentThread().setContextClassLoader(this.getBusinessInterface().getClassLoader()); e = w.retrieveFault(); } finally { Thread.currentThread().setContextClassLoader(tccl); } // end try if( e == null ) throw new IllegalArgumentException("AsyncFaultWrapper did not return an Exception"); setFault( e ); } // end method setFault( AsyncFaultWrapper )
return (Throwable) cons.newInstance(faultMessage, getContainedFault().retrieveFault()); } else { try {