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 ;)

Good luck !


Michael.

On 9/4/07, Edgardo <edgardoibanez@gmail.com> wrote:
Thanks Michael, the problem was that every call to the web service create
a new instance of ValidaLlamadaWS, because the system memory explode!. I
fix it managing the session scope of the Web Service, now my drools + web
service implementation works fine!

Thanks for you reply

Greetings, I see you in another post

En Tue, 04 Sep 2007 01:44:47 -0400, Michael Neale
<michael.neale@gmail.com > escribió:

> If it still happens - it would be good if you could attach some code to
> reproduce it to a JIRA.
>
> On 9/4/07, Michael Neale < michael.neale@gmail.com> wrote:
>>
>> Hi Edgardo.
>>
>> Well it shouldn't leak like that.
>>
>> Looking at your code, I am not sure how it works (as I am not sure of
>> the
>> Web Service component you are using).
>>
>> But if the web service is creating a new instance of the ValidaLlamadaWS
>> class for EACH call, then yes that woudl be the problem. What you want
>> to do
>> is have the code for the agend called only once, on startup, and then
>> use
>> that single instance of the agent to get a rulebase for each call.
>>
>>
>> Michael.
>>
>> On 9/4/07, Edgardo <edgardoibanez@gmail.com> wrote:
>> >
>> > 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.
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>>
>>



--
Edgardo Ibañez O.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users