protected static EjbJarDescription getEjbJarDescription(final DeploymentUnit deploymentUnit) { EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION); final EEApplicationClasses applicationClassesDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_APPLICATION_CLASSES_DESCRIPTION); if (ejbJarDescription == null) { final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION); ejbJarDescription = new EjbJarDescription(moduleDescription, deploymentUnit.getName().endsWith(".war")); deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION, ejbJarDescription); } return ejbJarDescription; }
private void processSecurityRoles(final SecurityRolesMetaData securityRoles, final EjbJarDescription ejbJarDescription) { if (securityRoles == null || securityRoles.isEmpty()) { return; } for (final SecurityRoleMetaData securityRole : securityRoles) { final String roleName = securityRole.getRoleName(); if (roleName != null && !roleName.trim().isEmpty()) { // Augment the security roles // EJB 3.1 spec, section 17.3.1: // The Bean Provider may augment the set of security roles defined for the application by annotations in // this way by means of the security-role deployment descriptor element. ejbJarDescription.addSecurityRole(roleName); } } }
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); } }
super(componentName, componentClassName, ejbJarDescription.getEEModuleDescription(), deploymentUnitServiceName); this.descriptorData = descriptorData; if (ejbJarDescription.isWar()) { setNamingMode(ComponentNamingMode.USE_MODULE); } else {
@Override public boolean contains(Object o) { return ejbJarDescription.hasComponent((String) o); } };
super(componentName, componentClassName, ejbJarDescription.getEEModuleDescription(), deploymentUnitServiceName); this.descriptorData = descriptorData; if (ejbJarDescription.isWar()) { setNamingMode(ComponentNamingMode.USE_MODULE); } else {
@Override public boolean contains(Object o) { return ejbJarDescription.hasComponent((String) o); } };
if (!deploymentUnit.hasAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION)) { final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION); final EjbJarDescription ejbModuleDescription = new EjbJarDescription(moduleDescription, deploymentUnit.getName().endsWith(".war")); deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION, ejbModuleDescription);
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 processSecurityRoles(final SecurityRolesMetaData securityRoles, final EjbJarDescription ejbJarDescription) { if (securityRoles == null || securityRoles.isEmpty()) { return; } for (final SecurityRoleMetaData securityRole : securityRoles) { final String roleName = securityRole.getRoleName(); if (roleName != null && !roleName.trim().isEmpty()) { // Augment the security roles // EJB 3.1 spec, section 17.3.1: // The Bean Provider may augment the set of security roles defined for the application by annotations in // this way by means of the security-role deployment descriptor element. ejbJarDescription.addSecurityRole(roleName); } } }
protected static EjbJarDescription getEjbJarDescription(final DeploymentUnit deploymentUnit) { EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION); final EEApplicationClasses applicationClassesDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_APPLICATION_CLASSES_DESCRIPTION); if (ejbJarDescription == null) { final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION); ejbJarDescription = new EjbJarDescription(moduleDescription, applicationClassesDescription, deploymentUnit.getName().endsWith(".war")); deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION, ejbJarDescription); } return ejbJarDescription; }
} else { ejbJarDescription.getEEModuleDescription().addComponent(description);
if (!deploymentUnit.hasAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION)) { final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION); final EjbJarDescription ejbModuleDescription = new EjbJarDescription(moduleDescription, applicationClassesDescription, deploymentUnit.getName().endsWith(".war")); deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION, ejbModuleDescription);