Running Thin application client code on a server machine

This topic provides the steps necessary to run Thin application client code on a server machine.

Before you begin

You must install WebSphere Application Server before performing this task.

Procedure

  1. Set up the Thin application client environment.
    Use the setupClient script.
    1. Start the Qshell environment. On the CL command line, run the STRQSH command.
    2. On the Qshell command line, run the following command using the dot (.) operator:
      . app_server_root/bin/setupClient [-profileName profileName]
      
  2. Compile your client application.
    Run the following command on the Qshell command line.
    javac -J-Djava.version=1.5 -classpath "$WAS_CLASSPATH:jars_and_classes" -extdirs $WAS_EXT_DIRS app_class.java
    Run the following ws_ant command:
    <property environment="env"/>
    <java classname="fully_qualified_class_name_to_run" fork="true">
       <jvm line="${env.WAS_LOGGING}"/>
       <sysproperty key="java.security.auth.login.config" 
            value="${env.USER_INSTALL_ROOT}/properties/wsjaas_client.conf"/>
       <sysproperty key="java.ext.dirs" path="${env.JAVA_HOME}/jre/lib/ext:
             ${env.WAS_EXT_DIRS}:${env.WAS_HOME}/plugins:${env.WAS_HOME}/
             lib/WMQ/java/lib"/>
        <sysproperty key="java.naming.provider.url" 
             value="an_IIOP_URL_or_a_corbaloc_URL_to_your application_server_machine_name"/>-->
        <sysproperty key=java.naming.factory.initial
              value="com.ibm.websphere.naming.WsnInitialContextFactory"/>
        <sysproperty key="server.root" file="${env.WAS_HOME}"/>
        <jvmarg value="${env.CLIENTSAS}"/>
        <jvmarg value="${env.CLIENTSSL}"/>
        <jvmarg line="${env.USER_INSTALL_PROP}"/>
         <classpath>
         <pathelement path="${env.WAS_CLASSPATH}"/>
         <classpath>
         <arg value="fully_qualified_class_name_to_run"/>
          </java>
    
    path="${env.JAVA_HOME}/jre/lib/ext:${env.WAS_EXT_DIRS}:${env.WAS_HOME}/plugins:${env.WAS_HOME}/lib/WMQ/java/lib"/>
       <classpath>
          <pathelement path="${env.WAS_CLASSPATH}"/>
    </java>
  3. Run the application client.
    Run the following command on a Qshell command line.
    java ${JAVA_FLAGS_EXT} -classpath "$WAS_CLASSPATH:jars_and_classes" -Djava.naming.provider.url=URL class_name app_parm
    
    When using the WebSphere Application Server launcher, run the following command on a Qshell command line:
    java ${JAVA_FLAGS_EXT} -classpath "$WAS_CLASSPATH:jars_and_classes" -Djava.naming.provider.url=URL com.ibm.ws.bootstrap.WSLauncher class_name app_parm
    
  4. Launch the administrative program. The com.ibm.ws.admin.client_6.1.0.jar JAR file, which is in the WAS_HOME/runtimes directory and the com.ibm.ws.security.crypto.jar JAR file, which is in the WAS_HOME/plugins directory should be in your classpath. You can use java -classpath to have the JAR files in your classpath when launching your program.

Example

View the Samples gallery for more information about the Application Client.




In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 8:21:57 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-express-iseries&topic=tcli_developthinserver
File name: tcli_developthinserver.html