本文整理汇总了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();
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例7: stopRequestScope
import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopRequestScope()
{
ContextsService contextsService = getContextsService();
contextsService.endContext(RequestScoped.class, null);
}
示例8: stopConversationScope
import org.apache.webbeans.spi.ContextsService; //导入方法依赖的package包/类
private void stopConversationScope()
{
ContextsService contextsService = getContextsService();
contextsService.endContext(ConversationScoped.class, null);
}