You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1、建议在ExternalDataSourceServiceImpl类中提供销毁数据源链接的方法 ,以实现对如下代码的资源关闭。
private List dataSourceList = new ArrayList<>();
2、建议在ExternalStoragePersistServiceImpl实现spring destory生命周期方法,并调用dataSourceService中维护的关闭方法
Activity
KomachiSion commentedon Jun 23, 2022
wuchubuzai2018 commentedon Jun 23, 2022
或者我这么说ExternalStoragePersistServiceImpl这个类中提供了reload数据源的方法,虽然暂时没有用到,但是这个方法被多次调用时未销毁以前的数据源,可能为未来留下隐患吧,我想是不是可以在这个方法实现内部去判断,如果之前有数据源就先调用待实现的close数据源方法,在进行加载
KomachiSion commentedon Jun 24, 2022
您真的认真阅读代码了吗? reload中会关闭就数据源
wuchubuzai2018 commentedon Jun 25, 2022
老哥啊,你这个代码在哪个文件的第几行啊,找了一圈也没有看见啊
KomachiSion commentedon Jun 27, 2022
哦, 好像是缺少了。 我看的是别的分支。 develop分支没有。
For alibaba#8611, Close old datasource connection.
For #8611, Close old datasource connection. (#9212)