|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Throwables that implement this interface will be set with the stack trace before the Throwable is returned to the caller. This allows remote exceptions to communicate their stack trace to their callers.
WebLogic obtains the stacktrace from the callee by calling printStackTrace(PrintStream ps). To maintain remote-local transparency, write code that includes the check for null values of the internal field remoteStackTrace, as shown in this example:
public class MyException extends Exception, implements RemoteTraceable { private transient String remoteStackTrace; public void setStackTrace(String s) { remoteStackTrace = s;} // These printStackTrace methods are not part of the RemoteTraceable // interface. They are shown here as an example of how to // maintain remote-local transparency. public void printStackTrace() { System.err.print(remoteStackTrace); } public void printStackTrace(PrintStream ps) { ps.print(remoteStackTrace); } public void printStackTrace(PrintWriter pw) { pw.print(remoteStackTrace); } }
Method Summary | |
void |
setStackTrace(java.lang.String s)
Sets a remote stack trace when the exception is instantiated, before it is returned to the caller. |
Method Detail |
public void setStackTrace(java.lang.String s)
s
- A String that is a stack trace of a Throwable
|
Documentation is available at http://www.weblogic.com/docs51 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |