arthas
arthas copied to clipboard
ArthasAgent能否把ArthasBootstrap对象放出来,能够主动调用destroy
现在bootstrap没发通过ArthasAgent拿到,所以只能重写ArthasAgent整个类
/**
* <pre>
* ArthasBootstrap bootstrap = ArthasBootstrap.getInstance(inst);
* </pre>
*/
Class<?> bootstrapClass = arthasClassLoader.loadClass(ARTHAS_BOOTSTRAP);
Object bootstrap = bootstrapClass.getMethod(GET_INSTANCE, Instrumentation.class, Map.class).invoke(null,
instrumentation, configMap);
具体是什么场景?希望在应用代码里 destroy?
具体是什么场景?希望在应用代码里 destroy?
现在是通过监听配置动态创建ArthasAgent 配置开启时创建ArthasAgent的bean,配置关闭了之后销毁ArthasAgent的bean同时也调用destroy进行关闭