Uploaded image for project: 'JBoss Enterprise SOA Platform'
  1. JBoss Enterprise SOA Platform
  2. SOA-2419

Drools called from an EJB do not see objects in working memory

    Details

    • Affects Testing:
      Regression
    • Release Notes Text:
      Hide
      Using the JBoss Rules ESB service (jbrules.esb) from an EJB would not work for any EJB deployed after the first. This was because the classes were loaded using the jbrules.esb classloader instead of the context classloader. Because the class is cached between deployments, calls by subsequent deployments would be using the wrong classloader. This has been resolved by ensuring that all deployments would attempt to use the context class loader first.
      Show
      Using the JBoss Rules ESB service (jbrules.esb) from an EJB would not work for any EJB deployed after the first. This was because the classes were loaded using the jbrules.esb classloader instead of the context classloader. Because the class is cached between deployments, calls by subsequent deployments would be using the wrong classloader. This has been resolved by ensuring that all deployments would attempt to use the context class loader first.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      I have and ESB application that calls a custom action. In this custom action I call an EJB session bean. This bean uses Drools to evaluate the incoming object. See the attached application for more information.

      When I deploy the application (ant deploy) and run the test (ant runtest) it works well and you can see the following line in the console:
      18:07:06,261 INFO [STDOUT] Driver's computed risk group=10

      When you redeploy the application (ant undeploy, ant deploy) and run the test again, no rules except for a dummy log rule are evaluated. You can recognize it in the console log:
      18:12:34,745 INFO [STDOUT] Driver's computed risk group=0

      The rule file is jar/src/org/jboss/soa/esb/samples/quickstart/integration/drools/slsb/RiskGroup.drl. I believe that the issue is with working memory. Simple rule like the following gets evaluated:
      rule "log"
      dialect "mvel"
      when
      eval(true)
      then
      System.out.println("Rules are evaluating");
      end

      If you configure a rule that grabs any Driver object like the following one, it is not evaluated:
      rule "log"
      dialect "mvel"
      when
      p : Driver( )
      then
      System.out.println("Rules are evaluating");
      end

      However, the session bean puts a real populated object into it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tsurdilovic Tihomir Surdilovic
                  Reporter:
                  mvecera Martin Vecera
                  Writer:
                  Dana Mison
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: