public void bootDone(@Observes final AssemblerCreated assemblerCreated) { extensionsLogger.removeHandler(openejbHandler); openejbHandler = null; extensionsLogger = null; failingErrors = null; }
public void requestStarted(@Observes final RequestStarted requestStarted) { if (!active) { return; } requestEvents.set(new ArrayList<>()); }
public void shutdown(@Observes final AssemblerDestroyed end) { if (thread != null && thread.watch.compareAndSet(true, false)) { try { thread.join(); } catch (final InterruptedException e) { Thread.interrupted(); } } }
@SuppressWarnings("UnusedParameters") public void observe(@Observes final ContainerSystemPreDestroy preDestroy) { stop(); }
public void initEnvironment(@Observes final ObserverAdded event) { if (event.getObserver() == this && !Boolean.getBoolean("openejb.batchee.integration.skip")) { ServicesManager.setServicesManagerLocator(this); } }
public void customizeWBC(@Observes final WebBeansContextCreated webBeansContextCreated) { if (ofNullable(starting.get()).orElse(false)) { webBeansContextCreated.getContext().registerService(ValidatorService.class, new ContainerValidatorService()); } else { starting.remove(); } }
public void newEjbToDeploy(final @Observes NewEjbAvailableAfterApplicationCreated event) { final AppInfo app = event.getApp(); if (!deployedApplications.containsKey(app)) { deployedApplications.putIfAbsent(app, new LinkedList<BeanContext>()); } deployApp(app, event.getBeanContexts()); }
public void newEjbToDeploy(final @Observes NewEjbAvailableAfterApplicationCreated event) { final AppInfo app = event.getApp(); if (!deployedApplications.containsKey(app)) { deployedApplications.putIfAbsent(app, new LinkedList<BeanContext>()); } deployApp(app, event.getBeanContexts()); }
public void reset(@Observes final AssemblerDestroyed ignored) { try { StoreManager.closeStoreManager(); } catch (Exception e) { LOGGER.severe(SecurityCodes.STORE_MANAGER_CLEANUP_UNABLE_SHUTDOWN, "Unable to properly shutdown store manager watcher", e); } }
public void stop(@Observes final StopWatchFile file) { if (thread == null) { return; } thread.unregister(file.getFile()); }
public void doInject(@Observes final ComponentAdded<?> component) { if (!component.getComponent().getClass().isAnnotationPresent(Injectable.class)) { return; } inject(component.getComponent()); }
public void addProviders(@Observes final ExtensionProviderRegistration event) { event.getProviders().addAll( asList(new ConcurrentLimitExceededExceptionMapper(), new RateLimitExceededExceptionMapper())); }
public void switchJaxrsOffForInternalWebApp(@Observes final BeforeAppInfoBuilderEvent event) { if (event.getAppModule().getModuleId().equals(TOMITRIBE_MONITOR_CONTEXT.substring(1))) { // / is removed from id // we handle it manually, we can desire to move to auto deployment but would need to check security etc event.getAppModule().getProperties().put("openejb.jaxrs.on", "false"); } }
public void email(final @Observes Alert alert) throws IOException, MessagingException { if (accepted.isEmpty() || accepted.contains(alert.getType())) { SystemInstance.get().fireEvent(new AlertEvent(alert)); } }
public void deploy(final @Observes AssemblerAfterApplicationCreated event) { final AppInfo appInfo = event.getApp(); if (deployedApplications.put(appInfo, new LinkedList<BeanContext>()) == null) { deployApp(appInfo, event.getContext().getBeanContexts()); } }
public void deploy(final @Observes AssemblerAfterApplicationCreated event) { final AppInfo appInfo = event.getApp(); if (deployedApplications.put(appInfo, new LinkedList<BeanContext>()) == null) { deployApp(appInfo, event.getContext().getBeanContexts()); } }
public void cdiToContainerSetup(final @Observes WebBeansContextCreated webBeansContextCreated) throws Exception { final WebBeansContext context = webBeansContextCreated.getContext(); context.getOpenWebBeansConfiguration().setProperty(AlertCDIBridge.class.getName() + ".accepted", accepted.isEmpty() ? "*" : Join.join(",", accepted)); CdiScanner.class.cast(context.getScannerService()).getBeanClasses().add(DefaultObserver.class); }
public void undeploy(@Observes final AssemblerBeforeApplicationDestroyed app) { if (!ClUSTER_DEPLOYMENT) { return; } final AppInfo appInfo = app.getApp(); send(new UndeployMessage(appInfo.path), appInfo); }
public void initLazyIfNeeded(final @Observes ObserverAdded alert) throws Exception { if (alert.getObserver() == this) { init(new ContainerSystemPostCreate()); } }
public void addProviders(@Observes final ExtensionProviderRegistration event) { final ErrorMappingExceptionMapper exceptionMapper = new ErrorMappingExceptionMapper(); event.getAppContext().set(ErrorMappingExceptionMapper.class, exceptionMapper); event.getProviders().add(exceptionMapper); }