简体   繁体   English

如何在其容器中调试Java EE应用程序?

[英]How to debug Java EE application within its container?

I have a quite difficult problem with one thing in my Java EE application. 我的Java EE应用程序中存在一个非常困难的问题。

I use JoNaS as my application container and my issue is strictly connected with synchronization in it. 我使用JoNaS作为我的应用程序容器,我的问题与其中的同步严格关联。 Is it possible to debug the application within its container? 是否可以在其容器中调试应用程序? How should I organise my project to achieve that (eg where to put JoNaS sources)? 我应该如何组织我的项目来实现这一目标(例如,何处放置JoNaS来源)?

Debugging this will have several components. 调试它将有几个组件。

My first recommendation is that you use a good IDE, like IntelliJ, to attach to your application and set breakpoints in it. 我的第一个建议是你使用一个好的IDE,比如IntelliJ,附加到你的应用程序并在其中设置断点。

My second recommendation is to download the latest version of Visual VM, install all the plugins, and point it at your JVM when you run the app. 我的第二个建议是下载最新版本的Visual VM,安装所有插件,并在运行应用程序时将其指向您的JVM。 It'll show you heap, threads, CPU, etc. 它会显示堆,线程,CPU等。

My third recommendation is to take thread dumps on deadlocks and learn how to interpret them. 我的第三个建议是对死锁进行线程转储并学习如何解释它们。

Good luck - threading issues are challenging. 祝你好运 - 线程问题具有挑战性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM