Java Code Examples for org.omg.CORBA.portable.RemarshalException

The following examples show how to use org.omg.CORBA.portable.RemarshalException. These examples are extracted from open source projects. 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
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
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
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   Source 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
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
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
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
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
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
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
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
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   Source 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   Source File: PINoOpHandlerImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example 15
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
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   Source 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
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example 19
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
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   Source 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   Source File: PINoOpHandlerImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example 23
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
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   Source 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   Source File: PINoOpHandlerImpl.java    License: MIT License 4 votes vote down vote up
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}
 
Example 27
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
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   Source 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
public void invokeClientPIStartingPoint()
    throws RemarshalException
{
}