Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Application Server Enterprise Edition 8.1 2005Q1 Developer's Guide 

Chapter 1
Setting Up a Development Environment

This chapter gives guidelines for setting up an application development environment in the Sun Java™ System Application Server. Setting up an environment for creating, assembling, deploying, and debugging your code involves installing the mainstream version of the Sun Java System Application Server and making use of development tools. In addition, sample applications are available. These topics are covered in the following sections:


Installing and Preparing the Server for Development

For the Sun Java Enterprise System, Application Server installation is part of the system installation process. For more information, see http://docs.sun.com/app/docs/prod/entsys.05q1#hic.

For all other installations, the following components are included in the full installation. For more information, see the Sun Java System Application Server Installation Guide.

After you have installed Sun Java System Application Server, you can further optimize the server for development in these ways:


High Availability Features

High availability features such as load balancing and session failover are discussed in detail in the Sun Java System Application Server Administration Guide. This Developer’s Guide describes the following features in the following sections:


Tools

The following general tools are provided with Sun Java System Application Server:

The following development tools are provided with Sun Java System Application Server or downloadable from Sun:

The following third-party tools might also be useful:

The asadmin Command

The asadmin command allows you to configure a local or remote server and perform both administrative and development tasks at the command line. For general information about asadmin, see the Sun Java System Application Server Reference Manual.

The asadmin command is located in the install_dir/bin directory. Type asadmin help for a list of subcommands.

The Administration Console

The Administration Console lets you configure the server and perform both administrative and development tasks using a web browser. For general information about the Administration Console, see the Sun Java System Application Server Administration Guide.

To access the Administration Console, type https://host:4849 in your browser. The host is the name of the machine on which the Application Server is running.

The asant Utility

Apache Ant 1.5.4 is provided with Sun Java System Application Server and can be launched from the bin directory using the command asant. Sun Java System Application Server also provides server-specific tasks for deployment; see “asant Assembly and Deployment Tool” on page 94. The sample applications provided with Sun Java System Application Server use Ant build.xml files; see Sample Applications.

For more information about Ant, see the Apache Software Foundation website:

http://ant.apache.org/

deploytool

You can use the deploytool, provided with Sun Java System Application Server, to assemble J2EE applications and modules, configure deployment parameters, perform simple static checks, and deploy the final result. For more information about using the deploytool, see the J2EE 1.4 Tutorial:

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Verifier

The verifier tool checks a J2EE application file (EAR, JAR, WAR, RAR), including Java classes and deployment descriptors, for compliance with J2EE specifications. Use it to check whether an application has obvious bugs and to make applications portable across application servers. The verifier can be launched from the deploytool or from the command line. For more information, see “The Deployment Descriptor Verifier” on page 80.

Migration Tool

The Migration Tool reassembles J2EE applications and modules developed on other application servers. For more information and to download the Migration Tool, see:

http://java.sun.com/j2ee/tools/migration/index.html

For additional information on migration, see the Sun Java System Application Server Upgrade and Migration Guide.

Debugging Tools

You can use several debuggers with the Sun Java System Application Server. For more information, see Chapter 4, “Debugging Applications.”

Profiling Tools

You can use several profilers with the Sun Java System Application Server. For more information, see “Profiling” on page 125.


Sample Applications

Sample applications that you can examine and deploy are included with the full installation of the Sun Java System Application Server. You can also download these samples separately if you installed the Sun Java System Application Server without them initially.

If installed with the Sun Java System Application Server, the samples are in the install_dir/samples directory. The samples are organized in categories such as ejb, jdbc, connectors, i18n, and so on. Each sample category is further divided into subcategories. For example, under the ejb category are stateless, stateful, security, mdb, bmp, and cmp subcategories.

Most Sun Java System Application Server samples have the following directory structure:

With a few exceptions, sample applications follow the standard directory structure described here:

http://java.sun.com/blueprints/code/projectconventions.html

The install_dir/samples/common-ant.xml file defines properties common to all sample applications and implements targets needed to compile, assemble, deploy and undeploy sample applications. In most sample applications, the build.xml file includes common-ant.xml.

For a detailed description of the helloworld sample and how to deploy and run it, see the associated documentation at:

install_dir/samples/ejb/stateless/apps/simple/docs/index.html

After you deploy the helloworld sample in Sun Java System Application Server, you can invoke it using the following URL:

http://server:port/helloworld



Previous      Contents      Index      Next     


Part No: 819-0217.   Copyright 2004 - 2005 Sun Microsystems, Inc. All rights reserved.