Ok, now after doing some code review etc. etc. I've found following in the
description of the eip pattern component:
Configuring temporary message storage

Many of the pattern implementation need to store MessageExchanges
temporarily. An example: the aggregator will need to keep track of the
MessageExchange it is aggregating. By default, the EIPs use a plain
MemoryStoreFactory to create in-memory stores, but there are other options.
If you set the timeout property on the MemoryStoreFactory, it will evict old
object from the in-memory store to avoid a memory leak. You can also use a
JDBCStoreFactory to store data in a database instead of in memory.

Example: to use an in-memory store with timeout for a storing active and
closed aggregations in a <split-aggregator/>, you can do

<eip:split-aggregator service="test:aggregator" endpoint="endpoint"
                      storeFactory="#StoreFactory"
closedAggregateStoreFactory="#StoreFactory">
  <eip:target>
    <eip:exchange-target service="test:trace5" />
  </eip:target>
</eip:split-aggregator>

<bean id="StoreFactory"
class="org.apache.servicemix.store.MemoryStoreFactory">
  <property name="timeout" value="120000"/> <!-- 2 minute timeout -->
</bean>


May this help for the static recipient list or wiretab pattern? (I've
currently no time to test it, but maybe I will do it later... maybe someone
has any hint about that)

Regards
/Steffen



steff aka sid wrote:
> 
> Ok and now I've tried to rebuild thie behavior inside of my bean component
> and used the MessageUtil class to make the message rereadable and send it
> once to the file component and once to my transformer. After that I got
> the same memory leak like before with the eip component. So could it be
> that this is related to the StringSource class? (MessageUtil transforms to
> StringSource when making the message rereadable).
> 
> Regards
> /Steffen
> 
> 
> 
> steff aka sid wrote:
>> 
>> I've now tested following szenario:
>> 
>> servicemix-file --> servicemix-eip(static-recipient-list) -->
>> servicemix-bean --> servicemix-file
>>                                     |
>>                           servicemix-file
>> 
>> But the same issue. I passing in a 50Mbyte file and there stay up to
>> 280Mbyte in heap (see screenshot of jconsole). I attached my testcase so
>> for me it seems that we have a memory leak in the eip component or maybe
>> another class of servicemix.
>> 
>> My test enviroment:
>> Linux (Ubuntu 8.04)
>> Java: 1.5.0_15-b04
>> SMX: 3.2.2
>> 
>> Regards
>> /Steffen
>>  http://www.nabble.com/file/p19933178/Bildschirmfoto.png
>> Bildschirmfoto.png 
>>  http://www.nabble.com/file/p19933178/servicemix-bean-test.zip
>> servicemix-bean-test.zip 
>> 
>> 
>> 
>> steff aka sid wrote:
>>> 
>>> Ok,
>>> I've found out that the memory leak has nothing to do with my components
>>> and any other stuff I've postet before. I had something like:
>>> 
>>> servicemix-file --> servicemix-eip(wiretab) --> servicemix-bean -->
>>> servicemix-file
>>>                                      |
>>>                           servicemix-bean
>>>                                      |
>>>                           servicemix-file
>>> 
>>> So I think my usage of the wirtab at this place was wrong(?!) and the
>>> memory leak comes from the wiretab. All other components I tested but
>>> directly if I removed the wiretab the memory leak was gone. So my first
>>> understanding of the wiretab was more like a competing customers but I
>>> think this was a error in reasoning.
>>> 
>>> Regards
>>> /Steffen
>>> 
>>> 
>>> 
>>> steff aka sid wrote:
>>>> 
>>>> Hi,
>>>> I've got an performance issue. I have serveral beans which have to
>>>> process messages where the xml files are about 50+ MByte. Currently
>>>> I'am working with consumer bean instances which have an DeliveryChannel
>>>> and ServiceMixClient object. My problem is, that when I process one
>>>> message/file after that there where 300Mbytes staying in heap. So I did
>>>> some performance tests with netbeans and saw that there where much
>>>> byte[] and char[] objects (Not totally shure from where they come).
>>>> After starting SMX without doing anything my heap is about 20MByte. So
>>>> I think there must be some failure in my code. So I searched all
>>>> created classes found some failures but the problem doesn't disappear.
>>>> Then I found out that it is possible to call the close()-Method of the
>>>> DeliveryChannel and the ServiceMixClient Interface. So my question is
>>>> do I have to close them? Or Maybe is it better to create instances for
>>>> my bean class for each exchange (I think my solution is ok, because its
>>>> easier to handle multible calls).
>>>> 
>>>> Regards
>>>> /Steffen
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: 
http://www.nabble.com/Best-practices%2C-working-with-beans-and-huge-messages.-tp19914439p19940426.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to