public CdiResourceInjectionService(final WebBeansContext context) { ejbPlugin = CdiPlugin.class.cast(context.getPluginLoader().getEjbPlugin()); }
webBeansContext.getPluginLoader().startUp();
private boolean isEEComponent(Class<?> impl) { OpenWebBeansJavaEEPlugin eePlugin = webBeansContext.getPluginLoader().getJavaEEPlugin(); return eePlugin != null && eePlugin.isEEComponent(impl); }
List<OpenWebBeansPlugin> plugins = webBeansContext.getPluginLoader().getPlugins(); for (OpenWebBeansPlugin plugin : plugins) PluginLoader.throwsException(e);
((CdiPlugin) webBeansContext.getPluginLoader().getEjbPlugin()).clearProxies(); webBeansContext.getPluginLoader().shutDown();
webBeansContext.getPluginLoader().startUp(); final CdiPlugin cdiPlugin = (CdiPlugin) webBeansContext.getPluginLoader().getEjbPlugin();
OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin(); if(ejbPlugin == null) OpenWebBeansJmsPlugin jmsPlugin = webBeansContext.getPluginLoader().getJmsPlugin(); if(jmsPlugin == null)
public void stop() throws OpenEJBException { final ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); try { // Setting context class loader for cleaning Thread.currentThread().setContextClassLoader(classLoader); // Fire shut down webBeansContext.getBeanManagerImpl().fireEvent(new BeforeShutdownImpl()); // Destroys context this.contexsServices.destroy(null); // Free all plugin resources webBeansContext.getPluginLoader().shutDown(); // Clear extensions webBeansContext.getExtensionLoader().clear(); // Delete Resolutions Cache webBeansContext.getBeanManagerImpl().getInjectionResolver().clearCaches(); // Delete AnnotateTypeCache webBeansContext.getAnnotatedElementFactory().clear(); // Clear the resource injection service final CdiResourceInjectionService injectionServices = (CdiResourceInjectionService) webBeansContext.getService(ResourceInjectionService.class); injectionServices.clear(); // Clear singleton list WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader()); } catch (final Exception e) { throw new OpenEJBException(e); } finally { Thread.currentThread().setContextClassLoader(oldCl); } }
List<OpenWebBeansPlugin> plugins = webBeansContext.getPluginLoader().getPlugins(); for (OpenWebBeansPlugin plugin : plugins)
protected InterceptorBeanBuilder(WebBeansContext webBeansContext, AnnotatedType<T> annotatedType, BeanAttributes<T> beanAttributes) { Asserts.assertNotNull(webBeansContext, Asserts.PARAM_NAME_WEBBEANSCONTEXT); Asserts.assertNotNull(annotatedType, "annotated type"); Asserts.assertNotNull(beanAttributes, "beanAttributes"); this.webBeansContext = webBeansContext; this.annotatedType = annotatedType; this.beanAttributes = beanAttributes; ejbPlugin = webBeansContext.getPluginLoader().getEjbLCAPlugin(); if (ejbPlugin != null) { prePassivateClass = ejbPlugin.getPrePassivateClass(); postActivateClass = ejbPlugin.getPostActivateClass(); } else { prePassivateClass = null; postActivateClass = null; } }
((CdiPlugin) webBeansContext.getPluginLoader().getEjbPlugin()).clearProxies(); webBeansContext.getPluginLoader().shutDown();
webBeansContext.getPluginLoader().startUp(); final CdiPlugin cdiPlugin = (CdiPlugin) webBeansContext.getPluginLoader().getEjbPlugin();
webBeansContext.getPluginLoader().shutDown();
private <T> T doServiceLoader(Class<T> serviceInterface) { String implName = getOpenWebBeansConfiguration().getProperty(serviceInterface.getName()); if (implName == null) { //Look for plugins List<OpenWebBeansPlugin> plugins = getPluginLoader().getPlugins(); if(plugins != null && plugins.size() > 0) { for(OpenWebBeansPlugin plugin : plugins) { if(plugin.supportService(serviceInterface)) { return plugin.getSupportedService(serviceInterface); } } } return null; } return serviceInterface.cast(get(implName)); }
private static Map<Class<?>, BeanContext> pluginBeans(final WebBeansContext ctx) { return CdiPlugin.class.cast(ctx.getPluginLoader().getEjbPlugin()).beans; }
public void stop() throws OpenEJBException { final ClassLoader oldCl = Thread.currentThread().getContextClassLoader(); try { // Setting context class loader for cleaning Thread.currentThread().setContextClassLoader(classLoader); // Fire shut down webBeansContext.getBeanManagerImpl().fireEvent(new BeforeShutdownImpl()); // Destroys context webBeansContext.getContextsService().destroy(null); // Free all plugin resources webBeansContext.getPluginLoader().shutDown(); // Clear extensions webBeansContext.getExtensionLoader().clear(); // Delete Resolutions Cache webBeansContext.getBeanManagerImpl().getInjectionResolver().clearCaches(); // Delete AnnotateTypeCache webBeansContext.getAnnotatedElementFactory().clear(); // Clear the resource injection service final CdiResourceInjectionService injectionServices = (CdiResourceInjectionService) webBeansContext.getService(ResourceInjectionService.class); injectionServices.clear(); // Clear singleton list WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader()); } catch (final Exception e) { throw new OpenEJBException(e); } finally { Thread.currentThread().setContextClassLoader(oldCl); } }
OpenWebBeansJavaEEPlugin beanEeProvider = webBeansContext.getPluginLoader().getJavaEEPlugin();
private static Map<Class<?>, BeanContext> pluginBeans(final WebBeansContext ctx) { return CdiPlugin.class.cast(ctx.getPluginLoader().getEjbPlugin()).beans; }
public CdiResourceInjectionService(final WebBeansContext context) { ejbPlugin = CdiPlugin.class.cast(context.getPluginLoader().getEjbPlugin()); }
public void setWebBeansContext(final WebBeansContext webBeansContext) { this.webBeansContext = webBeansContext; if (!WebappWebBeansContext.class.isInstance(webBeansContext)) { cacheProxies = new ConcurrentHashMap<Contextual<?>, Object>(); } else { // share cache of proxies between the whole app otherwise hard to share an EJB between a webapp and the lib part of the app cacheProxies = CdiPlugin.class.cast(WebappWebBeansContext.class.cast(webBeansContext).getParent().getPluginLoader().getEjbPlugin()).cacheProxies; } }