[jboss-jira] [JBoss JIRA] (JGRP-541) Thread pools in transport protocols not using daemon threads

Peter Novak (JIRA) jira-events at lists.jboss.org
Fri May 4 08:24:18 EDT 2012


    [ https://issues.jboss.org/browse/JGRP-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690403#comment-12690403 ] 

Peter Novak commented on JGRP-541:
----------------------------------

We use Spring and the scripts and components use the Spring Cache Abstraction.  So they don´t need to know what cache implementation is used for execution. The scripts/test does not manage the caches, they only PUT/GET values, so they don´t call Jgroups, they could not call stop(), close() or other kind of shutdown on the cache.
Yes, I know, I can use the setThreadFactory invocation to manipulate this settings from code, but this requires to find the right place, where to call this - may be some patching of Infinispan Code, where the JGroups is initialized, before it is used. I´m not sure, how to do it right way.
But everything, what I need to do, is to have 2 or more configuration profiles for Spring - one for production, one for testing, etc. And in testing profile use the JGroups XML config with  ThreadPoolFactoryClass=MyThreadPoolFactory or ThreadPool.threadType=daemon. 


May be, it is not the JGroups issue, but Infinispan Issue, that when I setup the DAEMON_THREADS support for Infinispan, than Infinispan should call the TP.setThreadFactory(ThreadFactory new_factory) and use the proper factory, but by https://issues.jboss.org/browse/ISPN-1444 it is not Infinispan problem, but JGroups problem - and I´m in cycle :).

The workaround for us now is to replace the Infinispan Cache implementation with some other (like EHCache) configuration for testing profile. May be later we will find some better way, how to shutdown the Cache with JGroups correctly.
  
                
> Thread pools in transport protocols not using daemon threads
> ------------------------------------------------------------
>
>                 Key: JGRP-541
>                 URL: https://issues.jboss.org/browse/JGRP-541
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: Paul Ferraro
>            Assignee: Bela Ban
>            Priority: Minor
>             Fix For: 2.5
>
>
> The ThreadFactory used by the ThreadPoolExecutors (for both regular and OOB messages) in org.jgroups.protocols.TP does not create daemon threads.  During runtime the JVM will resist exiting unless the channel is explicitly shutdown.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list