J2EE application client |
|
|
![]() |
|
Configure and Run | TechNotes | JavaDoc | Build It Yourself |
Running the Sample |
The Basic Calculator Client Sample communicates directly with the Stateless Session Bean EJB Version 1.1 Technology Sample, on a WebSphere Application Server. Verify that the EJB Sample works correctly and that the application server starts and configures correctly, by running this Sample.
If the Technology Sample has not been installed on the application server then open a browser to the Application Server Samples Gallery (http://<host_name>:<port>/WSsamples/en/index.html) and install the Technology Sample which includes the Basic Calculator sample.
The BasicCalculatorClient Sample is a command line application. Run the Sample using the batch file or the script file supplied, or manually using the command syntax below:
To run the BasicCalculatorClient sample using the supplied scripts run the following commands:
- Open a command prompt.
- Change the current working directory to
- Run basicCalculator
If you would like to connect to a server or port other than the default, see Choosing a server.
<LAUNCHCOMMAND> <OPERATOR> <OPERAND> <OPERAND> <LAUNCHCOMMAND> ::= <J2EE Application Client Tool launch command> <OPERATOR> ::= add | subtract | multiply | divide <OPERAND> ::= <number>
To run the BasicCalculatorClient Sample from a WebSphere Application Server client, complete the following steps:
If you would like to connect to a server or port other than the default, see Choosing a server.
A successful run of the Sample (on Windows) follows:
D:\WebSphere\AppClient\samples\lib\TechnologySamplesJ2EEClient\> D:\WebSphere\AppClient\bin\launchClient.bat TechnologySamples.ear add 1 2 IBM WebSphere Application Server, Release 8.0 Java EE Application Client Tool Copyright IBM Corp., 1997-2009 WSCL0012I: Processing command line arguments. WSCL0013I: Initializing the Java EE Application Client Environment. Debugging is set to false Loading the Security Configuration... WSCL0035I: Initialization of the Java EE Application Client Environment has completed. WSCL0014I: Invoking the Application Client class com.ibm.websphere.samp les.technologysamples.basiccalcclient.BasicCalculatorClientJ2EEMain --Creating InitialContext... Done. --Looking-up Home... Done. --Narrowing... Done. --Creating Home... Done. Result: 1.0+2.0 = 3.0 |