protected WebBeansContext webBeansContext() { return WebBeansContext.getInstance(); //only way to be compatible with owb 1.7.x and 2.x (without reflection) } }
protected WebBeansContext webBeansContext() { if (webBeansContext == null) { webBeansContext = WebBeansContext.getInstance(); } return WebBeansContext.getInstance(); } }
/** * Creates a new instance of the session bean. * @param ejbClassType ebj class type */ public OpenEjbBean(Class<T> ejbClassType, SessionBeanType type) { super(ejbClassType, type, WebBeansContext.getInstance()); }
/** * Default constructor */ public WebBeansConfigurationListener() { webBeansContext = WebBeansContext.getInstance(); contextsService = webBeansContext.getContextsService(); }
private boolean isOwbApplication() { if (owbApplication == null) { owbApplication = Boolean.valueOf(WebBeansContext.getInstance().getBeanManagerImpl().isInUse()); } return owbApplication.booleanValue(); }
@Override public AbstractContext getRequestContext() { WebBeansContext webBeansContext = WebBeansContext.getInstance(); RequestContext currentContext = (RequestContext) webBeansContext.getContextsService().getCurrentContext(RequestScoped.class); return currentContext; }
private Object readResolve() throws ObjectStreamException { WebBeansContext webBeansContext = WebBeansContext.getInstance(); return webBeansContext.getBeanManagerImpl().getPassivationCapableBean(passivationId); } }
@Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) { return new InjectableBeanManager(WebBeansContext.getInstance().getBeanManagerImpl()); }
private void doContextInitialized(final ServletContextEvent event) { try { final WebBeansContext instance = WebBeansContext.getInstance(); customizeContext(instance); } catch (final IllegalStateException ise) { // lifecycle not supporting it } super.contextInitialized(event); }
public OwbArquillianScannerService() { this.beansXmlBdaScanningEnabled = false; webBeansContext = WebBeansContext.getInstance(); this.beanManager = webBeansContext.getBeanManagerImpl(); beanArchiveService = webBeansContext.getBeanArchiveService(); }
private static JNDIService getJNDIService() { JNDIService jndiService = WebBeansContext.getInstance().getService(JNDIService.class); if(jndiService == null) { throw new WebBeansCreationException("JNDI service is not available"); } return jndiService; }
private boolean isOwbApplication() { if (owbApplication == null) { owbApplication = WebBeansContext.getInstance().getBeanManagerImpl().isInUse(); } return owbApplication; }
@Override public ExpressionFactory getExpressionFactory() { if(expressionFactory == null) { expressionFactory = wrappedApplication.getExpressionFactory(); expressionFactory = WebBeansContext.getInstance().getBeanManagerImpl().wrapExpressionFactory(expressionFactory); } return expressionFactory; }
@Override public ExpressionFactory getExpressionFactory() { if(this.expressionFactory == null) { expressionFactory = wrappedApplication.getExpressionFactory(); expressionFactory = WebBeansContext.getInstance().getBeanManagerImpl().wrapExpressionFactory(expressionFactory); } return expressionFactory; }
/** * {@inheritDoc} */ @Override public void addDefinitionError(Throwable t) { checkState(); WebBeansContext.getInstance().getBeanManagerImpl().getErrorStack().pushError(t); }
/** * {@inheritDoc} */ @Override public void addDefinitionError(Throwable t) { checkState(); WebBeansContext.getInstance().getBeanManagerImpl().getErrorStack().pushError(t); }
/** * {@inheritDoc} */ @Override public void addDefinitionError(Throwable t) { checkState(); WebBeansContext.getInstance().getBeanManagerImpl().getErrorStack().pushError(t); }
/** * {@inheritDoc} */ @Override public void addDefinitionError(Throwable t) { checkState(); WebBeansContext.getInstance().getBeanManagerImpl().getErrorStack().pushError(t); }
@Override public void bootContainer() throws Exception { servletContext = new MockServletContext(); session = new MockHttpSession(); lifecycle = WebBeansContext.getInstance().getService(ContainerLifecycle.class); lifecycle.startApplication(new ServletContextEvent(servletContext)); }
Object readResolve() throws ObjectStreamException { WebBeansContext webBeansContext = WebBeansContext.getInstance(); BeanManager beanManager = webBeansContext.getBeanManagerImpl(); Bean<?> bean = beanManager.getPassivationCapableBean(passivationId); return webBeansContext.getInterceptorDecoratorProxyFactory().createProxyInstance( webBeansContext.getInterceptorDecoratorProxyFactory().getCachedProxyClass(bean), target, this ); }