Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1019

Enterprise container friendlier deltaspike-cdictrl-weld

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.2
    • 1.5.2
    • CdiControl
    • None

    Description

      Preface

      Although deltaspike-cdictrl was designed for "SE setups", ContextControl can be used in an enterprise CDI container like WELD on JBoss/Wildfly just fine. CdiControl cannot be used.

      Problem

      Even when you do not use CdiControl, enterprise WELD will at least log ClassNotFoundException regarding org.jboss.weld.environment.se.Weld when deltaspike-cdictrl-weld is deployed.
      In WAR-deployments you might be able to exclude WeldContainerControl via beans.xml but with EAR-deployments you are out of luck.

      Solution
      • Either exclude WeldContainerControl (is created via ServiceLoader anyway):
        deltaspike-cdictrl-weld/META-INF/beans.xml
        <weld:exclude name="org.apache.deltaspike.cdise.weld.WeldContainerControl"/>
        

        PS: Not sure whether @Typed() would work as well?

      • Or provide a second assembly of deltaspike-cdictrl-weld with some classifer like "ctxctrl-only" which does not include the CdiControl stuff

      I think the beans.xml-approach is the better solution.

      Workaround

      Custom re-packing/shading of deltaspike-cdictrl-weld and possibly also deltaspike-cdictrl-api. Very cumbersome...

      Attachments

        1. DELTASPIKE-1019.patch
          0.9 kB
          Gerhard Petracek

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            struberg Mark Struberg
            famod Falko Modler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment