Hi list,
I have developed a web service for deploy my rule package, this rule
package is in the BRMS, the source code of the web service class is:
public class ValidaLlamadaWS {
RuleAgent agent = RuleAgent.newRuleAgent("/brmsdeployedrules.properties");
RuleBase ruleBase = agent.getRuleBase();
StatelessSession session = ruleBase.newStatelessSession();
public Object[] ValidaLlamada(Integer cantsegundos){
Validaciones validaciones = new Validaciones();
validaciones.setCantsegundos(cantsegundos);
session.execute(validaciones);
return validaciones.getResult();
}
}
The BRMS run over JBoss AS 4.2.1.GA and the web service over Apache Tomcat
5.5 on the same machine, the rule base contain only 2 rules
The problem is that I need to call the web service more than 400.000
times, and with 1000 times, I obtain the Java Heap Exception.
If I monitoring my machine memory, this only increase between calls. And
the process that more memory expensive is java.exe (JBoss AS 4.2.1.GA).
The process javaw.exe (Apache Tomcat 5.5)also is expensive, but less than
java.exe
The question are:
How I can "dispose" the objects that I use?
Is correct this use for StatelessSession?
You are the experts, any other idea for implement my web service?
PD: sorry for my bad english.
Greetings
--
Edgardo IbaƱez O.