[
https://issues.apache.org/activemq/browse/SM-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49713#action_49713
]
Soumya Pal commented on SM-1807:
--------------------------------
Btw the Timer thread was created to run a daemon.
Here is the code snippets.
The class BufferTimer extends TimerTask. And the logic to update the
reqBufferMap object is in its run() method.
Here is the snippet of code which creates the Timer and passes on the
reqBufferMap object to it.
HashMap<Integer,RequestBuffered> reqBufferMap = new
HashMap<Integer,RequestBuffered>();
BufferTimer bufferTimer = new BufferTimer(reqBufferMap);
tm = new Timer(true);
Date currentTime = new Date();
currentTime.setMinutes(currentTime.getMinutes()+1);
int timeDelayInt = 24;
tm.scheduleAtFixedRate(bufferTimer,currentTime,
timeDelayInt*60*60*1000);
Regards,
Soumya
> Classes, Objects and Threads still alive after Undeploying a servicemix
> component
> ---------------------------------------------------------------------------------
>
> Key: SM-1807
> URL: https://issues.apache.org/activemq/browse/SM-1807
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-lwcontainer
> Affects Versions: 3.2.1
> Environment: Windows XP , Fedora 10
> Reporter: Soumya Pal
>
> Hi,
> I noticed that after I undeploy a servicemix component (i.e. say delete the
> zip from teh hotdeploy folder) the component is no longer available as a
> Service over AMQ. However the classes that were loaded by it are not unloaded.
> In my LWC component I had a Timer Thread running (java.util.Timer) which
> refreshes an in memory Hashmap object. Now all the objects were created when
> the component was deployed as a service.
> Now when I undeploy the service, this Thread still continues running. The
> HasMap object it refers to, also continues to reside in-memory, as I can see
> from the logs. Though it won't cause any harm even if I re-deploy the zip
> again(which in turn instatiates it's own set of objects again), should
> servicemix not kill all references to objects or unload classes when the
> component service is un-deployed?
> or is it a bug in smix 3.2.1 ? Or am I missing soem configuration which can
> help me get rid of this. Only issue is if I continue hotdeploying or updating
> the component zips, the classes loaded and objects in JVM keep on increasing.
> Any help will be greatly appreciated
> Thanks
> Soumya
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.