Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2689

@Producer method never called when producing a bean from a static module

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.0.0.Final
    • 8.0.0.CR1
    • CDI / Weld
    • None
    • Hide

      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.

      Show
      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.

      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:

      @Produces
      @PicketLink
      public PartitionManager getPartitionManager() {
          // produce an instance
      }
      

      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.

              rhn-engineering-jharting Jozef Hartinger
              psilva@redhat.com Pedro Igor Craveiro
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: