• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Debugging Container code in Eclipse

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone explain what does it take to debug codes that run inside a container of some sort ? By container, I'm talking about components build to the Inversion of Control (IoC) pattern like servlet container, EJB container etc... I basically want to learn how to write a plugin that will allow me to debug EJBs inside Eclipse ? Is this possible ?
Thanks
Gavin
 
Dastardly Dan the Author
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Gavin Bong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What other JVMs support hot code replace ? I know that IBM's JVMs does. Thanks
 
Author
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gavin,
Sun JDK1.4 also includes HotSwap, see: JDKSE 1.4.2 release notes
Sherry Shavor
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic