WAS v8.5 > Develop applications > Develop Client applicationsDevelop client applications
A client application performs business logic and makes use of the framework provided by an underlying client. Developing the code for a client application depends on the objects and functions to exploit, and the programming model to use.
Install the software development resources needed to develop client applications for use with WebSphere Application Server. During code development, we do not need access to the WAS. However, to assemble some types of client applications you need to install files for the client that provides the framework for the client application. Instead of installing WAS we can install the Application Client feature, which provides the same resources and clients to aid development of client applications.
To use a client application to access a remote object on an application server, develop your client application code as described in the following steps and the related topics. These topics only describe the client-specific considerations; they do not describe general client programming models, which you should already be familiar with. Samples for different types of client applications are provided with the Application Client.
- Choose the type of client to use as a framework for the client application. Decision factors for choosing a client include whether to run a client application on Java EE or J2SE; whether you want ease of use with a small installation footprint or full-function with medium-large footprint; and whether you need licence to copy or redistribute the client. For more information about choosing the type of client, see Choose a type of client.
- Develop the client application code. The following substeps are a high-level general procedure. Information specific to a type of client is given in the related tasks.
- Create an instance of the object to access on the remote server. We can use full JNDI support to get a suitable reference to administered objects from the server's JNDI namespace. Alternatively, we can get suitable references to objects programmatically without using JNDI.
Using the javax.naming.InitialContext class, the client application program uses the lookup operation to access the JNDI namespace. The InitialContext class provides the lookup method to locate resources.
We can compare the use of JNDI and programmatic techniques by looking at the samples provided for the Java EE client and Java thin client in an Application Client installation (for example, in C:\wac70\samples\src\):
- Java EE client use of JNDI for BasicCalculatorHome: TechnologySamplesJ2EEClient\BasicCalculator\com\ibm\websphere\samples\technologysamples\basiccalcclient\BasicCalculatorClientJ2EE.java
- Java thin client programmatic retrieval of BasicCalculatorHome: TechnologySamplesThinClient\BasicCalculator\com\ibm\websphere\samples\technologysamples\basiccalcthinclient\BasicCalculatorClientThin.java
- Create a connection to the server. If the server runs with security enabled, we can configure secure connections.
- Work with the objects to perform your business requirements. For example, send and receive JMS messages, update database entries, handle error conditions, and close resources used.
- Compile or assemble the client application. This creates the JAR or EAR file that we can deploy to make the client application available for use.
To compile your client application, include the JAR files needed in the CLASSPATH setting for the javac command; for example, any extra JAR files for the client application's own classes, JAR files for IBM Thin clients used, and JAR files for JDBC provider classes.
IBM-provided clients are not packaged with JDBC provider classes. For example, the WAS v7.0 Java Thin application client is not packaged with Apache Derby 10.2 classes. If wer client application needs to use a database class (such as through the JNDI lookup of a datasource), you must obtain the class files from the database provider and make them available when compiling and running the client application.
After you develop a client application, deploy it into the environment you want it to run.
Subtopics
- Develop stand-alone thin client applications
Develop the application code, then assemble the code into a client application that we can deploy on a client machine.- Develop a Java EE client application
This topic provides the steps required to develop code for a Java EE client application.- Develop a Java thin client application
Develop the application code, then assemble the code into a client application that we can deploy on a client machine.- Develop ActiveX client application code
This topic provides an outline for developing an ActiveX Windows program, such as Visual Basic, VBScript, and Active Server Pages, to use the WebSphere ActiveX to EJB bridge to access enterprise beans.- Develop applet client code
Applet clients are capable of communicating over the HTTP protocol and the RMI-IIOP protocol.- Choose a type of client
A client provides the framework for client applications that run separately from the application server.- Install, updating, rolling back, and uninstalling the Application Client for IBM WAS
IBM Installation Manager is a common installer for many IBM software products that we use to install, update, roll back, and uninstall the Application Client for IBM WAS.- Develop stand-alone thin client applications
Develop the application code, then assemble the code into a client application that we can deploy on a client machine.- Develop a Java EE client application
This topic provides the steps required to develop code for a Java EE client application.- Develop a Java thin client application
Develop the application code, then assemble the code into a client application that we can deploy on a client machine.- Develop ActiveX client application code
This topic provides an outline for developing an ActiveX Windows program, such as Visual Basic, VBScript, and Active Server Pages, to use the WebSphere ActiveX to EJB bridge to access enterprise beans.- Develop applet client code
Applet clients are capable of communicating over the HTTP protocol and the RMI-IIOP protocol.- Run the Pluggable Application Client code
This topic provides steps for installing and using the Pluggable Application Client.- Example: Enabling logging and tracing for application clients
The ActiveX to EJB bridge provides two logging and tracing formats: Windows Application Event Log and Java Trace Log.
Related concepts:
Application Client for WAS
Types of client applications
Related
Develop applications that use JNDI
Deploy client applications
Choose a type of client
Deploy client applications
Install, updating, rolling back, and uninstalling the Application Client for IBM WAS
Reference:
Lookup names support in deployment descriptors and thin clients