[JBoss JIRA] Created: (JBRULES-2621) NPE due to activation.getDeclarationValue( declId )
by Wolfgang Laun (JIRA)
NPE due to activation.getDeclarationValue( declId )
---------------------------------------------------
Key: JBRULES-2621
URL: https://jira.jboss.org/browse/JBRULES-2621
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-api
Affects Versions: 5.1.0.FINAL
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Fix For: 5.1.1.FINAL
Trying to access the declarations and their values of an activation, as used during ActivationEvent logging:
List<String> declIds = );
for( String declId: activation.getDeclarationIDs( ){
Object declVal = activation.getDeclarationValue( declId );
// ...
}
If, however, a fact is retracted, this code, when executed for an AfterActivationFiredEvent, throws a NPE when declId is a binding for a component of the retracted fact.
The optimum solution would be to not get such useless bindings in the List<String> returned by getDeclarationIDs() which is in AgendaItem.java. I have added the if-statement. The following code is untested:
public List<String> getDeclarationIDs() {
Declaration[] declArray = this.getRule().getDeclarations();
List<String> declarations = new ArrayList<String>();
for( Declaration decl : declArray ) {
// return only "sound" declaration IDs
if( this.tuple.get( decl ).getObject() != null ){
declarations.add( decl.getIdentifier() );
}
}
return Collections.unmodifiableList( declarations );
}
--
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
11 years, 8 months
[JBoss JIRA] Created: (JBRULES-2619) Extend API of IF Rule: no access to interesting attributes
by Wolfgang Laun (JIRA)
Extend API of IF Rule: no access to interesting attributes
--------------------------------------------------------------
Key: JBRULES-2619
URL: https://jira.jboss.org/browse/JBRULES-2619
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-api
Affects Versions: 5.1.0.FINAL
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Fix For: 5.2.0.M1
Whereas org.drools.rule.Rule contains a wealth of interesting fields, the stable API org.drools.definition.rule.Rule restricts us to
getName() and getPackageName() (and some MetaData).
I propose an extension of this interface, providing access to agendaGroup, activationGroup and ruleFlowGroup. I see no obvious reason why these user defined attributes should remain hidden.
These rule attributes would provide a good opportunity for writing more sophisticated event loggers, letting you specify rule filters by natural rule groupings.
--
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
11 years, 8 months
[JBoss JIRA] Created: (JBRULES-2620) ActivationCreatedEvent - Activation: InitialFactImpl in Object set
by Wolfgang Laun (JIRA)
ActivationCreatedEvent - Activation: InitialFactImpl in Object set
----------------------------------------------------------------------
Key: JBRULES-2620
URL: https://jira.jboss.org/browse/JBRULES-2620
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-api
Affects Versions: 5.1.0.FINAL
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Fix For: 5.1.1.FINAL
Given this rule
rule "show no gaps"
when
not Gap()
then
System.out.println( "No gaps!" );
end
the ActivationCreatedEvent references an Activation, where the list of fact handles (getFactHandles) contains one element, but its Object is null:
Fact null @0:0:27032609:1306428912:0:DEFAULT
But the list of objects (getObjects) returns a list where there *is* an object:
Object (org.drools.reteoo.InitialFactImpl): org.drools.reteoo.InitialFactImpl@4dde85f0
This should be changed; neither a fact handle nor an object should be returned if there are no user objects participating in the activation.
--
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
11 years, 8 months
[JBoss JIRA] Created: (JGRP-1052) Ergonomics
by Bela Ban (JIRA)
Ergonomics
----------
Key: JGRP-1052
URL: https://jira.jboss.org/jira/browse/JGRP-1052
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.0
The goal is to (a) reduce the number of properties needed and (b) determine the values dynamically.
Examples:
- Determine the best min/max size of a thread pool
- Find out what the best timeout values are for retransmission, e.g. based on average retransmission times
- Determine the optimal number of credits in FC
This is similar to the JVM setting where, starting with 1.5, the initial values can be set, but over time, the JVM dynamically changes them.
In the best case, a config contains only a list of protocols without any properties, and JGroups will figure out the correct values.
--
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
11 years, 8 months
[JBoss JIRA] Created: (JBRULES-2438) loading multiple sheets of single Excel book by one change-set xml
by Toshiya Kobayashi (JIRA)
loading multiple sheets of single Excel book by one change-set xml
------------------------------------------------------------------
Key: JBRULES-2438
URL: https://jira.jboss.org/jira/browse/JBRULES-2438
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Reporter: Toshiya Kobayashi
Assignee: Mark Proctor
I'm trying to use rules via DecisionTable using change-set.
I wrote rules in multiple sheets of single Excel book.
Then I configured my change-set xml like:
...
<add>
<resource source='classpath:data/dtable.xls' type="DTABLE">
<decisiontable-conf input-type="XLS" worksheet-name="sheet1" />
</resource>
<resource source='classpath:data/dtable.xls' type="DTABLE">
<decisiontable-conf input-type="XLS" worksheet-name="sheet2" />
</resource>
</add>
...
But only rules of sheet1 were loaded.
As far as I observed source codes, KnowledgeAgentImpl.java puts resource into "Map<Resource, ResourceMapping> resources". But even if multiple resources are configured in change-set, it appears to me like those resources are considered as the same resource and eventually only one resource will be registered.
--
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
11 years, 8 months
[JBoss JIRA] Created: (JBMESSAGING-1490) BridgeService should be JAAS aware
by Nicholas Sayer (JIRA)
BridgeService should be JAAS aware
----------------------------------
Key: JBMESSAGING-1490
URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1490
Project: JBoss Messaging
Issue Type: Feature Request
Affects Versions: 1.4.2.GA
Environment: n/a
Reporter: Nicholas Sayer
Assignee: Tim Fox
Priority: Optional
org.jboss.jms.server.bridge.BridgeService currently requires a username and password for the source and destination. It would be better if it could be configured with a JAAS login context name. This would allow username and password information to be set in, for example, a SecureIdentityLoginModule. For example:
<application-policy name = "JmsBridgeRealm">
<authentication>
<login-module code = "org.jboss.resource.security.SecureIdentityLoginModule" flag = "required">
<module-option name = "principal">${bridge.user}</module-option>
<module-option name = "userName">${bridge.user}</module-option>
<module-option name = "password">${bridge.encryptedPassword}</module-option>
<module-option name = "ignoreMissigingMCF">true</module-option>
<!-- it is a separate bug that you must set managedConnectionFactoryName to something regardless of setting ignoreMissingMCF to true -->
<module-option name = "managedConnectionFactoryName">jboss.nonexistent:service=NonExistent,name=NonExistent</module-option>
</login-module>
</authentication>
</application-policy>
There is undoubtedly a better way to accomplish this (probably to pass the JAAS context directly into the JMS connection factory used to vend connections for the bridge), but we're using this as a crude hack for now:
import java.util.Set;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
import javax.security.auth.login.CredentialNotFoundException;
import javax.resource.spi.security.PasswordCredential;
import org.jboss.jms.server.bridge.BridgeService;
public class JAASAwareBridgeService extends BridgeService {
private String sourceContext, targetContext;
public void setSourceLoginContext(String ctxName) { this.sourceContext = ctxName; }
public String getSourceLoginContext() { return this.sourceContext; }
public void setTargetLoginContext(String ctxName) { this.targetContext = ctxName; }
public String getTargetLoginContext() { return this.targetContext; }
public void start() throws Exception {
setupSourceCredentials();
setupTargetCredentials();
super.start();
}
private void setupSourceCredentials() throws LoginException {
PasswordCredential pc = getPasswordCredential(this.sourceContext);
super.setSourceUsername(pc.getUserName());
super.setSourcePassword(new String(pc.getPassword()));
}
private void setupTargetCredentials() throws LoginException {
PasswordCredential pc = getPasswordCredential(this.targetContext);
super.setTargetUsername(pc.getUserName());
super.setTargetPassword(new String(pc.getPassword()));
}
private static PasswordCredential getPasswordCredential(String contextName) throws LoginException {
LoginContext ctx = new LoginContext(contextName);
ctx.login();
Subject s = ctx.getSubject();
Set<PasswordCredential> creds = s.getPrivateCredentials(PasswordCredential.class);
if (creds.isEmpty())
throw new CredentialNotFoundException("Login context '" + contextName + "' subject has no PasswordCredential");
return creds.iterator().next(); // get 1st
}
}
--
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
11 years, 8 months
[JBoss JIRA] Created: (JBMESSAGING-1478) inconsistent test suite performance
by Aleksandar Kostadinov (JIRA)
inconsistent test suite performance
-----------------------------------
Key: JBMESSAGING-1478
URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1478
Project: JBoss Messaging
Issue Type: Bug
Components: Tests and Performance
Affects Versions: 1.4.0.SP3.CP04
Reporter: Aleksandar Kostadinov
Assignee: Tim Fox
I see inconsistent performance running the JBM test suite. Here I have 2 builds on the same physical machine (windows), using local disk storage so environment should be pretty stable.
The mysql database is shared but I doubt it is the culprit.
I run the test suite with the following options:
property( name: "functional.tests.database", value: dbname )
property( name: "stress.tests.database", value: dbname )
property( name: "clustering.tests.database", value: dbname )
property( name: "test.target", value: "report" )
property( name: "test.bind.address", value: properties["env.MYTESTIP_1"] )
property( name: "jboss.messaging.groupname", value: properties["env.BUILD_TAG"])
property( name: "jboss.messaging.datachanneludpaddress", value: properties["env.MCAST_ADDR"] )
property( name: "jboss.messaging.controlchanneludpaddress", value: properties["env.MCAST_ADDR"] )
Are there any other options I can add to increase isolation from other processes in the same LAN?
Would you be able to look at these 2 builds and based on the logs, say why is the first one taking longer and eventually timeout?
http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbm/163/
http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbm/164/
--
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
11 years, 8 months