If you have not refreshed or restarted your server since last modifying the Query or Glossary components, refresh the server now before running the client. Otherwise, verify that the server is running.
Run the client from using a batch file or UNIX shell script. The batch file or shell script configures the CLASSPATH environment variable, then runs the application using the JDK 1.3 java program included with your EAServer installation.
Creating the Windows batch file
Create a file named runtest.bat containing the commands below:
call %JAGUAR%\bin\setenv.bat set CLASSPATH=%JAGUAR%\java\lib\easj2ee.jar; set CLASSPATH=%CLASSPATH%;%JAGUAR%\java\lib\easclient.jar set CLASSPATH=%CLASSPATH%;%JAGUAR%\java\classes set JAVA_HOME=%JAGUAR_JDK13% %JAVA_HOME%\jre\bin\java Sample.Intro.Glossary.TestClient %*
Creating the UNIX shell script
Create a file named runtest containing the commands below:
#!/bin/sh . $JAGUAR/bin/setenv.sh CLASSPATH=$JAGUAR/java/lib/easj2ee.jar CLASSPATH=$CLASSPATH:$JAGUAR/java/lib/easclient.jar CLASSPATH=$CLASSPATH:$JAGUAR/java/classes export CLASSPATH JAVA_HOME=$JAGUAR_JDK13 $JAVA_HOME/jre/bin/java Sample.Intro.Glossary.TestClient $*
Change the file permissions to allow the script to be executed. For example:
chmod 777 runtest
Running the client application
Run the batch or script file, specifying the server host name and IIOP port number on the command line as follows:
runtest iiop://host:iiop-port
For example:
runtest iiop://myhost:9000
The client application:
Creates a proxy for the Glossary entity bean’s home interface, then calls the create method to populate the database with some glossary entries.
Creates a proxy for Query session bean’s home interface, then calls the runQuery method to get a result set containing all the entries, then prints them.
If errors occur, check the server log file for information on how to correct the problem.
Copyright © 2005. Sybase Inc. All rights reserved. |