4 Replies Latest reply on Feb 19, 2014 9:59 AM by Jon Kranes

    Can I turn off CDI in JBPM 6.0?

    Jon Kranes Newbie

      I am using jBoss server 7.1.1.  I don't want to use CDI in my JBPM 6.0 application but it seems to be triggered by default when I include the jbpm-runtime-manager jar, and I end up getting Weld dependency failures when my application is deployed.  Is there some way to turn CDI off for my application?   I know I can remove it from the entire server by editing standalone.xml but I'm hoping there is some way to do this for a single deployment in case other applications on the server need to use CDI.

       

      Thanks,

       

      Jon

        • 1. Re: Can I turn off CDI in JBPM 6.0?
          Maciej Swiderski Master

          you can disable subsystem from within your application using jboss-demoplyment-structure.xml, see details here. Moreover if you move to 6.0.1 you should not have issues with CDI any more as entire cdi integration was moved to jbpm-kie-services module and if you don't include it is should not affect you.

           

          HTH

          • 2. Re: Can I turn off CDI in JBPM 6.0?
            Jon Kranes Newbie

            Maciej,

             

            I tried the jboss-deployment-structure trick already but it did not seem to work.  I read somewhere that it does not work in 7.1.1 (community) but only in 7.2 (enterprise only)?  Also I am using 6.0.1, and it still has this problem.   The CDI error I am getting is coming from the jbpm-runtime-manager jar, in org.jbpm.runtime.manager.impl.factory.CDITaskServiceFactory.  The jar has a META-INF/beans.xml file which if I understand correctly is what triggers CDI for classes in that jar.

             

            Jon

            • 3. Re: Can I turn off CDI in JBPM 6.0?
              Maciej Swiderski Master

              Jon, you're right there was recently fix for runtime manager to ensure that the injection points are properly initialized before actually using them. So you could either apply that path on the version you use or try to use 6.0.2-SNAPSHOT (or time stamped version) for now.

               

              That might be the case, excluding subsystem does not work on 7.1.1. Is moving to EAP not an option? It should be available with "0 dollar subscription" or something similar (downloadable from community site)...

               

              HTH

              • 4. Re: Can I turn off CDI in JBPM 6.0?
                Jon Kranes Newbie

                Maciej,

                 

                For now I will just continue to remove Weld completely from the server, as I don't currently have any need for any CDI enabled  apps on the same server instance.  Hopefully by the time we are anywhere near production there will be a new GA release out with this issue addressed. 

                 

                Thanks,

                 

                Jon