Hi All,

In the loan broker example, while getting data from an exchange, if we try
to append any data to it, the memory in tenure space increases. 

Please refer the below line of code:


                        String corelationid = (String) exchange
                                        .getProperty("Corelationdetails");
                        MessageExchange originalExchange = (MessageExchange) 
store
                                        .remove(corelationid);
                        String tmpData = new String();
                        String data =
((StringSource)exchange.getMessage("out").getContent()).getText();
                        tmpData = data;
// This line causes increase in memory --> tmpData =
"<ROOT>"+tmpData+"</ROOT>";
                        
                        NormalizedMessage out = 
originalExchange.createMessage();
                        out.setContent(new StringSource(tmpData));
                        originalExchange.setMessage(out,"out");
                        send(originalExchange);


uncommenting the line causes an increase in the memory. Please, help us
solve this. 

This is causing big issues to us. Also, I have uploaded the loanbroker
example for your reference. 

Regards,
Sriram



Sriram83 wrote:
> 
> HI,
> 
> I made a small change in the lon-broker example given in the service mix. 
> 
> I added a huge XML in the out Message of CreditAgency.
> 
> When I did a load test with 3 concurrent users, the heap memory kept on
> increasing. 
> 
> Only when the maximum allocated memory is reached, GC takes place and the
> memory is cleared. 
> 
> Alternaltively, if I force a GC using JMX, the memory is cleared up.
> 
> I notice the same behaviour in the class that I have attaached as well. 
> 
> This is very concerning and we will appreciate if some one can help us in
> this regard.
> 
> Thanks,
> Sriram
> 
> 
> 
> 
> Sriram83 wrote:
>> 
>> Hi,
>> 
>> I have the below requirement:
>> 
>> Service Engine --> Sends requests to multiple endpoints --> aggregates
>> the responses from different endpoints
>> 
>> We implemented this by creating a service engine by over-riding Provider
>> endpoint. We followed the same approach as given in the Loan broker
>> example. 
>> 
>> The problem we are facing is that, for multiple requests, the heap memory
>> increases until it reaches the maximum memory.
>> 
>> I have attached the source file as well. 
>> 
>> Please help us, as this is creating huge issues in our environment.
>> 
>> Thanks,
>> Sriram
>>  http://www.nabble.com/file/p19770192/MultiCastAggregator.txt
>> MultiCastAggregator.txt 
>> 
> 
> 
http://www.nabble.com/file/p19777019/LoanBroker.java LoanBroker.java 
-- 
View this message in context: 
http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19777019.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to