The package-appclient script, located in the install-dir/bin directory, is used to package a client application into a single appclient.jar file. Packaging an application client involves the following main steps:
$AS_INSTALL to reference the location where the package was un-jared plus /appclient. For example: $AS_INSTALL=/install-dir/appclient.
$AS_NSS to reference the location of the NSS libraries. For example:
$AS_JAVA to reference the location where the JDK is installed.
$AS_ACC_CONFIG to reference the configuration XML file (sun-acc.xml). The sun-acc.xml is located at install-dir/config.
$AS_IMQ_LIB to reference the imq home. Use domain-dir/imq/lib.
Change $CONFIG_HOME/asenv.conf to your-ACC-dir/config/asenv.conf.
Change %CONFIG_HOME%\config\asenv.bat to your-ACC-dir\config\asenv.bat
Ensure that the DOCTYPE references install-dir/lib/dtds to your-ACC-dir/lib/dtds.
Ensure that the <target-server> address attribute references the remote server machine.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE client-container SYSTEM "file:install-dir/lib/dtds/sun-application-client-container_1_0.dtd"> <client-container> <target-server name="qasol-e1" address="qasol-e1" port="3700"> <log-service level="WARNING"/> </client-container>
For more information on the sun-acc.xml file, see The sun-acc.xml File.
You can run the application client using SSL with certificate authentication. To set the security options, modify the sun-acc.xml file as shown in the code illustration below. For more information on the sun-acc.xml file, see The sun-acc.xml File.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE client-container SYSTEM "file:install-dir/lib/dtds/sun-application-client-container_1_0.dtd"> <client-container> <target-server name="qasol-e1" address="qasol-e1" port="3700"> <security> <ssl cert-nickname="cts" ssl2-enabled="false" ssl2-ciphers="-rc4,-rc4export,-rc2,-rc2export,-des,-desede3" ssl3-enabled="true" ssl3-tls-ciphers="+rsa_rc4_128_md5,-rsa_rc4_40_md5,+rsa3_des_sha, +rsa_des_sha,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_des_56_sha, -rsa_rc4_56_sha" tls-enabled="true" tls-rollback-enabled="true"/> <cert-db path="ignored" password="ignored"/> <!-- not used --> </security> </target-server> <client-credential user-name="j2ee" password="j2ee"/> <log-service level="WARNING"/> </client-container>
Under install-dir /bin directory, run the package-appclient script.
For details, see the Sun Java System Application Server Platform Edition 8.2 Reference Manual.
This creates an appclient.jar file and stores it under install-dir/lib/appclient/ directory.
The appclient.jar file provides an application client container package targeted at remote hosts and does not contain a server installation. You can run this file from a remote machine with the same operating system as where it is created. That is, appclient.jar created on a Solaris platform does not function on Windows.
Copy the install-dir /lib/appclient/appclient.jar file to the desired location.
appclient/bin - contains the appclient script used to launch the ACC.
appclient/lib - contains the JAR and runtime shared library files.
appclient/lib/appclient - contains the following files:
sun-acc.xml - the ACC configuration file.
client.policy file- the security manager policy file for the ACC.
appclientlogin.conf file - the login configuration file.
client.jar file - created during the deployment of the client application.
appclient/lib/dtds - contains sun-application_client-container_1_0.dtd, which is the DTD corresponding to sun-acc.xml.