[jboss-jira] [JBoss JIRA] (WFLY-2689) @Producer method never called when producing a bean from a static module

Pedro Igor (JIRA) issues at jboss.org
Thu Dec 26 07:59:32 EST 2013


     [ https://issues.jboss.org/browse/WFLY-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Igor updated WFLY-2689:
-----------------------------

    Steps to Reproduce: 
1) Please clone this branch:

https://github.com/pedroigor/picketlink-as-subsystem/tree/WFLY_8.PLINK-348

2) Run  mvn -Pintegration-tests clean install

3) Start WildFly from the following location target/integration-tests/containers/wildfly-8.0.0.CR1/

4) Run the following Arquillian test: test.org.picketlink.as.subsystem.core.integration.AuthenticationWithSubsystemPartitionManagerTestCase

The test.org.picketlink.as.subsystem.core.integration.MyPartitionManagerProducer producer method is never called.

  was:
I'm using a simple Arquillian test deploying an archive like this:

{code}
ShrinkWrap
    .create(WebArchive.class, "test.war")
    .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
    .addAsManifestResource(new StringAsset("Dependencies: org.picketlink.core meta-inf,org.picketlink.core.api meta-inf,org.picketlink.idm.api meta-inf\n"), "MANIFEST.MF")
    .addClass(AuthenticationWithEmbeddedPartitionManagerTestCase.class);
{code}


    
> @Producer method never called when producing a bean from a static module
> ------------------------------------------------------------------------
>
>                 Key: WFLY-2689
>                 URL: https://issues.jboss.org/browse/WFLY-2689
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld
>    Affects Versions: 8.0.0.CR1
>         Environment: WildFly 8.0.0.CR1
>            Reporter: Pedro Igor
>            Assignee: Stuart Douglas
>
> I've configured a static module for PicketLink CDI library. This library provides some extensions which are loaded fine, as described by WFLY-1370.
> However, I'm trying to deploy my application which the following producer method:
> {code}
> @Produces
> @PicketLink
> public PartitionManager getPartitionManager() {
>     // produce an instance
> }
> {code}
> Where the @PicketLink annotation is a qualifier that allows my deployment to provide its own instance instead.
> In the PicketLink side, we have a injection point as follows:
> @Inject
> @PicketLink
> private Instance<PartitionManager> partitionManagerInstance;
> Where a call to partitionManagerInstance.isUnsatisfied() always returns true, even if my deployment provides a proper producer method.
> The issue here is that the producer method is never called, despite the use of qualifiers or not.
> FYI, I'm able to listen for events fired by PicketLink during the application startup as follows:
> public void observeIdentityConfigurationEvent(@Observes IdentityConfigurationEvent event) {
>     // observer
> }
> Where IdentityConfigurationEvent is one of the lifecycle events fired by PicketLink during the startup.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list