提交 0db0e64a 编写于 作者: V vikram

6382377: incorrect Exception is given to interceptor

6828768: RMI-IIOP EJB clients do not fail over due to defect in JDK 1.6.0_12
Summary: Also reviewed by ken.cavanaugh@oracle.com
Reviewed-by: skoppar
上级 357d69dd
......@@ -30,12 +30,14 @@ import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.protocol.giopmsgheaders.FragmentMessage;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
import com.sun.corba.se.impl.encoding.BufferManagerWrite;
import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
import com.sun.corba.se.impl.encoding.CDROutputObject;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.pept.encoding.OutputObject;
import org.omg.CORBA.SystemException;
/**
* Streaming buffer manager.
......@@ -66,7 +68,13 @@ public class BufferManagerWriteStream extends BufferManagerWrite
// Set the fragment's moreFragments field to true
MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);
sendFragment(false);
try {
sendFragment(false);
} catch(SystemException se){
orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, se);
throw se;
}
// Reuse the old buffer
......
......@@ -385,11 +385,15 @@ public class CorbaClientRequestDispatcherImpl
boolean retry =
getContactInfoListIterator(orb)
.reportException(messageMediator.getContactInfo(), e);
if (retry) {
// Must run interceptor end point before retrying.
Exception newException =
//Bug 6382377: must not lose exception in PI
// Must run interceptor end point before retrying.
Exception newException =
orb.getPIHandler().invokeClientPIEndingPoint(
ReplyMessage.SYSTEM_EXCEPTION, e);
ReplyMessage.SYSTEM_EXCEPTION, e);
if (retry) {
if (newException == e) {
continueOrThrowSystemOrRemarshal(messageMediator,
new RemarshalException());
......@@ -398,6 +402,14 @@ public class CorbaClientRequestDispatcherImpl
newException);
}
} else {
if (newException instanceof RuntimeException){
throw (RuntimeException)newException;
}
else if (newException instanceof RemarshalException)
{
throw (RemarshalException)newException;
}
// NOTE: Interceptor ending point will run in releaseReply.
throw e;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册