当前位置: 首页>>代码示例>>Java>>正文


Java MessageContext.removeProperty方法代码示例

本文整理汇总了Java中org.apache.axis2.context.MessageContext.removeProperty方法的典型用法代码示例。如果您正苦于以下问题:Java MessageContext.removeProperty方法的具体用法?Java MessageContext.removeProperty怎么用?Java MessageContext.removeProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.context.MessageContext的用法示例。


在下文中一共展示了MessageContext.removeProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doProcessing

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
@Override
protected InvocationResponse doProcessing(final MessageContext mc, final IUserMessageEntity um)
                                                                                    throws PersistenceException {
    final String msgId = um.getMessageId();
    log.debug("Change processing state to indicate start of processing of message [" + msgId + "]" );
    if (!HolodeckB2BCore.getStorageManager().setProcessingState(um, ProcessingState.RECEIVED,
                                                                   ProcessingState.PROCESSING)) {
        // Changing the state failed which indicates that the message unit is already being processed
        log.warn("User message [msgId= " + msgId + "] is already being processed");
        // Remove the User Message from the context to prevent further processing
        mc.removeProperty(MessageContextProperties.IN_USER_MESSAGE);
    } else
        log.warn("User message [msgId= " + msgId + "] is ready for processing");

    return InvocationResponse.CONTINUE;
}
 
开发者ID:holodeck-b2b,项目名称:Holodeck-B2B,代码行数:17,代码来源:StartProcessingUsrMessage.java

示例2: cleanup

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public void cleanup(MessageContext msgContext) throws AxisFault {
    HttpMethod httpMethod = (HttpMethod) msgContext.getProperty(HTTPConstants.HTTP_METHOD);

    if (httpMethod != null) {
        // TODO : Don't do this if we're not on the right thread! Can we confirm?
        log.trace("cleanup() releasing connection for " + httpMethod);

        httpMethod.releaseConnection();
        msgContext.removeProperty(HTTPConstants.HTTP_METHOD); // guard against multiple calls
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:CommonsHTTPTransportSender.java


注:本文中的org.apache.axis2.context.MessageContext.removeProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。