protected void addComponent(final DeploymentUnit deploymentUnit, final EJBComponentDescription beanDescription) { final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit); if (appclient) { deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_RESOLVABLE_COMPONENTS, beanDescription); } else { // Add this component description to module description ejbJarDescription.getEEModuleDescription().addComponent(beanDescription); } }
private void installManagedBeanComponent(String className, final EEModuleDescription moduleDescription, final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClassesDescription) { final ComponentDescription componentDescription = new WebComponentDescription(MANAGED_BEAN.toString() + "." + className, className, moduleDescription, deploymentUnit.getServiceName(), applicationClassesDescription); moduleDescription.addComponent(componentDescription); deploymentUnit.addToAttachmentList(WebComponentDescription.WEB_COMPONENTS, componentDescription.getStartServiceName()); }
public static void registerAsComponent(String listener, DeploymentUnit deploymentUnit) { final EEApplicationClasses applicationClasses = deploymentUnit.getAttachment(Attachments.EE_APPLICATION_CLASSES_DESCRIPTION); final EEModuleDescription module = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); final WebComponentDescription componentDescription = new WebComponentDescription(listener, listener, module, deploymentUnit.getServiceName(), applicationClasses); module.addComponent(componentDescription); deploymentUnit.addToAttachmentList(WebComponentDescription.WEB_COMPONENTS, componentDescription.getStartServiceName()); }
moduleDescription.addComponent(description); deploymentUnit.addToAttachmentList(WebComponentDescription.WEB_COMPONENTS, description.getStartServiceName());
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final JBossServiceXmlDescriptor serviceXmlDescriptor = deploymentUnit .getAttachment(JBossServiceXmlDescriptor.ATTACHMENT_KEY); if (serviceXmlDescriptor == null) { // Skip deployments without a service xml descriptor return; } final EEModuleDescription moduleDescription = deploymentUnit .getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION); if (moduleDescription == null) { return; // not an EE deployment } final EEApplicationClasses applicationClassesDescription = deploymentUnit .getAttachment(org.jboss.as.ee.component.Attachments.EE_APPLICATION_CLASSES_DESCRIPTION); final Map<String, ServiceComponentInstantiator> serviceComponents = new HashMap<String, ServiceComponentInstantiator>(); for (final JBossServiceConfig serviceConfig : serviceXmlDescriptor.getServiceConfigs()) { ServiceComponentDescription componentDescription = new ServiceComponentDescription(serviceConfig.getName(), serviceConfig.getCode(), moduleDescription, deploymentUnit.getServiceName(), applicationClassesDescription); moduleDescription.addComponent(componentDescription); serviceComponents.put(serviceConfig.getName(), new ServiceComponentInstantiator(deploymentUnit, componentDescription)); } deploymentUnit.putAttachment(ServiceAttachments.SERVICE_COMPONENT_INSTANTIATORS, serviceComponents); }
viewDescription.getBindingNames().addAll(Arrays.asList("java:module/" + beanName, "java:app/" + moduleDescription.getModuleName() + "/" + beanName)); componentDescription.getViews().add(viewDescription); moduleDescription.addComponent(componentDescription);
eeApplicationClasses); eeModuleDescription.addComponent(paWebComponent);
eeApplicationClasses); eeModuleDescription.addComponent(paWebComponent);
eeApplicationClasses); eeModuleDescription.addComponent(paWebComponent);
public void addSessionBeans(Collection<SessionBeanComponentDescription> sessionBeans) { for (SessionBeanComponentDescription sessionBean : sessionBeans) { this.eeModuleDescription.addComponent(sessionBean); } }
protected void addComponent(final DeploymentUnit deploymentUnit, final EJBComponentDescription beanDescription) { final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit); if (appclient) { deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_RESOLVABLE_COMPONENTS, beanDescription); } else { // Add this component description to module description ejbJarDescription.getEEModuleDescription().addComponent(beanDescription); } }
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit depUnit = phaseContext.getDeploymentUnit(); OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY); if (metadata == null || metadata.getBundleActivator() == null) return; String componentClass = metadata.getBundleActivator(); String componentName = BundleActivator.class.getSimpleName(); EEModuleDescription moduleDescription = depUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); if (moduleDescription != null) { ComponentDescription componentDescription = new ComponentDescription(componentName, componentClass, moduleDescription, depUnit.getServiceName()); moduleDescription.addComponent(componentDescription); } }
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit depUnit = phaseContext.getDeploymentUnit(); OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY); if (metadata == null || metadata.getBundleActivator() == null) return; String componentClass = metadata.getBundleActivator(); String componentName = BundleActivator.class.getSimpleName(); EEModuleDescription moduleDescription = depUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); if (moduleDescription != null) { ComponentDescription componentDescription = new ComponentDescription(componentName, componentClass, moduleDescription, depUnit.getServiceName()); moduleDescription.addComponent(componentDescription); } }
static ComponentDescription createComponentDescription(final DeploymentUnit unit, final String componentName, final String componentClassName, final String dependsOnEndpointClassName) { final EEModuleDescription moduleDescription = getRequiredAttachment(unit, EE_MODULE_DESCRIPTION); // JBoss WEB processors may install fake components for WS endpoints - removing them forcibly moduleDescription.removeComponent(componentName, componentClassName); // register WS component ComponentDescription componentDescription = new WSComponentDescription(componentName, componentClassName, moduleDescription, unit.getServiceName()); moduleDescription.addComponent(componentDescription); // register WS dependency final ServiceName endpointServiceName = EndpointService.getServiceName(unit, dependsOnEndpointClassName); componentDescription.addDependency(endpointServiceName); return componentDescription; }
static ComponentDescription createComponentDescription(final DeploymentUnit unit, final String componentName, final String componentClassName, final String dependsOnEndpointClassName) { final EEModuleDescription moduleDescription = getRequiredAttachment(unit, EE_MODULE_DESCRIPTION); // JBoss WEB processors may install fake components for WS endpoints - removing them forcibly moduleDescription.removeComponent(componentName, componentClassName); // register WS component ComponentDescription componentDescription = new WSComponentDescription(componentName, componentClassName, moduleDescription, unit.getServiceName()); moduleDescription.addComponent(componentDescription); // register WS dependency final ServiceName endpointServiceName = EndpointService.getServiceName(unit, dependsOnEndpointClassName); componentDescription.addDependency(endpointServiceName); return componentDescription; }
static ComponentDescription createComponentDescription(final DeploymentUnit unit, final String componentName, final String componentClassName, final String dependsOnEndpointClassName) { final EEModuleDescription moduleDescription = getRequiredAttachment(unit, EE_MODULE_DESCRIPTION); // JBoss WEB processors may install fake components for WS endpoints - removing them forcibly moduleDescription.removeComponent(componentName, componentClassName); // register WS component ComponentDescription componentDescription = new WSComponentDescription(componentName, componentClassName, moduleDescription, unit.getServiceName()); moduleDescription.addComponent(componentDescription); // register WS dependency final ServiceName endpointServiceName = EndpointService.getServiceName(unit, dependsOnEndpointClassName); componentDescription.addDependency(endpointServiceName, ServiceBuilder.DependencyType.REQUIRED); return componentDescription; }
moduleDescription.addComponent(description); deploymentUnit.addToAttachmentList(WebComponentDescription.WEB_COMPONENTS, description.getStartServiceName());
viewDescription.getBindingNames().addAll(Arrays.asList("java:module/" + beanName, "java:app/" + moduleDescription.getModuleName() + "/" + beanName)); componentDescription.getViews().add(viewDescription); moduleDescription.addComponent(componentDescription);
deploymentUnit.putAttachment(AppClientAttachments.MAIN_CLASS, clazz); final ApplicationClientComponentDescription description = new ApplicationClientComponentDescription(clazz.getName(), moduleDescription, deploymentUnit.getServiceName(), applicationClasses); moduleDescription.addComponent(description); deploymentUnit.putAttachment(AppClientAttachments.APPLICATION_CLIENT_COMPONENT, description);
} else { ejbJarDescription.getEEModuleDescription().addComponent(description);