Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2648

Eager EJB Injection

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None
    • Undefined

    Description

       
      i am transforming a Java EE application from Weblogic 12.2.1.3 to Wildfly 18.1 (need to stick to Java 1.8) and i am facing a problem with "Eager" EJB injection.

      For example, in the deployment of war named MyWar that contains a ViewScopedBean:

        @ViewScoped
       public class BatchCCBean implements Serializable {

      @EJB(lookup = "java:global/consumer.batch.common/BatchJobService!com.company.api.batch.RemoteBatchJobService")
        RemoteBatchJobService batchJobService;

      }

       

      In Weblogic, if consumer.batch.common is NOT deployed during MyWar deployment, everything goes OK, deployment succeeds. If and only IF you try to initialize the BatchCCBean then you get an Exception. In other words it uses lazy EJB initialization.

      BUT in Wildfly, I cannot deploy the MyWar application without deploying consumer.batch.common first because Weld in Wildfly 18.1 tries to eagerly initialize all Remote EJB injections during deployment time.

      This is not a wanted behavior. Is it possible to disable "Eager Remote EJB Injection" in Wildfly's Weld?

      Thanks

      {{}}

      Attachments

        Activity

          People

            Unassigned Unassigned
            teohaik Theodore Chaikalis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: