Reputation:
I come from a .NET background where I can easily debug a web application by adding a breakpoint and building/running the application.
I'm working on a JAVA EJB3 application. I have successfully deployed ejb project to the server, but what I'd like to do know is develop controllers and views. In order to do that I'd like to be able to run/debug the project in net beans.
I have added both JBOSS5 and JBOSS6 into the IDE, but it takes over a minute to start. Sometimes it hangs completely. I don't have this issue when I run a glassfish - it takes few seconds at the most to start up. PC spec is up to date, it's corei7 with ssd and 4gb of RAM.
Thank you
Upvotes: 3
Views: 8618
Reputation: 30974
Enable remote debugging as follows:
-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
8787
.Remote debugging is enabled; set breakpoints as usual.
Or enable remote debugging as follows:
<jvm name="default">
<jvm-options>
<option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
</jvm-options>
8787
.Remote debugging is enabled; set breakpoints as usual.
The Output - Debugger Console panel should show:
Attaching to localhost:8787
User program running
Or, in domain mode, configure the server's host.xml
as follows:
<server name="server-one" group="main-server-group">
<jvm name="default">
<jvm-options>
<option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
</jvm-options>
</jvm>
</server>
Upvotes: 11