JBoss Community Archive (Read Only)

WildFly 8

Application Client Reference

As a Java EE 7 compliant server, WildFly 8 contains an application client. An application client is essentially a cut down server instance, that allow you to use EE features such as injection in a client side program.

This article is not a tutorial on application client development, rather it covers the specifics of the WildFly application client. There are tutorials available elsewhere that cover application client basics, such as this one.

Note that the application client is different to the EJB client libraries, it is perfectly possible to write client application that do not use the application client, but instead use the jboss-ejb-client library directly.

Getting Started

To launch the application client use the appclient.sh or appclient.bat script in the bin directory. For example:

./appclient.sh --host= myear.ear#appClient.jar arg1

The --host argument tells the appclient the server to connect to. The next argument is the application client deployment to use, application clients can only run a single deployment, and this deployment must also be deployed on the full server instance that the client is connecting too.

Any arguments after the deployment to use are passed directly through to the application clients main function.

Connecting to more than one host

If you want to connect to more than one host or make use of the clustering functionality then you need to specify a jboss-ejb-client.properties file rather than a host:

./appclient.sh --ejb-client-properties=my-jboss-ejb-client.properties myear.ear#appClient.jar arg1


A simple example how to package an application client and use it with WildFly can be within the quickstart appclient which is located on Github .

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:47:31 UTC, last content change 2014-07-10 16:44:39 UTC.