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.|
To launch the application client use the appclient.sh or appclient.bat script in the bin directory. For example:
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.
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:
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 .