spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
55.29k stars 37.62k forks source link

[sandbox] Spring-JMX: start connector servers on a daemon thread [SPR-517] #5246

Closed spring-projects-issues closed 19 years ago

spring-projects-issues commented 19 years ago

Marcus Brito opened SPR-517 and commented

I'm not sure if I'm supposed to open issues on sandbox components, but I couldn't find any other place to do that. Anyways...

org.springframework.jmx.remote.ConnectorServerMBean starts a JMX connector with a user-specified service URL. The problem is, if you're on a multithreaded application, this connector will be started on a non-deaemon thread, preventing the application to shutdown when all other threads are already terminated.

Of course, calling JMXConnectorServer.stop() would stop the connector thread, but find a proper hook in your application to shutdown the connection isn't always clear, and takes away the non-intrusiveness of the Spring JMX integration.

So, I'm proposing that ConnectorServerMBean starts the connector on a separate, daemon thread. This way the application will be able to shutdown when all user threads are gone.


No further details from SPR-517

spring-projects-issues commented 19 years ago

Rob Harrop commented

Marcus,

Do you have any code for this? After checking the JSR-160 docs I am unable to find any configuration parameters that allow you to control the threading of the connector server in a standard way.

Rob

spring-projects-issues commented 19 years ago

Rob Harrop commented

Modification committed to CVS.