Exit Print View

Sun GlassFish Enterprise Server v3 Application Development Guide

  This Document Entire Library
Print View

Document Information

Preface

Part I Development Tasks and Tools

1.  Setting Up a Development Environment

2.  Class Loaders

3.  Using Ant with Enterprise Server

4.  Debugging Applications

Enabling Debugging

To Set the Server to Automatically Start Up in Debug Mode

JPDA Options

Generating a Stack Trace for Debugging

Application Client Debugging

Sun GlassFish Message Queue Debugging

Enabling Verbose Mode

Enterprise Server Logging

Profiling Tools

The NetBeans Profiler

The HPROF Profiler

To Use HPROF Profiling on UNIX

The JProbe Profiler

To Enable Remote Profiling With JProbe

Part II Developing Applications and Application Components

5.  Securing Applications

6.  Developing Web Services

7.  Using the Java Persistence API

8.  Developing Web Applications

9.  Using Enterprise JavaBeans Technology

10.  Using Container-Managed Persistence

11.  Developing Java Clients

12.  Developing Connectors

13.  Developing Lifecycle Listeners

Part III Using Services and APIs

14.  Using the JDBC API for Database Access

15.  Using the Transaction Service

16.  Using the Java Naming and Directory Interface

17.  Using the Java Message Service

18.  Using the JavaMail API

Index

Application Client Debugging

When the appclient script executes the java command to run the Application Client Container (ACC), which in turn runs the client, it includes on the command line the value of the VMARGS environment variable. You can set this variable to any suitable value. For example:

VMARGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8118

The following example also works:

set VMARGS=-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8118

For debugging an application client, you should set suspend to y so you can connect the debugger to the client before any code has actually executed. Otherwise, the client may start running and execute past the point you want to examine.

You should use different ports for the server and client if you are debugging both concurrently. For details about setting the port, see JPDA Options.

You can also include JVM options such as -Xdebug and -Xrunjwdp in the appclient script directly. For information about the appclient script, see Sun GlassFish Enterprise Server v3 Reference Manual.


Note - The Application Client Container is supported only in the full Enterprise Server, not in the Web Profile. See Chapter 11, Developing Java Clients.