spring mbean 和 jconsole 接收到的 mbean 是否不同?
我有使用 Spring 创建的应用程序,并可以通过 jmx 访问来设置一些参数。问题是,当我通过 jconsole 访问时 - 一切正常,当从我的图形界面访问时 - 不起作用。在调试器中,我检查了是否使用相同的参数调用了相同的方法。 Spring 是否有可能提供我从 jconsole 收到的不同 bean 实例? 谢谢。
I have application created with Spring and has access through jmx to set some parameters. The problem that when I access by jconsole - all works, when access from my graphic interface - doesn't work. In debugger I checked that invoked the same method with the same parameters. Does it possible that Spring privides different instance of bean that I receive from jconsole?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实例是相同的(除非您的 bean 是原型范围的)
您可以通过将对象的
toString()
打印到控制台并比较@
之后的值来验证这一点。The instance is the same (unless your bean is prototype-scoped)
You can verify that by printing the object's
toString()
to the console and compare the values after@
.