To Assemble and Deploy an Application Client
- Assemble the necessary client components. The client JAR file is created.
- Assemble the EJB components that are to be accessed by the client. The EJB JAR file is created.
- Assemble the client and EJB JAR files together in an EAR. An EAR file contains all the components of the application.
- Deploy the application.
Instructions are contained in To Deploy an Application or Module. - If you are using the appclient script to run the application client, retrieve the client files.
The client artifacts contain the ties and necessary classes for the application client. In this release of GlassFish Server, the client artifacts include multiple files. You can use either the get-client-stubs subcommand or the –retrieve option of the deploy subcommand, but you do not need to use both.
■ Use the deploy subcommand with the –retrieve option to retrieve the client files as part of deploying the application.
■ Use the get-client-stubs subcommand to retrieve client files for a previously-deployed application. - Test the client on the GlassFish Server machine in one of the following ways:
■ If Java Web Start is enabled for the application client, use the Launch link on
the Application Client Modules.
■ Run an application client by using the appclient script.
The appclient script is located in the as-install/bin directory.
If you are using the default server instance, the only required option is
-client, which points to the client JAR file. For example: appclient -client converterClient.jar
2-20 GlassFish Server Open Source Edition 4.0 Application Deployment Guide
Assembling and Deploying an Application Client Module
The -xml parameter, which specifies the location of the sun-acc.xml file, is also required if you are not using the default instance.
See Also
For more detailed information about the appclient script, see appclient(1M).
For more detailed information about creating application clients, see “Developing Java Clients” in GlassFish Server Open Source Edition Application Development Guide. This chapter includes information on the following topics:
■ Accessing EJB components and JMS resources from application clients
■ Connecting to a remote EJB module through a firewall
■ Using Java Web Start and creating a custom JNLP file
■ Using libraries with application clients
■ Specifying a splash screen, login retries, and other customizations