Documentation Contents |
Changes in CORBA Features Between J2SE 1.4.x and 5.0 |
This release of the JavaTM 2 Platform Standard Edition (J2SE), contains the following enhancements to CORBA, Java IDL, and Java RMI-IIOP technology:
org.omg.CORBA.SystemException
response, it adds an ExceptionDetailMessage
(i.e., a ServiceContext
with ServiceId 14
) as defined in:
/** * CORBA formal/02-06-01: 13.7.1: * ExceptionDetailMessage identifies a CDR encapsulation of a wstring, * encoded using GIOP 1.2 with a TCS-W of UTF-16. This service context * may be sent on Reply messages with a reply_status of SYSTEM_EXCEPTION * or USER_EXCEPTION. The usage of this service context is defined * by language mappings. * * IDL/Java: ptc/02-01-22: 1.15.2: * When a System Exception is marshaled, its GIOP Reply message shall * include an associated ExceptionDetailMessage service context. The * callee's stack trace is often very valuable debugging information but * may contain sensitive or unwanted information. The wstring within the * service context will therefore contain additional information relating * to the exception, for example the result of calling either * printStackTrace(PrintWriter) or getMessage() on the exception. When * unmarshaling a System Exception on the client side, the wstring from * any ExceptionDetailMessage service context shall become the Java error * message in the unmarshaled exception object. */
When the J2SE 5.0 ORB unmarshals an org.omg.CORBA.SystemException
response it constructs the SystemException
with the contents of the
ExceptionDetailMessage
as the message
argument to the
SystemException
constructor.
NOTE: The content of the message may change. In J2SE 5.0, the message contains the server side stack trace. The following code example (note: all details may change) of a stack trace on the client side for an exception generated on the server-side (note the server-side stack trace in the exception's message):
org.omg.CORBA.FREE_MEM: ----------BEGIN server-side stack trace---------- org.omg.CORBA.FREE_MEM: idlIConnect vmcid: 0x0 minor code: 0 completed: No at corba.exceptiondetailsc.idlIServantConnect.raise_system_exception(idlIServantConnect.java:23) at corba.exceptiondetailsc._idlIImplBase._invoke(_idlIImplBase.java:42) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:647) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895) at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284) at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382) ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: No at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:791) at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:97) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:546) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:407) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:303) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:132) at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457) at corba.exceptiondetailsc._idlIStub.raise_system_exception(_idlIStub.java:20) at corba.exceptiondetailsc.Client.main(Client.java:87) ------------------------------------------------------------------------------
See Official Specifications for CORBA support in J2SE 5.0 for information on how Java IDL and Java RMI-IIOP comply with the CORBA Specifications.
Copyright © 1995-2010 Sun Microsystems, Inc. All Rights Reserved. Please send comments using this Feedback page. |
Java Technology |