This is John Kellerman's area of expertise, but I'll go out on a limb and suggest that remote debugging your container from Eclipse would work. That's what WebSphere Application Developer (WSAD) does to debug the WebSphere Application Server (WAS) EJB container. This approach is described in Chapter 4, "Debugging Java" in section "Remote Debugging". Here's the first couple of paragraphs:
The Java Debugger allows you to debug programs remotely, including using hot code replace with JVMs that support it. Remote programs include those running on your local machine outside of Eclipse and programs on another machine, either standalone or in a server environment. In order to display a source and enable you to set breakpoints, the Debugger gets the source for the code being debugged from your workspace.
Debugging a remote program is similar to debugging a local one, except that the remote program must be launched first with certain JVM parameters, and you need to specify a Remote Java Application launch configuration. When you launch your remote program with the parameters specified below, it starts and then suspends waiting for a connection from a debugger. The launch configuration contains information for the JDT Debugger to connect to the JVM running the remote program and initiate a debugging session.
The exercise in Chapter 30, "Debugging
Java," covers these steps in detail in Section 3. This is also covered in lesser detail in the Eclipse online documentation under
Remote Debugging.
-- Dan
Co-author of <a href="http://www.jdg2e.com" target="_blank" rel="nofollow">The Java Developer's Guide to Eclipse</a>, 2nd Edition<br />(Yahoo group <a href="http://groups.yahoo.com/group/JDG2E/" target="_blank" rel="nofollow">JDG2E</a>)