Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3 Debug with Eclipse and JBoss ( Remote interface )  RSS feed

Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
Tim Holloway
Saloon Keeper
Posts: 18799
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!