Setting Up a Development Environment
Setting Up a Development Environment
This chapter gives guidelines for setting up an application development environment in the Eclipse GlassFish. Setting up an environment for creating, assembling, deploying, and debugging your code involves installing the mainstream version of the Eclipse GlassFish and making use of development tools. In addition, sample applications are available.
The following topics are addressed here:
Installing and Preparing the Server for Development
For more information about Eclipse GlassFish installation, see the Eclipse GlassFish Installation Guide.
The following components are included in the full installation.
-
JDK
-
Eclipse GlassFish core
-
Java Platform, Standard Edition (Java SE) 11 or newer
-
Jakarta EE 10 compliant application server
-
Administration Console
-
asadminutility -
Other development and deployment tools
-
Open Message Queue software
-
Apache Derby database
-
Load balancer plug-ins for web servers
-
The NetBeans Integrated Development Environment (IDE) bundles the GlassFish edition of the Eclipse GlassFish, so information about this IDE is provided as well.
After you have installed Eclipse GlassFish, you can further optimize the server for development in these ways:
-
Locate utility classes and libraries so they can be accessed by the proper class loaders. For more information, see Using the Common Class Loader.
-
Set up debugging. For more information, see Debugging Applications.
-
Configure the Virtual Machine for the Java platform (JVM software). For more information, see " Administering the Virtual Machine for the Java Platform" in Eclipse GlassFish Administration Guide.
High Availability Features
High availability features such as load balancing and session failover are discussed in detail in the Eclipse GlassFish High Availability Administration Guide. This book describes the following features in the following sections:
-
For information about HTTP session persistence, see Distributed Sessions and Persistence.
-
For information about checkpointing of the stateful session bean state, see Stateful Session Bean Failover.
-
For information about failover and load balancing for Java clients, see Developing Java Clients.
-
For information about load balancing for message-driven beans, see Load-Balanced Message Inflow.
Development Tools
The following general tools are provided with the Eclipse GlassFish:
The following development tools are provided with the Eclipse GlassFish or downloadable from Oracle:
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
Eclipse GlassFish Reference Manual.
The asadmin command is located in the as-install/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, click the Help button in the Administration Console. This displays the Eclipse GlassFish online help.
To access the Administration Console, type http://`host:4848` in your
browser. The host is the name of the machine on which the Eclipse GlassFish is running. By default, the host is localhost. For example:
http://localhost:4848
The Migration Tool
The Migration Tool converts and reassembles Jakarta EE applications and
modules developed on other application servers. This tool also generates
a report listing how many files are successfully and unsuccessfully
migrated, with reasons for migration failure. For more information and
to download the Migration Tool, see
http://java.sun.com/j2ee/tools/migration/index.html.
Code Editors
There is several advanced editors with an integration with GlassFish or generic Jakarta EE servers. Sometimes you have to install additional extensions, sometimes all you need is just some configuration.
Debugging Tools
You can use several debugging tools with the Eclipse GlassFish. For more information, see Debugging Applications.
Profiling Tools
You can use several profilers with the Eclipse GlassFish. For more information, see Profiling Tools.
Sample Applications
The samples are available from https://github.com/eclipse-ee4j/glassfish-samples.
Most Eclipse GlassFish samples have the following directory structure:
-
The
docsdirectory contains instructions for how to use the sample. -
The
pom.xmlfile defines Maven targets for the sample. -
The
src/directory contains source code for the sample.