[JBoss JIRA] (DROOLS-676) Optional SortedMap semantics for matching
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-676?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-676.
--------------------------------
Resolution: Done
We already have indexes for comparison constraints ( e.g. https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/jav... ) based on a custom made implementation of a red-black tree.
> Optional SortedMap semantics for matching
> -----------------------------------------
>
> Key: DROOLS-676
> URL: https://issues.jboss.org/browse/DROOLS-676
> Project: Drools
> Issue Type: Feature Request
> Affects Versions: 6.2.0.CR3
> Environment: any
> Reporter: Paul Houle
> Assignee: Mario Fusco
> Original Estimate: 4 weeks
> Remaining Estimate: 4 weeks
>
> Drools uses a Map instead of a SortedMap to accelerate the matching of patterns that have an equality relationship. Performance-wise this is the right decision most of the time, but if one wanted to accelerate matching of patterns such as
> Person(age > 100)
> having a sorted index could be beneficial. In a case like that the object in question must implement Comparable or be associated with a Comparator. This behavior could be turned on for a particular field with @-annotation in either the DRL or Java file.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (DROOLS-676) Optional SortedMap semantics for matching
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-676?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-676:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Optional SortedMap semantics for matching
> -----------------------------------------
>
> Key: DROOLS-676
> URL: https://issues.jboss.org/browse/DROOLS-676
> Project: Drools
> Issue Type: Feature Request
> Affects Versions: 6.2.0.CR3
> Environment: any
> Reporter: Paul Houle
> Assignee: Mario Fusco
> Original Estimate: 4 weeks
> Remaining Estimate: 4 weeks
>
> Drools uses a Map instead of a SortedMap to accelerate the matching of patterns that have an equality relationship. Performance-wise this is the right decision most of the time, but if one wanted to accelerate matching of patterns such as
> Person(age > 100)
> having a sorted index could be beneficial. In a case like that the object in question must implement Comparable or be associated with a Comparator. This behavior could be turned on for a particular field with @-annotation in either the DRL or Java file.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (DROOLS-673) NPE because ConsequenceMetaData.toString is not null-safe
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-673?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-673:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> NPE because ConsequenceMetaData.toString is not null-safe
> ---------------------------------------------------------
>
> Key: DROOLS-673
> URL: https://issues.jboss.org/browse/DROOLS-673
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final
> Reporter: george thomas
> Assignee: Mario Fusco
> Priority: Minor
> Attachments: ConsequenceMetaData.NPE.log
>
>
> The {{toString()}} method in {{org.drools.core.rule.ConsequenceMetaData}} is not null-safe. It assumes that the {{List}} {{statements}} contains at least one element.
> This is a problem when the method gets invoked during the serialization-based deep clone effected during initialization under certain conditions (see the "Reproduce" section).
> With this combination, code in {{java.io.ObjectOutputStream}} ends up invoking the {{toString()}} method in order to print additional information in the stack trace for {{java.io.NotSerializableException}}. I have attached a snippet of the stack trace as a reference.
> The code in question is unchanged even in the [latest version in github|https://github.com/droolsjbpm/drools/blob/master/drools-core/src/m...].
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (WFLY-4205) Undertow not detecting @HandlesTypes If the implentation class is inside EAR/lib
by Nick . (JIRA)
[ https://issues.jboss.org/browse/WFLY-4205?page=com.atlassian.jira.plugin.... ]
Nick . updated WFLY-4205:
-------------------------
Labels: EAR servlet3.0 spring-mvc (was: servlet3.0 spring-mvc)
> Undertow not detecting @HandlesTypes If the implentation class is inside EAR/lib
> --------------------------------------------------------------------------------
>
> Key: WFLY-4205
> URL: https://issues.jboss.org/browse/WFLY-4205
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 8.2.0.Final
> Environment: Wildfly 8.2.0 Final, Spring MVC, Ubuntu 14.04
> Reporter: Nick .
> Assignee: Stuart Douglas
> Labels: EAR, servlet3.0, spring-mvc
>
> Hi,
> I have spring mvc enabled web apps (20+ web apps) packaged as an EAR deployment. All my spring mvc related jar's are in my EAR/lib, i'm using SpringServletContainerInitializer (implementation of ServletContainerInitializer ) code as follows
> {code}
> @HandlesTypes(WebApplicationInitializer.class)
> public class SpringServletContainerInitializer implements ServletContainerInitializer {
> @Override
> public void onStartup(Set<Class<?>> webAppInitializerClasses, ServletContext servletContext)
> throws ServletException {
> List<WebApplicationInitializer> initializers = new LinkedList<WebApplicationInitializer>();
> if (webAppInitializerClasses != null) {
> for (Class<?> waiClass : webAppInitializerClasses) {
> // Be defensive: Some servlet containers provide us with invalid classes,
> // no matter what @HandlesTypes says...
> if (!waiClass.isInterface() && !Modifier.isAbstract(waiClass.getModifiers()) &&
> WebApplicationInitializer.class.isAssignableFrom(waiClass)) {
> try {
> initializers.add((WebApplicationInitializer) waiClass.newInstance());
> }
> catch (Throwable ex) {
> throw new ServletException("Failed to instantiate WebApplicationInitializer class", ex);
> }
> }
> }
> }
> if (initializers.isEmpty()) {
> servletContext.log("No Spring WebApplicationInitializer types detected on classpath");
> return;
> }
> AnnotationAwareOrderComparator.sort(initializers);
> servletContext.log("Spring WebApplicationInitializers detected on classpath: " + initializers);
> for (WebApplicationInitializer initializer : initializers) {
> initializer.onStartup(servletContext);
> }
> }
> }
> {code}
> But the @HandlesTypes(WebApplicationInitializer.class) are not getting detected from the EAR/lib
> Even i have tried adding the extracted the SPI from spring-web jar and added inside my war's WEB-INF/lib as a jar
> WEB-INF/lib/web-init-spi.jar which contains
> META-INF/services/javax.servlet.ServletContainerIntializer file with org.springframework.web.SpringServletContainerInitializer as an entry. This time its detecting SpringServletContainerInitializer but not detecting what defined in @HandlesTypes
> Its only working If i package all those spring mvc jars inside WEB-INF/lib then everything started working.
> I have no idea this is how the servlet specification works or its a wildfly issue but i see it as a problem for those who depends on Wildfly or similar EE Servers with an EAR deployment structure.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (WFLY-4205) Undertow not detecting @HandlesTypes If the implentation class is inside EAR/lib
by Nick . (JIRA)
[ https://issues.jboss.org/browse/WFLY-4205?page=com.atlassian.jira.plugin.... ]
Nick . updated WFLY-4205:
-------------------------
Environment: Wildfly 8.2.0 Final, EAR Deployment, Spring MVC, Ubuntu 14.04 (was: Wildfly 8.2.0 Final, Spring MVC, Ubuntu 14.04)
> Undertow not detecting @HandlesTypes If the implentation class is inside EAR/lib
> --------------------------------------------------------------------------------
>
> Key: WFLY-4205
> URL: https://issues.jboss.org/browse/WFLY-4205
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 8.2.0.Final
> Environment: Wildfly 8.2.0 Final, EAR Deployment, Spring MVC, Ubuntu 14.04
> Reporter: Nick .
> Assignee: Stuart Douglas
> Labels: EAR, servlet3.0, spring-mvc
>
> Hi,
> I have spring mvc enabled web apps (20+ web apps) packaged as an EAR deployment. All my spring mvc related jar's are in my EAR/lib, i'm using SpringServletContainerInitializer (implementation of ServletContainerInitializer ) code as follows
> {code}
> @HandlesTypes(WebApplicationInitializer.class)
> public class SpringServletContainerInitializer implements ServletContainerInitializer {
> @Override
> public void onStartup(Set<Class<?>> webAppInitializerClasses, ServletContext servletContext)
> throws ServletException {
> List<WebApplicationInitializer> initializers = new LinkedList<WebApplicationInitializer>();
> if (webAppInitializerClasses != null) {
> for (Class<?> waiClass : webAppInitializerClasses) {
> // Be defensive: Some servlet containers provide us with invalid classes,
> // no matter what @HandlesTypes says...
> if (!waiClass.isInterface() && !Modifier.isAbstract(waiClass.getModifiers()) &&
> WebApplicationInitializer.class.isAssignableFrom(waiClass)) {
> try {
> initializers.add((WebApplicationInitializer) waiClass.newInstance());
> }
> catch (Throwable ex) {
> throw new ServletException("Failed to instantiate WebApplicationInitializer class", ex);
> }
> }
> }
> }
> if (initializers.isEmpty()) {
> servletContext.log("No Spring WebApplicationInitializer types detected on classpath");
> return;
> }
> AnnotationAwareOrderComparator.sort(initializers);
> servletContext.log("Spring WebApplicationInitializers detected on classpath: " + initializers);
> for (WebApplicationInitializer initializer : initializers) {
> initializer.onStartup(servletContext);
> }
> }
> }
> {code}
> But the @HandlesTypes(WebApplicationInitializer.class) are not getting detected from the EAR/lib
> Even i have tried adding the extracted the SPI from spring-web jar and added inside my war's WEB-INF/lib as a jar
> WEB-INF/lib/web-init-spi.jar which contains
> META-INF/services/javax.servlet.ServletContainerIntializer file with org.springframework.web.SpringServletContainerInitializer as an entry. This time its detecting SpringServletContainerInitializer but not detecting what defined in @HandlesTypes
> Its only working If i package all those spring mvc jars inside WEB-INF/lib then everything started working.
> I have no idea this is how the servlet specification works or its a wildfly issue but i see it as a problem for those who depends on Wildfly or similar EE Servers with an EAR deployment structure.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (DROOLS-674) Rules with bigdecimal comparison not matched for certain values
by Davide Sottara (JIRA)
[ https://issues.jboss.org/browse/DROOLS-674?page=com.atlassian.jira.plugin... ]
Davide Sottara updated DROOLS-674:
----------------------------------
Affects Version/s: 6.2.0.CR3
> Rules with bigdecimal comparison not matched for certain values
> ---------------------------------------------------------------
>
> Key: DROOLS-674
> URL: https://issues.jboss.org/browse/DROOLS-674
> Project: Drools
> Issue Type: Bug
> Affects Versions: 5.5.0.Final, 6.2.0.CR3
> Reporter: Joseph Alex
> Assignee: Mark Proctor
> Priority: Minor
> Attachments: BigDecimalTestFragment.java
>
>
> For rules which compare BigDecimal inputs against a range considering 2 decimal place precision, match does not happen when the input equals certain upper bounds. Testcase attached.
> The rules match when the upper bound is specified with a < condition instead of <= (i.e <70.00 instead of <=69.99) , which seem to indicate value seen by Drools is somewhere between the two.
> Envrionment:
> Drools : 5.5.0.Final
> Java version : Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
> OS : CentOS release 6.1 (Final)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months
[JBoss JIRA] (DROOLS-677) Resolve nested classes when parent is imported
by Davide Sottara (JIRA)
Davide Sottara created DROOLS-677:
-------------------------------------
Summary: Resolve nested classes when parent is imported
Key: DROOLS-677
URL: https://issues.jboss.org/browse/DROOLS-677
Project: Drools
Issue Type: Bug
Affects Versions: 6.2.0.CR3
Reporter: Davide Sottara
Assignee: Mark Proctor
Priority: Minor
Fix For: 6.2.0.Final
Inner classes are not resolved correctly if qualified using their parent class:
{code}
import Outer;
declare Bean
field : Outer.Inner // an inner class of Outer
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 4 months