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 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 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 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 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 initLazyIfNeeded(final @Observes ObserverAdded alert) throws IOException, MessagingException { if (alert.getObserver() == this) { init(new ContainerSystemPostCreate()); } }
public void deinstall(@Observes final DeployableInfoDestroyed event) { if (event.getDeployable().isDeployed()) { final Map<OperationResourceInfo, EndpointInfo> endpoints = endpointsRef.get(); for (final ApplicationInfo info : event.getDeployable().getChildren()) { for (final EndpointInfo endpoint : info.getChildren()) { endpoints.remove(endpoint.getOri()); } } } }
public void deploy(@Observes final AfterEvent<AssemblerAfterApplicationCreated> app) { if (!ClUSTER_DEPLOYMENT) { return; } final AppInfo appInfo = app.getEvent().getApp(); send(new DeployMessage(appInfo.path), appInfo); }
public void install(@Observes final ServerCreated serverCreated) { final Endpoint endpoint = serverCreated.getServer().getEndpoint(); endpoint.getInInterceptors().add(new WadlxInterceptor()); final Service service = serverCreated.getServer().getEndpoint().getService(); if (JAXRSServiceImpl.class.isInstance(service)) { final JAXRSServiceImpl jaxrsService = JAXRSServiceImpl.class.cast(service); jaxrsService.setInvoker(new WadlInvoker(jaxrsService.getInvoker(), TribestreamApplicationConfigurer.class.getClassLoader())); } }
public void monitor(@Observes final BusCreated event) { final Bus bus = event.getBus(); final Map<OperationResourceInfo, EndpointInfo> endpoints = getEndpointsRef(bus); final Repository repository = Repositories.instance(); bus.getInInterceptors().add(new ResponseTimeMessageInInterceptor(endpoints, repository)); bus.getInInterceptors().add(new EventTrackerInterceptor(endpoints, repository)); bus.getInInterceptors().add(new ResponseTimeMessageInvokerInterceptor(endpoints, repository)); bus.getOutInterceptors().add(new ResponseTimeMessageOutInterceptor(endpoints, repository)); }
public void addViewCdiExtension(@Observes final BeforeAppInfoBuilderEvent event) { final List<EjbModule> ejbModules = event.getAppModule().getEjbModules(); for (final EjbModule ejbModule : ejbModules) { final Beans beans = ejbModule.getBeans(); if (beans == null) { continue; } beans.addInterceptor(SecuredDataInterceptor.class); beans.addManagedClass(FilteredOutput.class); beans.addManagedClass(ApplicationCache.class); } }
public void undeploy(@Observes final AssemblerBeforeApplicationDestroyed event) throws Exception { if (configuration != null && configuration.isSkip()) { // mainly for tests return; } if (event.getContext().getWebBeansContext() == context) { reset(); getBeanManager().fireEvent(new ContainerStopped()); } }
public void setCache(@Observes final AssemblerAfterApplicationCreated event) { final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); final AppContext appContext = containerSystem.getAppContext(event.getApp().appId); appContext.set(GovernanceApplicationScopedService.class, new GovernanceApplicationScopedService(appContext.getId())); LOGGER.fine(GovernanceCodes.EXTENSION_REGISTERED_APP, "Successfully registered application > " + appContext.getId()); }