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


Java ContextsService.endContext方法代码示例

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


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

示例1: beforeStopApplication

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
public void beforeStopApplication(Object endObject)
{
    WebBeansContext webBeansContext = getWebBeansContext();
    ContextsService contextsService = webBeansContext.getContextsService();
    contextsService.endContext(Singleton.class, null);
    contextsService.endContext(ApplicationScoped.class, null);
    contextsService.endContext(RequestScoped.class, null);
    contextsService.endContext(SessionScoped.class, mockHttpSession);

    ELContextStore elStore = ELContextStore.getInstance(false);
    if (elStore == null)
    {
        return;
    }
    elStore.destroyELContextStore();
}
 
开发者ID:HotswapProjects,项目名称:HotswapAgent,代码行数:17,代码来源:HAOpenWebBeansTestLifeCycle.java

示例2: stopContexts

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
public static void stopContexts(final ContextsService contextsService, final ServletContext servletContext, final HttpSession session) throws Exception {
    contextsService.endContext(SessionScoped.class, session);
    contextsService.endContext(RequestScoped.class, null);
    contextsService.endContext(ConversationScoped.class, null);
    if (CdiAppContextsService.class.isInstance(contextsService)) {
        CdiAppContextsService.class.cast(contextsService).removeThreadLocals();
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:9,代码来源:ScopeHelper.java

示例3: stopSingletonScope

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopSingletonScope()
{
    ContextsService contextsService = getContextsService();

    Object mockServletContext = null;
    if (isServletApiAvailable())
    {
        mockServletContext = OwbHelper.getMockServletContext();
    }
    contextsService.endContext(Singleton.class, mockServletContext);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:12,代码来源:OpenWebBeansContextControl.java

示例4: stopApplicationScope

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopApplicationScope()
{
    ContextsService contextsService = getContextsService();

    Object mockServletContext = null;
    if (isServletApiAvailable())
    {
        mockServletContext = OwbHelper.getMockServletContext();
    }
    contextsService.endContext(ApplicationScoped.class, mockServletContext);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:12,代码来源:OpenWebBeansContextControl.java

示例5: stopSessionScope

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopSessionScope()
{
    ContextsService contextsService = getContextsService();

    Object mockSession = null;
    if (isServletApiAvailable())
    {
        mockSession = mockSessions.get();
        mockSessions.set(null);
        mockSessions.remove();
    }
    contextsService.endContext(SessionScoped.class, mockSession);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:14,代码来源:OpenWebBeansContextControl.java

示例6: restartContext

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
protected void restartContext(Class<? extends Annotation> scopeType)
{
    ContextsService contextsService = webBeansContext.getContextsService();
    contextsService.endContext(scopeType, null);
    contextsService.startContext(scopeType, null);
}
 
开发者ID:HotswapProjects,项目名称:HotswapAgent,代码行数:7,代码来源:HAAbstractUnitTest.java

示例7: stopRequestScope

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopRequestScope()
{
    ContextsService contextsService = getContextsService();

    contextsService.endContext(RequestScoped.class, null);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:7,代码来源:OpenWebBeansContextControl.java

示例8: stopConversationScope

import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopConversationScope()
{
    ContextsService contextsService = getContextsService();

    contextsService.endContext(ConversationScoped.class, null);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:7,代码来源:OpenWebBeansContextControl.java


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