[JBoss JIRA] (JBRULES-3529) JMS messanger for JBOSS AS 7.1
by Cyril Sochor (JIRA)
Cyril Sochor created JBRULES-3529:
-------------------------------------
Summary: JMS messanger for JBOSS AS 7.1
Key: JBRULES-3529
URL: https://issues.jboss.org/browse/JBRULES-3529
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-core (fusion)
Affects Versions: 5.3.1.Final
Environment: jboss-as-7.1.1.Final, java 1.6.9_29 64
Reporter: Cyril Sochor
Assignee: Mark Proctor
Fix For: 5.3.2.Final
JBOSS AS 7.1 is not supported by pipeline JmsMessanger. Connection factory JNDI name is string constant "ConnectionFactory" and is not customizable! JBOSS AS 7.1 has new remote interface and JNDI name "RemoteConnectionFactory" is required. Connection with principal and credentials is also required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (JBRULES-3240) Unable to build expression for 'inline-eval' when using Lists of objects
by Richard Ambridge (Created) (JIRA)
Unable to build expression for 'inline-eval' when using Lists of objects
------------------------------------------------------------------------
Key: JBRULES-3240
URL: https://issues.jboss.org/browse/JBRULES-3240
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.3.0.CR1
Environment: Ubuntu, JDK 1.6.0.26
Reporter: Richard Ambridge
Assignee: Mark Proctor
If a Rule has a .size== in when and the variable is an Object, then we get the following:-
Unable to build expression for 'inline-eval' : [Error: incompatible types in statement: class java.lang.Integer (compared from: class droolstesting.SubType)]
Full example:
Rule:
package droolstesting
rule "rule2"
dialect "mvel"
when
$m : MyItem(items!=null || items.size == 0)
then
System.out.println("Got 0");
retract($m)
end
MyItems.java:
package droolstesting;
import java.util.ArrayList;
import java.util.List;
public class MyItem {
int number=0;
String string="empty";
List<SubType> items=new ArrayList<SubType>();
public List<SubType> getItems() {
return items;
}
public void setItems(List<SubType> items) {
this.items = items;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
}
SubType.java:
package droolstesting;
public class SubType {
String name="";
}
Main.java:
package droolstesting;
import java.io.File;
import java.io.IOException;
import org.drools.compiler.DroolsParserException;
import org.drools.compiler.PackageBuilder;
import org.drools.io.ResourceFactory;
/**
*
* @author richarda
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException, DroolsParserException {
PackageBuilder pkgBuilder = new PackageBuilder();
pkgBuilder.addPackageFromDrl(ResourceFactory.newClassPathResource("rule1.drl"));
if (pkgBuilder.hasErrors()) {
System.err.println(pkgBuilder.getErrors().toString());
throw new RuntimeException("Unable to compile rules");
}
pkgBuilder.addPackageFromDrl(ResourceFactory.newClassPathResource("rule2.drl"));
if (pkgBuilder.hasErrors()) {
System.err.println(pkgBuilder.getErrors().toString());
throw new RuntimeException("Unable to compile rules");
}
}
}
Result:
run:
Unable to build expression for 'inline-eval' : [Error: incompatible types in statement: class java.lang.Integer (compared from: class droolstesting.SubType)]
[Near : {... items != null || items.size == 0 ....}]
^
[Line: 6, Column: 14]'items != null || items.size == 0'
[Error: incompatible types in statement: class java.lang.Integer (compared from: class droolstesting.SubType)]
[Near : {... items != null || items.size == 0 ....}]
^
[Line: 6, Column: 14] : [Rule name='rule2']
[Error: incompatible types in statement: class java.lang.Integer (compared from: class droolstesting.SubType)]
[Near : {... items != null || items.size == 0 ....}]
^
[Line: 1, Column: 18]
Exception in thread "main" java.lang.RuntimeException: Unable to compile rules
at droolstesting.Main.main(Main.java:32)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (JBRULES-3663) Use a common thread pool for all TimerJobInstances
by Sebastian Calbaza (JIRA)
Sebastian Calbaza created JBRULES-3663:
------------------------------------------
Summary: Use a common thread pool for all TimerJobInstances
Key: JBRULES-3663
URL: https://issues.jboss.org/browse/JBRULES-3663
Project: Drools
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: Sebastian Calbaza
Assignee: Mark Proctor
>From what I've seen(correct me if I'm wrong) there is, for each StatefulKnowledgeSession a TimeManager -> JDKTimerService instances pair that use a ScheduledThreadPoolExecutor of size one(default) for scheduling timer job instances.
Now the issues that I see are:
* not optimal resource utilization in case of large number of sessions
* number of sessions bounded by available memory for threads
* some performance penalty for concurrent jobs (I say some because all session ops are serial)
I provided also a PR with to be reviewed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] Created: (JBRULES-3095) MVEL equality is not working as in 5.1.1
by Mauricio Salatino (JIRA)
MVEL equality is not working as in 5.1.1
----------------------------------------
Key: JBRULES-3095
URL: https://issues.jboss.org/browse/JBRULES-3095
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Mauricio Salatino
Assignee: Mark Proctor
Attachments: MvelEquality.zip
There is a different behavior caused by what I think is an MVEL regretion in the version that it's being used in 5.3.0.SNAPSHOT.
Patient( groupName == "ceftazidime susc islt" || groupName == "ceftfsdfsazidime susc islt") // this doesn't work
and
Patient( groupName == "ceftazidime susc islt") // This works!!
The field groupName is an Object that overrides the method equals following the java convention for comparing objects.
I'm attaching an isolated unit test showing this problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] Created: (JBRULES-2518) equal sign (=) in string literal in MVEL modify statement causes error
by Steve Miner (JIRA)
equal sign (=) in string literal in MVEL modify statement causes error
----------------------------------------------------------------------
Key: JBRULES-2518
URL: https://jira.jboss.org/browse/JBRULES-2518
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Environment: Mac OS X 10.6.3, Java 1.6
Reporter: Steve Miner
Assignee: Mark Proctor
rule "mvel equal sign bug"
dialect "mvel"
when
$d: Dog(name == "Bertie")
then
modify ($d) {name = "Bertie = Boy"};
end
Note the string literal for the new value for name contains an equal sign (=). That causes an error. Apparently, the modify macro or the MVEL parser is choking on the equal sign.
java.lang.Error: org.drools.rule.InvalidRulePackage: Unable to build expression for 'consequence': [Error: unterminated literal]
[Near : {... h ($d) {name = "Bertie = Boy"} ....}]
^
[Line: 1, Column: 43] ' modify ($d) {name = "Bertie = Boy"};
' : [Rule name='mvel equal sign bug']
If I remove the "=" from inside the string literal (substituting "is a"), it works as expected.
rule "mvel equal sign bug"
dialect "mvel"
when
$d: Dog(name == "Bertie")
then
modify ($d) {name = "Bertie is a Boy"};
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] Created: (JBRULES-2406) Unable to create Field extractor error caused by methods like public boolean setTime()
by Jos Hendriks (JIRA)
Unable to create Field extractor error caused by methods like public boolean setTime()
--------------------------------------------------------------------------------------
Key: JBRULES-2406
URL: https://jira.jboss.org/jira/browse/JBRULES-2406
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.1.0.M1, 5.0.1.FINAL
Reporter: Jos Hendriks
Assignee: Mark Proctor
I used The clipse plugin to create a new drools project and added the example java class and rule file.
I have added the method below to the Message class:
public boolean setTime() {
return true;
}
This result in the following error messages:
Unable to create Field Extractor for 'status' of '[ClassObjectType class=com.sample.DroolsTest$Message]' in rule 'Hello World' : [Rule name='Hello World']
Unable to create Field Extractor for 'message' : [Rule name='Hello World']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Unable to create Field Extractor for 'status' of '[ClassObjectType class=com.sample.DroolsTest$Message]' in rule 'GoodBye' : [Rule name='GoodBye']
Unable to create Field Extractor for 'message' : [Rule name='GoodBye']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Rule Compilation error : [Rule name='Hello World']
com/sample/Rule_Hello_World_0.java (7:416) : myMessage cannot be resolved
Rule Compilation error : [Rule name='GoodBye']
com/sample/Rule_GoodBye_0.java (7:343) : myMessage cannot be resolved
java.lang.IllegalArgumentException: Could not parse knowledge.
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:46)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Adding a parameter to setTime or renameing it to something else then setXxxx, storeTime for example, does not result in an error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months