4 Replies Latest reply on Mar 7, 2008 12:42 AM by starksm64

    Restricting scanning for ejbs

    starksm64

      One problem I ran into in a cts test is the Ejb3Deployment scanning for annotated ejbs. There are tests where wars are including annotated ejbs. When such a war is bundled with the ejb jar that should be the deployment unit for the ejb, duplicate ejb containers are incorrectly registered. Seems like we need a mode that disables the scanning ejbs in non-ejb units. The war is not actually treated as ejb unit in terms of deploying the ejb because the deployBeansFromLib() method only processes units with a JBossMetaData attachment. However, the war is registered as an ejb container with the Ejb3Registry, and when ejbs are resolved based on its interface by the DeploymentEjbResolver, there are duplicate ejbs seen.

      I'm not sure why we are scanning for classes if there is no JBossMetaData. Perhaps its a hangover from before having an annotation deployer. I'm going to bypass the scanning if there is no JBossMetaData. Probably need to revisit this for using ejb3 in modes outside of the server if its not going to rely on the mc deployer architecture.