whojes opened a new issue #10641:
URL: https://github.com/apache/shardingsphere/issues/10641


   ## Question
   
   Hi there, i have a question. 
   
   I'm currently using shardingsphere for a project with spring boot framework.
   When i create sharding datasource, it registers a shutdown hook while 
creating its stuffs; ([code 
link](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorServiceManager.java#L47))
   
   i'm using my sharding datasource in middle of business code, and i'm hoping 
that `ShardingExecutorService` would be destroyed after related beans stop 
working and has been released, according to spring's shutdown process. But the 
library registers shutdown hook which destroys ShardingExecutorService(thread 
pool).
   
   i think ShardingExecutorService should not register the shutdown hook, 
implement Closeable, and add destroy process in `close()` method. Is there a  
reason for register the shutdown hook to Runtime?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to