[jboss-jira] [JBoss JIRA] (DROOLS-1540) Drools does not work with spring-boot-devtools
Fabio Bonfante (Jira)
issues at jboss.org
Thu May 23 05:54:00 EDT 2019
[ https://issues.jboss.org/browse/DROOLS-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13737673#comment-13737673 ]
Fabio Bonfante commented on DROOLS-1540:
----------------------------------------
First thank's for the fix, I've looked to the commit and try to figure out how I can safely use drools and the devtools in the future without too much "worries" about versions upgrades (of both of them).
I've a couple of questions:
# There's a specific version of spring-boot-devtools covered by the fix (1.5.x or 2.x) ? (saw that depends if the classLoader is an OSGI classloader... just for curiosity how this play a role with the devtools?)
# Can Drools detect if the object inserted in the kieSession have a different classloader than himself and throws an exception?
I can imagine that the kieSession has reference to the classes imported in the drl file, and a check with an object inserted in the session can reveal if the same classes (using Class.getName() for example) have different classloaders.
I'm surely missing (probably a lot of) details, but I think an exception like that could be helpful to prevent the current "silent" behaviour (es. [optaplanners rules don't fire|https://stackoverflow.com/questions/35746370/optaplanners-drools-rules-dont-fire-with-spring-boots-devtools-on-the-classpa]) in future deployments of drools not limited with this spring-boot-devtools corner case.
> Drools does not work with spring-boot-devtools
> ----------------------------------------------
>
> Key: DROOLS-1540
> URL: https://issues.jboss.org/browse/DROOLS-1540
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.5.0.Final, 7.20.0.Final
> Reporter: G Xiong
> Assignee: Mario Fusco
> Priority: Critical
> Attachments: complete.zip
>
>
> Drools does work with spring-boot-devtools.
> If you add in pom.xml the following, no rules will be fired in Drools.
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-devtools</artifactId>
> </dependency>
> if you comment out this, then rules will be fired in Drools.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list