org.omg.CORBA.portable.RemarshalException Java Examples

The following examples show how to use org.omg.CORBA.portable.RemarshalException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientDelegateImpl.java    License: Apache License 2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #2
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #3
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #4
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientDelegateImpl.java    License: MIT License 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #5
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #7
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #8
Source Project: hottub   Author: dsrg-uoft   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #9
Source Project: openjdk-8-source   Author: keerath   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #10
Source Project: openjdk-8   Author: bpupadhyaya   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example #11
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientRequestDispatcherImpl.java    License: Apache License 2.0 4 votes vote down vote up
public InputObject marshalingComplete1(
        ORB orb, CorbaMessageMediator messageMediator)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    try {
        messageMediator.finishSendingRequest();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": finished sending request");
        }

        return messageMediator.waitForResponse();

    } catch (RuntimeException e) {

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": exception: " + e.toString());
        }

        boolean retry  =
            getContactInfoListIterator(orb)
                .reportException(messageMediator.getContactInfo(), e);

        //Bug 6382377: must not lose exception in PI

        // Must run interceptor end point before retrying.
        Exception newException =
                orb.getPIHandler().invokeClientPIEndingPoint(
                ReplyMessage.SYSTEM_EXCEPTION, e);

        if (retry) {
            if (newException == e) {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 new RemarshalException());
            } else {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 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;
        }
        return null; // for compiler
    }
}
 
Example #12
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientRequestDispatcherImpl.java    License: Apache License 2.0 4 votes vote down vote up
protected void continueOrThrowSystemOrRemarshal(
    CorbaMessageMediator messageMediator, Exception exception)
    throws
        SystemException, RemarshalException
{

    ORB orb = (ORB) messageMediator.getBroker();

    if( exception == null ) {

        // do nothing.

    } else if( exception instanceof RemarshalException ) {

        // REVISIT - unify with PI handling
        orb.getInvocationInfo().setIsRetryInvocation(true);

        // NOTE - We must unregister the waiter NOW for this request
        // since the retry will result in a new request id.  Therefore
        // the old request id would be lost and we would have a memory
        // leak in the responseWaitingRoom.
        unregisterWaiter(orb);

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing Remarshal");
        }

        throw (RemarshalException)exception;

    } else {

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing sex:"
                   + exception);
        }

        throw (SystemException)exception;
    }
}
 
Example #13
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: PIHandlerImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Invoke the starting interception points and record exception
    // and reply status info in the info object:
    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    interceptorInvoker.invokeClientInterceptorStartingPoint( info );

    // Check reply status.  If we will not have another chance later
    // to invoke the client ending points, do it now.
    short replyStatus = info.getReplyStatus();
    if( (replyStatus == SYSTEM_EXCEPTION.value) ||
        (replyStatus == LOCATION_FORWARD.value) )
    {
        // Note: Transport retry cannot happen here since this happens
        // before the request hits the wire.

        Exception exception = invokeClientPIEndingPoint(
            convertPIReplyStatusToReplyMessage( replyStatus ),
            info.getException() );
        if( exception == null ) {
            // Do not throw anything.  Otherwise, it must be a
            // SystemException, UserException or RemarshalException.
        } if( exception instanceof SystemException ) {
            throw (SystemException)exception;
        } else if( exception instanceof RemarshalException ) {
            throw (RemarshalException)exception;
        } else if( (exception instanceof UserException) ||
                 (exception instanceof ApplicationException) ) {
            // It should not be possible for an interceptor to throw
            // a UserException.  By asserting instead of throwing the
            // UserException, we need not declare anything but
            // RemarshalException in the throws clause.
            throw wrapper.exceptionInvalid() ;
        }
    }
    else if( replyStatus != ClientRequestInfoImpl.UNINITIALIZED ) {
        throw wrapper.replyStatusNotInit() ;
    }
}
 
Example #14
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: PINoOpHandlerImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example #15
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public InputObject marshalingComplete1(
        ORB orb, CorbaMessageMediator messageMediator)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    try {
        messageMediator.finishSendingRequest();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": finished sending request");
        }

        return messageMediator.waitForResponse();

    } catch (RuntimeException e) {

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": exception: " + e.toString());
        }

        boolean retry  =
            getContactInfoListIterator(orb)
                .reportException(messageMediator.getContactInfo(), e);

        //Bug 6382377: must not lose exception in PI

        // Must run interceptor end point before retrying.
        Exception newException =
                orb.getPIHandler().invokeClientPIEndingPoint(
                ReplyMessage.SYSTEM_EXCEPTION, e);

        if (retry) {
            if (newException == e) {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 new RemarshalException());
            } else {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 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;
        }
        return null; // for compiler
    }
}
 
Example #16
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void continueOrThrowSystemOrRemarshal(
    CorbaMessageMediator messageMediator, Exception exception)
    throws
        SystemException, RemarshalException
{

    ORB orb = (ORB) messageMediator.getBroker();

    if( exception == null ) {

        // do nothing.

    } else if( exception instanceof RemarshalException ) {

        // REVISIT - unify with PI handling
        orb.getInvocationInfo().setIsRetryInvocation(true);

        // NOTE - We must unregister the waiter NOW for this request
        // since the retry will result in a new request id.  Therefore
        // the old request id would be lost and we would have a memory
        // leak in the responseWaitingRoom.
        unregisterWaiter(orb);

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing Remarshal");
        }

        throw (RemarshalException)exception;

    } else {

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing sex:"
                   + exception);
        }

        throw (SystemException)exception;
    }
}
 
Example #17
Source Project: TencentKona-8   Author: Tencent   File: PIHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Invoke the starting interception points and record exception
    // and reply status info in the info object:
    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    interceptorInvoker.invokeClientInterceptorStartingPoint( info );

    // Check reply status.  If we will not have another chance later
    // to invoke the client ending points, do it now.
    short replyStatus = info.getReplyStatus();
    if( (replyStatus == SYSTEM_EXCEPTION.value) ||
        (replyStatus == LOCATION_FORWARD.value) )
    {
        // Note: Transport retry cannot happen here since this happens
        // before the request hits the wire.

        Exception exception = invokeClientPIEndingPoint(
            convertPIReplyStatusToReplyMessage( replyStatus ),
            info.getException() );
        if( exception == null ) {
            // Do not throw anything.  Otherwise, it must be a
            // SystemException, UserException or RemarshalException.
        } if( exception instanceof SystemException ) {
            throw (SystemException)exception;
        } else if( exception instanceof RemarshalException ) {
            throw (RemarshalException)exception;
        } else if( (exception instanceof UserException) ||
                 (exception instanceof ApplicationException) ) {
            // It should not be possible for an interceptor to throw
            // a UserException.  By asserting instead of throwing the
            // UserException, we need not declare anything but
            // RemarshalException in the throws clause.
            throw wrapper.exceptionInvalid() ;
        }
    }
    else if( replyStatus != ClientRequestInfoImpl.UNINITIALIZED ) {
        throw wrapper.replyStatusNotInit() ;
    }
}
 
Example #18
Source Project: TencentKona-8   Author: Tencent   File: PINoOpHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example #19
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public InputObject marshalingComplete1(
        ORB orb, CorbaMessageMediator messageMediator)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    try {
        messageMediator.finishSendingRequest();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": finished sending request");
        }

        return messageMediator.waitForResponse();

    } catch (RuntimeException e) {

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": exception: " + e.toString());
        }

        boolean retry  =
            getContactInfoListIterator(orb)
                .reportException(messageMediator.getContactInfo(), e);

        //Bug 6382377: must not lose exception in PI

        // Must run interceptor end point before retrying.
        Exception newException =
                orb.getPIHandler().invokeClientPIEndingPoint(
                ReplyMessage.SYSTEM_EXCEPTION, e);

        if (retry) {
            if (newException == e) {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 new RemarshalException());
            } else {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 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;
        }
        return null; // for compiler
    }
}
 
Example #20
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void continueOrThrowSystemOrRemarshal(
    CorbaMessageMediator messageMediator, Exception exception)
    throws
        SystemException, RemarshalException
{

    ORB orb = (ORB) messageMediator.getBroker();

    if( exception == null ) {

        // do nothing.

    } else if( exception instanceof RemarshalException ) {

        // REVISIT - unify with PI handling
        orb.getInvocationInfo().setIsRetryInvocation(true);

        // NOTE - We must unregister the waiter NOW for this request
        // since the retry will result in a new request id.  Therefore
        // the old request id would be lost and we would have a memory
        // leak in the responseWaitingRoom.
        unregisterWaiter(orb);

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing Remarshal");
        }

        throw (RemarshalException)exception;

    } else {

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing sex:"
                   + exception);
        }

        throw (SystemException)exception;
    }
}
 
Example #21
Source Project: jdk8u60   Author: chenghanpeng   File: PIHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Invoke the starting interception points and record exception
    // and reply status info in the info object:
    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    interceptorInvoker.invokeClientInterceptorStartingPoint( info );

    // Check reply status.  If we will not have another chance later
    // to invoke the client ending points, do it now.
    short replyStatus = info.getReplyStatus();
    if( (replyStatus == SYSTEM_EXCEPTION.value) ||
        (replyStatus == LOCATION_FORWARD.value) )
    {
        // Note: Transport retry cannot happen here since this happens
        // before the request hits the wire.

        Exception exception = invokeClientPIEndingPoint(
            convertPIReplyStatusToReplyMessage( replyStatus ),
            info.getException() );
        if( exception == null ) {
            // Do not throw anything.  Otherwise, it must be a
            // SystemException, UserException or RemarshalException.
        } if( exception instanceof SystemException ) {
            throw (SystemException)exception;
        } else if( exception instanceof RemarshalException ) {
            throw (RemarshalException)exception;
        } else if( (exception instanceof UserException) ||
                 (exception instanceof ApplicationException) ) {
            // It should not be possible for an interceptor to throw
            // a UserException.  By asserting instead of throwing the
            // UserException, we need not declare anything but
            // RemarshalException in the throws clause.
            throw wrapper.exceptionInvalid() ;
        }
    }
    else if( replyStatus != ClientRequestInfoImpl.UNINITIALIZED ) {
        throw wrapper.replyStatusNotInit() ;
    }
}
 
Example #22
Source Project: jdk8u60   Author: chenghanpeng   File: PINoOpHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example #23
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientRequestDispatcherImpl.java    License: MIT License 4 votes vote down vote up
public InputObject marshalingComplete1(
        ORB orb, CorbaMessageMediator messageMediator)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    try {
        messageMediator.finishSendingRequest();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": finished sending request");
        }

        return messageMediator.waitForResponse();

    } catch (RuntimeException e) {

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": exception: " + e.toString());
        }

        boolean retry  =
            getContactInfoListIterator(orb)
                .reportException(messageMediator.getContactInfo(), e);

        //Bug 6382377: must not lose exception in PI

        // Must run interceptor end point before retrying.
        Exception newException =
                orb.getPIHandler().invokeClientPIEndingPoint(
                ReplyMessage.SYSTEM_EXCEPTION, e);

        if (retry) {
            if (newException == e) {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 new RemarshalException());
            } else {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 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;
        }
        return null; // for compiler
    }
}
 
Example #24
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientRequestDispatcherImpl.java    License: MIT License 4 votes vote down vote up
protected void continueOrThrowSystemOrRemarshal(
    CorbaMessageMediator messageMediator, Exception exception)
    throws
        SystemException, RemarshalException
{

    ORB orb = (ORB) messageMediator.getBroker();

    if( exception == null ) {

        // do nothing.

    } else if( exception instanceof RemarshalException ) {

        // REVISIT - unify with PI handling
        orb.getInvocationInfo().setIsRetryInvocation(true);

        // NOTE - We must unregister the waiter NOW for this request
        // since the retry will result in a new request id.  Therefore
        // the old request id would be lost and we would have a memory
        // leak in the responseWaitingRoom.
        unregisterWaiter(orb);

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing Remarshal");
        }

        throw (RemarshalException)exception;

    } else {

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing sex:"
                   + exception);
        }

        throw (SystemException)exception;
    }
}
 
