[switchyard-issues] [JBoss JIRA] Created: (SWITCHYARD-222) CDI bean deployment @Reference injection failure on subsequent SwitchYard app deployments

Tom Fennelly (JIRA) jira-events at lists.jboss.org
Fri Apr 29 12:33:18 EDT 2011


CDI bean deployment @Reference injection failure on subsequent SwitchYard app deployments
-----------------------------------------------------------------------------------------

                 Key: SWITCHYARD-222
                 URL: https://issues.jboss.org/browse/SWITCHYARD-222
             Project: SwitchYard
          Issue Type: Bug
          Components: component-bean, deployment
            Reporter: Tom Fennelly
            Assignee: Tom Fennelly
             Fix For: 0.1


Background... 2 switchyard deployments.  First deployment has multiple beans with an @Reference service injection point in one of the beans, injecting a reference to the other service interface.  When you attempt to deploy the second switchyard deployment, it fails during the weld deployment validation phase with an error that the injection point in the first deployment (remember... we're now deploying the second deployment) can not be resolved.

I dug into this with a debugger and I see the following....

When the 1st deployment is being deployed, the SwitchYard CDI extension receives all of the appropriate ProcessBean @Observes events from the weld bootstrap BeanDeployer.  This triggers the addition of the SwitchYard client proxy beans for the injection point and the weld validation phase passes successfully.

When the 2nd deployment is being deployed, the WeldBootstrap class seems to go through the same process again for all deployments... loading all the classes, creating the beans, deploying them etc.  This time however, when processing the deployment for the first deployment (containing the injection points), it doesn't seem to fire the ProcessBean @Observes events for the beans, resulting in a situation where the SwitchYard client proxy is never created for the injection point, resulting in the failure during the validation phase.  From what I can make out... it looks like our SwitchYard CDI extension is not getting added to the BeanManager as one of the observers of the ProcessBean @Observes events, but I'm not totally sure about that.

I've no idea why it needs to go through all this process over and over again for every BeanDeployment archive.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the switchyard-issues mailing list