Hi Edgardo. Good to hear. Yeah it was probably creating a new daemon thread for each instance in that case, which would top out on 1000 to 3000 items on most systems today, so that is not surprising ;)<br><br>Good luck !<br>
<br><br>Michael.<br><br><div><span class="gmail_quote">On 9/4/07, <b class="gmail_sendername">Edgardo</b> <<a href="mailto:edgardoibanez@gmail.com">edgardoibanez@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks Michael, the problem was that every call to the web service create<br>a new instance of ValidaLlamadaWS, because the system memory explode!. I<br>fix it managing the session scope of the Web Service, now my drools + web
<br>service implementation works fine!<br><br>Thanks for you reply<br><br>Greetings, I see you in another post<br><br>En Tue, 04 Sep 2007 01:44:47 -0400, Michael Neale<br><<a href="mailto:michael.neale@gmail.com">michael.neale@gmail.com
</a>> escribió:<br><br>> If it still happens - it would be good if you could attach some code to<br>> reproduce it to a JIRA.<br>><br>> On 9/4/07, Michael Neale <<a href="mailto:michael.neale@gmail.com">
michael.neale@gmail.com</a>> wrote:<br>>><br>>> Hi Edgardo.<br>>><br>>> Well it shouldn't leak like that.<br>>><br>>> Looking at your code, I am not sure how it works (as I am not sure of
<br>>> the<br>>> Web Service component you are using).<br>>><br>>> But if the web service is creating a new instance of the ValidaLlamadaWS<br>>> class for EACH call, then yes that woudl be the problem. What you want
<br>>> to do<br>>> is have the code for the agend called only once, on startup, and then<br>>> use<br>>> that single instance of the agent to get a rulebase for each call.<br>>><br>>><br>
>> Michael.<br>>><br>>> On 9/4/07, Edgardo <<a href="mailto:edgardoibanez@gmail.com">edgardoibanez@gmail.com</a>> wrote:<br>>> ><br>>> > Hi list,<br>>> ><br>>> > I have developed a web service for deploy my rule package, this
<br>>> > rule<br>>> > package is in the BRMS, the source code of the web service class is:<br>>> ><br>>> > public class ValidaLlamadaWS {<br>>> ><br>>> > RuleAgent agent =
RuleAgent.newRuleAgent<br>>> > ("/brmsdeployedrules.properties");<br>>> > RuleBase ruleBase = agent.getRuleBase();<br>>> > StatelessSession session = ruleBase.newStatelessSession
();<br>>> ><br>>> > public Object[] ValidaLlamada(Integer cantsegundos){<br>>> > Validaciones validaciones = new Validaciones();<br>>> > validaciones.setCantsegundos
(cantsegundos);<br>>> ><br>>> > session.execute(validaciones);<br>>> ><br>>> > return validaciones.getResult ();<br>>> > }<br>>> > }
<br>>> ><br>>> > The BRMS run over JBoss AS <a href="http://4.2.1.GA">4.2.1.GA</a> and the web service over Apache<br>>> > Tomcat<br>>> > 5.5 on the same machine, the rule base contain only 2 rules
<br>>> ><br>>> > The problem is that I need to call the web service more than 400.000<br>>> > times, and with 1000 times, I obtain the Java Heap Exception.<br>>> > If I monitoring my machine memory, this only increase between calls.
<br>>> And<br>>> > the process that more memory expensive is java.exe (JBoss AS<br>>> <a href="http://4.2.1.GA">4.2.1.GA</a>).<br>>> > The process javaw.exe (Apache Tomcat 5.5)also is expensive, but less
<br>>> > than<br>>> > java.exe<br>>> ><br>>> > The question are:<br>>> ><br>>> > How I can "dispose" the objects that I use?<br>>> > Is correct this use for StatelessSession?
<br>>> > You are the experts, any other idea for implement my web service?<br>>> ><br>>> > PD: sorry for my bad english.<br>>> ><br>>> > Greetings<br>>> ><br>>> >
<br>>> ><br>>> > --<br>>> > Edgardo Ibañez O.<br>>> > _______________________________________________<br>>> > rules-users mailing list<br>>> > <a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br>>> > <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>>> ><br>>><br>>><br><br><br>
<br>--<br>Edgardo Ibañez O.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>