The Sun Java System Application Server Platform Edition 9 is a fully compliant implementation of the Java EE 5 platform. In addition to supporting all the APIs described in the previous sections, the Application Server includes a number of Java EE tools that are not part of the Java EE 5 platform but are provided as a convenience to the developer. This section briefly summarizes the tools that make up the Application Server, and instructions for starting and stopping the Application Server, starting the Admin Console, and starting and stopping the Java DB database server. Other chapters explain how to use the remaining tools. ToolsThe Application Server contains the tools listed in Table 11. Basic usage information for many of the tools appears throughout the tutorial. For detailed information, see the online help in the GUI tools.
Starting and Stopping the Application ServerTo start the Application Server, open a terminal window or command prompt and execute the following: asadmin start-domain --verbose domain1 A domain is a set of one or more Application Server instances managed by one administration server. Associated with a domain are the following:
You specify these values when you install the Application Server. The examples in this tutorial assume that you chose the default ports. With no arguments, the start-domain command initiates the default domain, which is domain1. The --verbose flag causes all logging and debugging output to appear on the terminal window or command prompt (it will also go into the server log, which is located in <JAVAEE_HOME>/domains/domain1/logs/server.log). Or, on Windows, you can choose: Programs Sun Microsystems Application Server PE Start Default Server After the server has completed its startup sequence, you will see the following output: Domain domain1 started. To stop the Application Server, open a terminal window or command prompt and execute: asadmin stop-domain domain1 Or, on Windows, choose: Programs Sun Microsystems Application Server PE Stop Default Server When the server has stopped you will see the following output: Domain domain1 stopped. Starting the Admin ConsoleTo administer the Application Server and manage users, resources, and Java EE applications, use the Admin Console tool. The Application Server must be running before you invoke the Admin Console. To start the Admin Console, open a browser at the following URL: http://localhost:4848/asadmin/ On Windows, from the Start menu, choose: Programs Sun Microsystems Application Server PE Admin Console Starting and Stopping the Java DB Database ServerThe Application Server includes the Java DB database. To start the Java DB database server, open a terminal window or command prompt and execute: asadmin start-database On Windows, from the Start menu, choose: Programs Sun Microsystem Application Server PE Start Java DB To stop the Java DB server, open a terminal window or command prompt and execute: asadmin stop-database On Windows, from the Start menu, choose: Programs Sun Microsystems Application Server PE Stop Java DB For information about the Java DB database included with the Application Server, see the Apache Derby Project web site at http://db.apache.org/derby/. Debugging Java EE ApplicationsThis section describes how to determine what is causing an error in your application deployment or execution. Using the Server LogOne way to debug applications is to look at the server log in <JAVAEE_HOME>/domains/domain1/logs/server.log. The log contains output from the Application Server and your applications. You can log messages from any Java class in your application with System.out.println and the Java Logging APIs (documented at http://java.sun.com/j2se/1.5.0/docs/guide/logging/index.html) and from web components with the ServletContext.log method. If you start the Application Server with the --verbose flag, all logging and debugging output will appear on the terminal window or command prompt and the server log. If you start the Application Server in the background, debugging information is only available in the log. You can view the server log with a text editor or with the Admin Console log viewer. To use the log viewer:
If you wish to display other entries:
Using a DebuggerThe Application Server supports the Java Platform Debugger Architecture (JPDA). With JPDA, you can configure the Application Server to communicate debugging information using a socket. To debug an application using a debugger:
|