@Override public ManagedReference run() throws Exception { return view.createInstance(contextData); } });
/** {@inheritDoc} */ public ManagedReference getReference() { try { return view.createInstance(); } catch (Exception e) { throw EeLogger.ROOT_LOGGER.componentViewConstructionFailure(e); } }
@Override public ResourceReference<T> createResource() { try { final ManagedReference instance = view.createInstance(); return new ManagedReferenceToResourceReferenceAdapter<T>(instance); } catch (Exception e) { throw new RuntimeException(e); } } }
@Override public Object processInvocation(final InterceptorContext context) throws Exception { final ComponentView view = viewToCreate.getValue(); try { INIT_METHOD.set(method); INIT_PARAMETERS.set(context.getParameters()); final ManagedReference instance = view.createInstance(); return instance.getInstance(); } finally { INIT_METHOD.remove(); INIT_PARAMETERS.remove(); } } };
@Override public Object processInvocation(final InterceptorContext context) throws Exception { return viewToCreate.getValue().createInstance().getInstance(); } };
@Override public Object processInvocation(final InterceptorContext context) throws Exception { final EJBHome home = (EJBHome) homeView.getValue().createInstance().getInstance(); if (session) { if (stateless) { return createStatelessMetaData(remoteClass.asSubclass(EJBObject.class), homeClass, home); } else { return createStatefulMetaData(remoteClass.asSubclass(EJBObject.class), homeClass, home); } } else { return createEntityMetaData(remoteClass.asSubclass(EJBObject.class), homeClass, home, pkClass); } }
private Object readResolve() throws ObjectStreamException { ServiceController<ComponentView> view = (ServiceController<ComponentView>) currentServiceContainer().getRequiredService(ServiceName.parse(viewName)); try { return view.getValue().createInstance(Collections.<Object, Object>singletonMap(SessionID.class, sessionID)).getInstance(); } catch (Exception e) { throw new RuntimeException(e); } }
private Object readResolve() throws ObjectStreamException { ServiceController<ComponentView> view = (ServiceController<ComponentView>) currentServiceContainer().getRequiredService(ServiceName.parse(viewName)); try { return view.getValue().createInstance().getInstance(); } catch (Exception e) { throw new RuntimeException(e); } }
protected <T> T createViewInstanceProxy(final Class<T> viewInterface, final Map<Object, Object> contextData, final ServiceName serviceName) { final ServiceController<?> serviceController = currentServiceContainer().getRequiredService(serviceName); final ComponentView view = (ComponentView) serviceController.getValue(); final ManagedReference instance; try { if(WildFlySecurityManager.isChecking()) { instance = WildFlySecurityManager.doUnchecked(new PrivilegedExceptionAction<ManagedReference>() { @Override public ManagedReference run() throws Exception { return view.createInstance(contextData); } }); } else { instance = view.createInstance(contextData); } } catch (Exception e) { //TODO: do we need to let the exception propagate here? throw new RuntimeException(e); } return viewInterface.cast(instance.getInstance()); }
@Override public void stop(StopContext context) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } invokePreUndeploy(processApplication); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Exception while stopping process application", e); } finally { if(reference != null) { reference.release(); } } }
@Override public void stop(StopContext context) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } invokePreUndeploy(processApplication); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Exception while stopping process application", e); } finally { if(reference != null) { reference.release(); } } }
@Override public void stop(StopContext context) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } invokePreUndeploy(processApplication); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Exception while stopping process application", e); } finally { if(reference != null) { reference.release(); } } }
@Override public void stop(StopContext arg0) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } BpmPlatformPlugins bpmPlatformPlugins = platformPluginsInjector.getValue(); List<BpmPlatformPlugin> plugins = bpmPlatformPlugins.getPlugins(); for (BpmPlatformPlugin bpmPlatformPlugin : plugins) { bpmPlatformPlugin.postProcessApplicationUndeploy(processApplication); } } catch (Exception e) { LOGGER.log(Level.WARNING, "Exception while invoking BpmPlatformPlugin.postProcessApplicationUndeploy", e); } finally { if(reference != null) { reference.release(); } } }
@Override public void stop(StopContext arg0) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } BpmPlatformPlugins bpmPlatformPlugins = platformPluginsInjector.getValue(); List<BpmPlatformPlugin> plugins = bpmPlatformPlugins.getPlugins(); for (BpmPlatformPlugin bpmPlatformPlugin : plugins) { bpmPlatformPlugin.postProcessApplicationUndeploy(processApplication); } } catch (Exception e) { LOGGER.log(Level.WARNING, "Exception while invoking BpmPlatformPlugin.postProcessApplicationUndeploy", e); } finally { if(reference != null) { reference.release(); } } }
@Override public void stop(StopContext arg0) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else { processApplication = noViewProcessApplication.getValue(); } BpmPlatformPlugins bpmPlatformPlugins = platformPluginsInjector.getValue(); List<BpmPlatformPlugin> plugins = bpmPlatformPlugins.getPlugins(); for (BpmPlatformPlugin bpmPlatformPlugin : plugins) { bpmPlatformPlugin.postProcessApplicationUndeploy(processApplication); } } catch (Exception e) { LOGGER.log(Level.WARNING, "Exception while invoking BpmPlatformPlugin.postProcessApplicationUndeploy", e); } finally { if(reference != null) { reference.release(); } } }
ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else {
ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else {
ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else {
ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else {
ComponentView componentView = paComponentViewInjector.getOptionalValue(); if(componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface) reference.getInstance(); } else {