Example #25
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: PIHandlerImpl.java    License: MIT License 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Invoke the starting interception points and record exception
    // and reply status info in the info object:
    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    interceptorInvoker.invokeClientInterceptorStartingPoint( info );

    // Check reply status.  If we will not have another chance later
    // to invoke the client ending points, do it now.
    short replyStatus = info.getReplyStatus();
    if( (replyStatus == SYSTEM_EXCEPTION.value) ||
        (replyStatus == LOCATION_FORWARD.value) )
    {
        // Note: Transport retry cannot happen here since this happens
        // before the request hits the wire.

        Exception exception = invokeClientPIEndingPoint(
            convertPIReplyStatusToReplyMessage( replyStatus ),
            info.getException() );
        if( exception == null ) {
            // Do not throw anything.  Otherwise, it must be a
            // SystemException, UserException or RemarshalException.
        } if( exception instanceof SystemException ) {
            throw (SystemException)exception;
        } else if( exception instanceof RemarshalException ) {
            throw (RemarshalException)exception;
        } else if( (exception instanceof UserException) ||
                 (exception instanceof ApplicationException) ) {
            // It should not be possible for an interceptor to throw
            // a UserException.  By asserting instead of throwing the
            // UserException, we need not declare anything but
            // RemarshalException in the throws clause.
            throw wrapper.exceptionInvalid() ;
        }
    }
    else if( replyStatus != ClientRequestInfoImpl.UNINITIALIZED ) {
        throw wrapper.replyStatusNotInit() ;
    }
}
 
Example #26
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: PINoOpHandlerImpl.java    License: MIT License 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example #27
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public InputObject marshalingComplete1(
        ORB orb, CorbaMessageMediator messageMediator)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    try {
        messageMediator.finishSendingRequest();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": finished sending request");
        }

        return messageMediator.waitForResponse();

    } catch (RuntimeException e) {

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete: " + opAndId(messageMediator)
                   + ": exception: " + e.toString());
        }

        boolean retry  =
            getContactInfoListIterator(orb)
                .reportException(messageMediator.getContactInfo(), e);

        //Bug 6382377: must not lose exception in PI

        // Must run interceptor end point before retrying.
        Exception newException =
                orb.getPIHandler().invokeClientPIEndingPoint(
                ReplyMessage.SYSTEM_EXCEPTION, e);

        if (retry) {
            if (newException == e) {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 new RemarshalException());
            } else {
                continueOrThrowSystemOrRemarshal(messageMediator,
                                                 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;
        }
        return null; // for compiler
    }
}
 
Example #28
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaClientRequestDispatcherImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void continueOrThrowSystemOrRemarshal(
    CorbaMessageMediator messageMediator, Exception exception)
    throws
        SystemException, RemarshalException
{

    ORB orb = (ORB) messageMediator.getBroker();

    if( exception == null ) {

        // do nothing.

    } else if( exception instanceof RemarshalException ) {

        // REVISIT - unify with PI handling
        orb.getInvocationInfo().setIsRetryInvocation(true);

        // NOTE - We must unregister the waiter NOW for this request
        // since the retry will result in a new request id.  Therefore
        // the old request id would be lost and we would have a memory
        // leak in the responseWaitingRoom.
        unregisterWaiter(orb);

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing Remarshal");
        }

        throw (RemarshalException)exception;

    } else {

        if (orb.subcontractDebugFlag) {
            dprint(".continueOrThrowSystemOrRemarshal: "
                   + opAndId(messageMediator)
                   + ": throwing sex:"
                   + exception);
        }

        throw (SystemException)exception;
    }
}
 
Example #29
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: PIHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Invoke the starting interception points and record exception
    // and reply status info in the info object:
    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    interceptorInvoker.invokeClientInterceptorStartingPoint( info );

    // Check reply status.  If we will not have another chance later
    // to invoke the client ending points, do it now.
    short replyStatus = info.getReplyStatus();
    if( (replyStatus == SYSTEM_EXCEPTION.value) ||
        (replyStatus == LOCATION_FORWARD.value) )
    {
        // Note: Transport retry cannot happen here since this happens
        // before the request hits the wire.

        Exception exception = invokeClientPIEndingPoint(
            convertPIReplyStatusToReplyMessage( replyStatus ),
            info.getException() );
        if( exception == null ) {
            // Do not throw anything.  Otherwise, it must be a
            // SystemException, UserException or RemarshalException.
        } if( exception instanceof SystemException ) {
            throw (SystemException)exception;
        } else if( exception instanceof RemarshalException ) {
            throw (RemarshalException)exception;
        } else if( (exception instanceof UserException) ||
                 (exception instanceof ApplicationException) ) {
            // It should not be possible for an interceptor to throw
            // a UserException.  By asserting instead of throwing the
            // UserException, we need not declare anything but
            // RemarshalException in the throws clause.
            throw wrapper.exceptionInvalid() ;
        }
    }
    else if( replyStatus != ClientRequestInfoImpl.UNINITIALIZED ) {
        throw wrapper.replyStatusNotInit() ;
    }
}
 
Example #30
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: PINoOpHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}