com.sun.corba.se.spi.protocol.RetryType Java Examples

The following examples show how to use com.sun.corba.se.spi.protocol.RetryType. 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 File: PIHandlerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #2
Source File: PIHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #3
Source File: ClientRequestInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #4
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #5
Source File: PIHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #6
Source File: PIHandlerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #7
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #8
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #9
Source File: PIHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #10
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #11
Source File: PIHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #12
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #13
Source File: ClientRequestInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #14
Source File: PIHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #15
Source File: ClientRequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #16
Source File: ClientRequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #17
Source File: PIHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #18
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
Example #19
Source File: PIHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #20
Source File: PIHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
Example #21
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example #22
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
Example #23
Source File: PIHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void initiateClientPIRequest( boolean diiRequest ) {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Get the most recent info object from the thread local
    // ClientRequestInfoImpl stack:
    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalClientRequestInfoStack.get();
    ClientRequestInfoImpl info = null;

    if (!infoStack.empty() ) {
        info = (ClientRequestInfoImpl)infoStack.peek();
    }

    if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
        // In RequestImpl.doInvocation we already called
        // initiateClientPIRequest( true ), so ignore this initiate.
        info.setDIIInitiate( false );
    } else {
        // If there is no info object or if we are not retrying a request,
        // push a new ClientRequestInfoImpl on the stack:

        // 6763340: don't push unless this is not a retry
        if( (info == null) || !info.getRetryRequest().isRetry() ) {
            info = new ClientRequestInfoImpl( orb );
            infoStack.push( info );
            printPush();
            // Note: the entry count is automatically initialized to 0.
        }

        // Reset the retry request flag so that recursive calls will
        // push a new info object, and bump up entry count so we know
        // when to pop this info object:
        info.setRetryRequest( RetryType.NONE );
        info.incrementEntryCount();

        // KMC 6763340: I don't know why this wasn't set earlier,
        // but we do not want a retry to pick up the previous
        // reply status, so clear it here.  Most likely a new
        // info was pushed before, so that this was not a problem.
        info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;

        // If this is a DII request, make sure we ignore the next initiate.
        if( diiRequest ) {
            info.setDIIInitiate( true );
        }
    }
}
 
Example #24
Source File: PIHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void initiateClientPIRequest( boolean diiRequest ) {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Get the most recent info object from the thread local
    // ClientRequestInfoImpl stack:
    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalClientRequestInfoStack.get();
    ClientRequestInfoImpl info = null;

    if (!infoStack.empty() ) {
        info = (ClientRequestInfoImpl)infoStack.peek();
    }

    if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
        // In RequestImpl.doInvocation we already called
        // initiateClientPIRequest( true ), so ignore this initiate.
        info.setDIIInitiate( false );
    } else {
        // If there is no info object or if we are not retrying a request,
        // push a new ClientRequestInfoImpl on the stack:

        // 6763340: don't push unless this is not a retry
        if( (info == null) || !info.getRetryRequest().isRetry() ) {
            info = new ClientRequestInfoImpl( orb );
            infoStack.push( info );
            printPush();
            // Note: the entry count is automatically initialized to 0.
        }

        // Reset the retry request flag so that recursive calls will
        // push a new info object, and bump up entry count so we know
        // when to pop this info object:
        info.setRetryRequest( RetryType.NONE );
        info.incrementEntryCount();

        // KMC 6763340: I don't know why this wasn't set earlier,
        // but we do not want a retry to pick up the previous
        // reply status, so clear it here.  Most likely a new
        // info was pushed before, so that this was not a problem.
        info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;

        // If this is a DII request, make sure we ignore the next initiate.
        if( diiRequest ) {
            info.setDIIInitiate( true );
        }
    }
}
 
Example #25
Source File: ClientRequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example #26
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example #27
Source File: PIHandlerImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void initiateClientPIRequest( boolean diiRequest ) {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Get the most recent info object from the thread local
    // ClientRequestInfoImpl stack:
    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalClientRequestInfoStack.get();
    ClientRequestInfoImpl info = null;

    if (!infoStack.empty() ) {
        info = (ClientRequestInfoImpl)infoStack.peek();
    }

    if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
        // In RequestImpl.doInvocation we already called
        // initiateClientPIRequest( true ), so ignore this initiate.
        info.setDIIInitiate( false );
    } else {
        // If there is no info object or if we are not retrying a request,
        // push a new ClientRequestInfoImpl on the stack:

        // 6763340: don't push unless this is not a retry
        if( (info == null) || !info.getRetryRequest().isRetry() ) {
            info = new ClientRequestInfoImpl( orb );
            infoStack.push( info );
            printPush();
            // Note: the entry count is automatically initialized to 0.
        }

        // Reset the retry request flag so that recursive calls will
        // push a new info object, and bump up entry count so we know
        // when to pop this info object:
        info.setRetryRequest( RetryType.NONE );
        info.incrementEntryCount();

        // KMC 6763340: I don't know why this wasn't set earlier,
        // but we do not want a retry to pick up the previous
        // reply status, so clear it here.  Most likely a new
        // info was pushed before, so that this was not a problem.
        info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;

        // If this is a DII request, make sure we ignore the next initiate.
        if( diiRequest ) {
            info.setDIIInitiate( true );
        }
    }
}
 
Example #28
Source File: ClientRequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
Example #29
Source File: PIHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public void initiateClientPIRequest( boolean diiRequest ) {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Get the most recent info object from the thread local
    // ClientRequestInfoImpl stack:
    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalClientRequestInfoStack.get();
    ClientRequestInfoImpl info = null;

    if (!infoStack.empty() ) {
        info = (ClientRequestInfoImpl)infoStack.peek();
    }

    if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
        // In RequestImpl.doInvocation we already called
        // initiateClientPIRequest( true ), so ignore this initiate.
        info.setDIIInitiate( false );
    } else {
        // If there is no info object or if we are not retrying a request,
        // push a new ClientRequestInfoImpl on the stack:

        // 6763340: don't push unless this is not a retry
        if( (info == null) || !info.getRetryRequest().isRetry() ) {
            info = new ClientRequestInfoImpl( orb );
            infoStack.push( info );
            printPush();
            // Note: the entry count is automatically initialized to 0.
        }

        // Reset the retry request flag so that recursive calls will
        // push a new info object, and bump up entry count so we know
        // when to pop this info object:
        info.setRetryRequest( RetryType.NONE );
        info.incrementEntryCount();

        // KMC 6763340: I don't know why this wasn't set earlier,
        // but we do not want a retry to pick up the previous
        // reply status, so clear it here.  Most likely a new
        // info was pushed before, so that this was not a problem.
        info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;

        // If this is a DII request, make sure we ignore the next initiate.
        if( diiRequest ) {
            info.setDIIInitiate( true );
        }
    }
}
 
Example #30
Source File: ClientRequestInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}