Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2683

DroolsSession's initWorkItemManagerFactory method can not work in a OSGi context

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • 5.4.0.CR1
    • 5.2.0.M1
    • drools-core
    • None

    Description

      This affects the current trunk.

      The code in the method does this:

      String className = this.chainedProperties.getProperty( "drools.workItemManagerFactory",
      "org.drools.process.instance.impl.DefaultWorkItemManagerFactory" );

      [..]

      clazz = (Class<WorkItemManagerFactory>) Thread.currentThread().getContextClassLoader().loadClass( className );

      [..]

      clazz = (Class<WorkItemManagerFactory>) SessionConfiguration.class.getClassLoader().loadClass( className );

      None of this can work for the default factory since drools-core does not depend on drools-flow-core (and creating a dependency would create a cycle). Actually, this won't work for customer code as well, since drools-core won't depend on their bundle.

      I suggest to use a declarative service to work around this problem, while keeping this type of instantiation around when OSGi is not on.

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            atoulme_jira Antoine Toulme (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty