如何使用远程调试功能获取对象的数据?
我想知道如何使用类似于 Eclipse 的远程调试技术从远程对象(驻留在服务器上)获取数据? 我已经有了客户端代码,只想将其扩展以绑定(如果可能)到某个端口并从服务器获取数据。
老实说,我不想在服务器端使用任何特定的内容(即在服务器上创建额外的代码),因为服务器已经允许远程调试,并且我可以在 Eclipse 调试器视图中看到数据。
如果您能给我一些示例代码,那就更好了。 提前非常感谢。
I wonder how can I use similar to Eclipse's remote debugging technique to get the data from remote object (that reside on server)? I am already have the client code and just want to extend it to bind (if possible) to some port and get the data from the server.
Honestly I don't want to use anything specific on the server side (i.e. create an additional code on server) because server already allows remote debugging and I can see the data in Eclipse debugger view.
If you can point me to some sample code - that would be even better. Greatly appreciate in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
阅读了 @Romam 对我的评论的回复后,我认为更好的解决方案是添加一个简单的服务器端远程监控接口,该接口响应客户端请求、收集相关对象数据并将其返回给客户端。 如果服务器端监控与 JMX 兼容,您甚至可能不需要实现任何客户端代码。
为此使用 JDPA 存在许多问题,包括:
Having read the @Romam's response to my comment, I think a better solution would be to add a simple server-side remote monitoring interface that responded to a client request, gathered the relevant object data, and returned it to the client. If the server side monitoring was compatible with JMX, you may not even need to implement any client code.
There are a number of problem with using JDPA for this, including:
我怀疑您会在这里找到您需要的内容:
http:// /www.j2ee.me/j2se/1.3/docs/guide/jpda/architecture.html
并且您需要实现所谓的“前端”,它“实现高级 Java 调试接口” '。
I suspect you'll find what you need here:
http://www.j2ee.me/j2se/1.3/docs/guide/jpda/architecture.html
And that you need to implement what if referred to as the 'front end' which 'implements the high-level Java Debug Interface'.