[JBoss JIRA] Created: (JBRULES-505) Using a GLOBAL value in predicates in more than one rule - rule fails to evaluate correctly.
by Matt Green (JIRA)
Using a GLOBAL value in predicates in more than one rule - rule fails to evaluate correctly.
--------------------------------------------------------------------------------------------
Key: JBRULES-505
URL: http://jira.jboss.com/jira/browse/JBRULES-505
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: All
Affects Versions: 3.0.4
Environment: Windows XP, JBoss 4.0.3SP1, JRules3.0.4, PackageBuilderConfiguration.JANINO
Reporter: Matt Green
Assigned To: Mark Proctor
SAMPLE CODE:
===============================================
package net.rockshore.rmf.rules
#list any import classes here.
import net.rockshore.rmf.entities.SubscriptionLocal;
import net.rockshore.rmf.entities.EventLocal;
import java.lang.String;
#declare any global variables here
global java.util.Collection resultsCollection;
global java.lang.String eventType;
rule "KeepSubscriptionsToEventType"
when
subscription : SubscriptionLocal (eventTypeDiscriminator == (eventType))
then
resultsCollection.add(subscription);
System.out.println("Keeping Subscription:" + subscription + " is of type:" + eventType);
end
rule "DiscardSubscriptionsToWrongEventType"
when
wrongSubscription : SubscriptionLocal (eventTypeDiscriminator != (eventType))
then
System.out.println("Discarding Subscription:" + wrongSubscription + " NOT of type:" + eventType);
retract (wrongSubscription);
end
===============================================
TEST DATA SET:
-------------------------
SubscriptionLocal objects asserted
key eventTypeDiscriminator
---------------------------------------------------------------------------------------------------------
5c4o12-mexdpy-esmukytr-1-esmx439o-58 net.rockshore.rmf.entities.events.business.TravelAlertEvent
5c4o12-mexdpy-esmukytr-1-esmx438t-57 net.rockshore.rmf.entities.events.business.FlightDelayEvent
5c4o12-mexdpy-esmukytr-1-esmx438t-56 net.rockshore.rmf.entities.events.business.FlightDelayEvent
eventType = "net.rockshore.rmf.entities.events.business.FlightDelayEvent"
PROBLEM DESCRIPTION:
-------------------------------------
When firing the above rules with data shown above, the result shows that "DiscardSubscriptionsToWrongEventType" rule was fired for Subscriptions with keys ending 57 and 56. This is the wrong way round as that rule should have fired only with Subscription 58.
Further, rule "KeepSubscriptionsToEventType" did not fire.
FURTHER ANALYSIS:
-------------------------------
If one rule OR the other is deleted then the remaining rule fires correctly.
If both rules have the predicate replaced with a String literal "net.rockshore.rmf.entities.events.business.FlightDelayEvent" then both rules fire correctly.
The problem still occurs when eventType predicate is replaced with eventType.toString()
--
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
19 years, 8 months
[JBoss JIRA] Created: (JBRULES-523) JoinNode and NotNode with empty binder throw exception with getConstraints()
by Ahti Kitsik (JIRA)
JoinNode and NotNode with empty binder throw exception with getConstraints()
----------------------------------------------------------------------------
Key: JBRULES-523
URL: http://jira.jboss.com/jira/browse/JBRULES-523
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 3.1-m3
Reporter: Ahti Kitsik
Assigned To: Mark Proctor
Currently it is not possible to check if binder is null or not and getConstraints throws NPE if it is.
Simple sanity check in getContraints would fix it (will be fixed in 3.0.x branch).
Sample for reproducing
final JoinNode joinNode = new JoinNode( 1,
this.tupleSource,
this.objectSource, null);
joinNode.getConstraints(); // Throws NPE
final NotNode notNode = new NotNode( 1,
this.tupleSource,
this.objectSource, null);
notNode.getConstraints(); // throws NPE
--
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
19 years, 8 months
[JBoss JIRA] Created: (JBAS-3779) maxSession=n paramter results in executing N+1 MDB's at the same time
by Evgueni Smoliar (JIRA)
maxSession=n paramter results in executing N+1 MDB's at the same time
---------------------------------------------------------------------
Key: JBAS-3779
URL: http://jira.jboss.com/jira/browse/JBAS-3779
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.0.5.GA
Environment: JBoss 4.0.5.GA JDK 1.5.0_09 on XP
Reporter: Evgueni Smoliar
Assigned To: Adrian Brock
I would like to limit number of concurrent MDB invocations by specifying following configuration lines:
<activation-config-property>
<activation-config-property-name>
maxSession
</activation-config-property-name>
<activation-config-property-value>
2
</activation-config-property-value>
</activation-config-property>
JBoss always execute 1 MDB more than it was specified in the configuration. I check it using logging and calling listInProcessMessages
--
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
19 years, 8 months
[JBoss JIRA] Created: (JBAS-3754) ExceptionSorter which marks all exceptions as fatal
by Brian Egge (JIRA)
ExceptionSorter which marks all exceptions as fatal
---------------------------------------------------
Key: JBAS-3754
URL: http://jira.jboss.com/jira/browse/JBAS-3754
Project: JBoss Application Server
Issue Type: Patch
Security Level: Public (Everyone can see)
Reporter: Brian Egge
Priority: Trivial
With Sybase we've had a few occasions where the exception sorter does not properly detect a failed connection. We've found for our production servers the safest thing is to recycle the connection on any error. This class would also be useful if your JDBC provider doesn't have an existing exception sorter.
----
package org.jboss.resource.adapter.jdbc;
import java.sql.SQLException;
/**
* Mark all exceptions as fatal.
*
* @author <a href="mailto:brianegge@users.sourceforge.net">Brian Egge</a>
*/
public class GenericExceptionSorter implements ExceptionSorter {
public boolean isExceptionFatal(SQLException e)
{
return true;
}
}
--
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
19 years, 8 months
[JBoss JIRA] Created: (JBPORTAL-1085) CMS Export : Exception if empty folder or no file found for one language
by Antoine Herzog (JIRA)
CMS Export : Exception if empty folder or no file found for one language
------------------------------------------------------------------------
Key: JBPORTAL-1085
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1085
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal CMS
Affects Versions: 2.4 Final
Environment: JBPortal 2.4 / windows / CMS all stored in filesystem.
Reporter: Antoine Herzog
Assigned To: Roy Russo
when trying to export folder or files, there is sometimes this error :
14:03:38,140 ERROR [STDERR] java.lang.NullPointerException
14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.command.GetArchiveCommand.zipFiles(GetArchiveCommand.java:112)
14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.command.GetArchiveCommand.execute(GetArchiveCommand.java:72)
14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.JCRCommand.dispatch(JCRCommand.java:61)
14:03:38,140 ERROR [STDERR] at org.jboss.portal.cms.impl.jcr.JCRCMS.execute(JCRCMS.java:436)
sometimes is :
- when asking to export a folder and there is some sub folders with no files in it (no file for the asked language)
- when asking to export a file that exist in language A but you ask export for language B
in the code of GetArchiveCommand.java :
private ZipOutputStream zipFiles(String sPath, ZipOutputStream zos)
{
....
JCRCommand fileList = (JCRCommand) this.mContext.getCommandFactory().createFileGetCommand(node.getPath(), new Locale(this.msLanguage));
File childFile = (File) this.mContext.execute(fileList);
ZipEntry entry = new ZipEntry(this.rootFolderName + node.getPath());
zos.putNextEntry(entry);
Content content = childFile.getContent();
...
line "112" is Content content = childFile.getContent();
childFile is null when the file was not found for the language.
It should be checked before use and do nothing if the file is not found.
(optional log ?)
enhancement : may be propose the export feature to take the default language file instead (a check box in the portal CMS management screen), so some exported site could be build with always a page shown (like in CMS Portlet).
--
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
19 years, 8 months