learn java
The moose likes IDEs, Version Control and other tools and the fly likes EJB3 Debug with Eclipse and JBoss ( Remote interface ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "EJB3 Debug with Eclipse and JBoss ( Remote interface )" Watch "EJB3 Debug with Eclipse and JBoss ( Remote interface )" New topic

EJB3 Debug with Eclipse and JBoss ( Remote interface )

Adolfo Eloy
Ranch Hand

Joined: Mar 21, 2009
Posts: 146


I'm working on EJB3 project with Eclipse 3.4.2 + JBoss5 Server.
My project has the following structure:

ClienteManager ( set as my Remote Interface @Remote )
ClienteManagerBean ( set as the @Stateful session bean )
ClientTeste ( main class to test my ejb project )

The problem is that I can't debug my ClientManager ( Session Bean ).
I set the breakpoint at my session bean, but when I start the program in debug mode, nothing happens.

I know that my ClientTeste "talks" with session beans through a proxy, but I believe that it should have a way
to do my debug that's running locally.

- I already set my Server at Eclipse ( JBoss5 for my case )
- I've already put my project into the JBoss Server configuration
- I've started my server in debug mode

Could someone help me with this debug problem?

Thanks in advance.

Adolfo Eloy
Software Developer
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16540

For full debugging capabilities, you need two debugging sessions. One for the client, one for the server, because each JVM has its own debug server builtin. Also, if you're running both on the same machine, they have to use 2 different debug network ports, since the rule is that a port can only be owned by one server at a time.

If you connect a remote debugger to JBoss, you should be able to take breakpoints and do all the usual debugging functions on the server-side code for the EJB. To debug the client, you'll need (as I said) a debugging session to the client app as well. If you're running that app from within Eclipse, you won't need to explicitly set up a remote debug configuration, though - just start a debug session like any other app.

That's one of the strengths of Eclipse. It has the ability to debug multiple applications/servers at the same time, and it's really useful in complex setups where multiple JVMs are talking to each other.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link: http://aspose.com/file-tools
subject: EJB3 Debug with Eclipse and JBoss ( Remote interface )