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

The following examples show how to use com.sun.corba.se.spi.protocol.RetryType. 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
Source Project: jdk1.8-source-analysis   Source File: PIHandlerImpl.java    License: 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 2
/**
 * 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 3
Source Project: TencentKona-8   Source File: PIHandlerImpl.java    License: 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 4
/**
 * 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 Project: jdk8u60   Source File: PIHandlerImpl.java    License: 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
/**
 * 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 7
Source Project: JDKSourceCode1.8   Source File: PIHandlerImpl.java    License: 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 8
Source Project: JDKSourceCode1.8   Source File: ClientRequestInfoImpl.java    License: 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 9
Source Project: openjdk-jdk8u   Source File: PIHandlerImpl.java    License: 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
/**
 * 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
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
/**
 * 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 Project: openjdk-jdk9   Source File: PIHandlerImpl.java    License: 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 14
/**
 * 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 15
Source Project: hottub   Source File: PIHandlerImpl.java    License: 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 16
Source Project: hottub   Source File: ClientRequestInfoImpl.java    License: 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
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
/**
 * 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 Project: openjdk-8   Source File: PIHandlerImpl.java    License: 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
/**
 * 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 21
Source Project: jdk1.8-source-analysis   Source File: PIHandlerImpl.java    License: 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 22
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
Example 23
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example 24
Source Project: TencentKona-8   Source File: PIHandlerImpl.java    License: 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
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
Example 26
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example 27
Source Project: jdk8u60   Source File: PIHandlerImpl.java    License: 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
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
Example 29
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
Example 30
Source Project: JDKSourceCode1.8   Source File: PIHandlerImpl.java    License: MIT License 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 );
        }
    }
}