Skip to content

Commit

Permalink
WFLY-4185 Only remove EJB's from the set of discovered external types
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Dec 17, 2014
1 parent 31351bf commit d1a8753
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.jboss.as.ee.component.ComponentDescription;
import org.jboss.as.ee.component.EEModuleDescription;
import org.jboss.as.ee.weld.WeldDeploymentMarker;
import org.jboss.as.ejb3.component.EJBComponentDescription;
import org.jboss.as.server.deployment.Attachments;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
Expand Down Expand Up @@ -87,7 +88,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
return;
}

final Set<String> componentClassNames = new HashSet<>();
final Set<String> ejbClassName = new HashSet<>();

final String beanArchiveIdPrefix = deploymentUnit.getName() + ".external.";

Expand Down Expand Up @@ -117,7 +118,9 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
EEModuleDescription moduleDesc = deployment.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
if(moduleDesc != null) {
for(ComponentDescription component : moduleDesc.getComponentDescriptions()) {
componentClassNames.add(component.getComponentClassName());
if(component instanceof EJBComponentDescription) {
ejbClassName.add(component.getComponentClassName());
}
}
}
}
Expand Down Expand Up @@ -161,7 +164,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
if (!urlScanner.handleBeansXml(url, discoveredClasses)) {
continue;
}
discoveredClasses.removeAll(componentClassNames);
discoveredClasses.removeAll(ejbClassName);

final BeanDeploymentArchiveImpl bda = new BeanDeploymentArchiveImpl(new HashSet<String>(discoveredClasses), beansXml, dependency, beanArchiveIdPrefix + url.toExternalForm(), BeanArchiveType.EXTERNAL);
WeldLogger.DEPLOYMENT_LOGGER.beanArchiveDiscovered(bda);
Expand Down

0 comments on commit d1a8753

Please sign in to comment.