private WeldUnusedMetadataExtension getUnusedMetadataExtension() { try { return getExtension(WeldUnusedMetadataExtension.class); } catch (IllegalArgumentException e) { // In some configurations the root manager does not have access to extensions return null; } }
private WeldUnusedMetadataExtension getUnusedMetadataExtension() { try { return getExtension(WeldUnusedMetadataExtension.class); } catch (IllegalArgumentException e) { // In some configurations the root manager does not have access to extensions return null; } }
private WeldUnusedMetadataExtension getUnusedMetadataExtension() { try { return getExtension(WeldUnusedMetadataExtension.class); } catch (IllegalArgumentException e) { // In some configurations the root manager does not have access to extensions return null; } }
private WeldUnusedMetadataExtension getUnusedMetadataExtension() { try { return getExtension(WeldUnusedMetadataExtension.class); } catch (IllegalArgumentException e) { // In some configurations the root manager does not have access to extensions return null; } }
private WeldUnusedMetadataExtension getUnusedMetadataExtension() { try { return getExtension(WeldUnusedMetadataExtension.class); } catch (IllegalArgumentException e) { // In some configurations the root manager does not have access to extensions return null; } }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
@Override public void init(FilterConfig filterConfig) throws ServletException { if (beanManager == null) { beanManager = BeanManagerProxy.tryUnwrap(filterConfig.getServletContext().getAttribute(WELD_SERVLET_BEAN_MANAGER_KEY)); if (beanManager == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(BeanManagerImpl.class); } } ProbeExtension probeExtension = beanManager.getExtension(ProbeExtension.class); if (probeExtension == null) { throw ProbeLogger.LOG.probeFilterUnableToOperate(ProbeExtension.class); } probe = probeExtension.getProbe(); if (!probe.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } jsonDataProvider = probeExtension.getJsonDataProvider(); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); if (configuration.getBooleanProperty(ConfigurationKey.PROBE_EMBED_INFO_SNIPPET)) { snippetBase = initSnippetBase(filterConfig.getServletContext()); } String exclude = configuration.getStringProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE); skipMonitoring = !exclude.isEmpty() && Pattern.compile(exclude).matcher(ProbeFilter.class.getName()).matches(); String allowRemoteAddress = configuration.getStringProperty(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS); allowRemoteAddressPattern = allowRemoteAddress.isEmpty() ? null : Pattern.compile(allowRemoteAddress); }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }
private void init() { if (probe == null) { synchronized (this) { if (probe == null) { Probe probeExt = beanManager.getExtension(ProbeExtension.class).getProbe(); if (!probeExt.isInitialized()) { throw ProbeLogger.LOG.probeNotInitialized(); } probe = probeExt; skipJavaBeanProperties = beanManager.getServices().get(WeldConfiguration.class) .getBooleanProperty(ConfigurationKey.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES); } } } }