[
http://jira.jboss.com/jira/browse/JBSEAM-1635?page=comments#action_12368546 ]
Ning Zhao commented on JBSEAM-1635:
-----------------------------------
Tha janino compiler causes all kinds of problems when the rule file gets reasonably
complex (the drools example(number guess) comes with Seam is too simple to expose
janino's problems). With janino, when compiling rules, I got
java.lang.StackOverFlowError, the $ symbols are not allowed for variable name ($ is very
common in rule files), and it only supports java source code level up to 1.4. So whenever
there is java 5 syntax in the functions in a .drl file, janino gets confused and the rules
do not get compiled. All these problems were away when I further modified the code in
org.jboss.seam.drools.RuleBase.java like below:
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
conf.setCompiler(PackageBuilderConfiguration.ECLIPSE); // not janino anymore!!!
conf.setJavaLanguageLevel("1.6"); // can be set to "1.5" if you wish
PackageBuilder builder = new PackageBuilder(conf);
So I strongly recommend not to use janino compiler in Seam. There is another benefit that
the janino.jar does not need to be included if we do not use it.
Regards,
Ellen
Migrating to Drools 4.0.0 MR3
-----------------------------
Key: JBSEAM-1635
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1635
Project: JBoss Seam
Issue Type: Feature Request
Components: Drools
Affects Versions: 2.0.0.BETA1
Environment: OS: all. JBoss AS 4.2.0 GA. Seam CVS 2007-07-10, Drools SVN
2007-07-10
Reporter: Ning Zhao
Assigned To: Shane Bryzak
Fix For: 2.0.0.CR1
Attachments: DroolsHandler.java, RuleBase.java, RuleBasedIdentity.java
Drools API has been changed since 4.0.0M3. Please see:
http://wiki.jboss.org/wiki/Wiki.jsp?page=4.0.0.MR3ReleaseNotes
Corresponding changes in the Seam codebase and Seam reference should be made if Drools
4.0 GA is to be used in the future Seam.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira