|
|
Building and Running the CORBA Sample Applications
The topic includes the following sections:
Building and Running the Security Sample Application
The Security sample application demonstrates using password authentication. For instructions for building and running the Security sample application, see the Guide to the CORBA University Sample Applications.
Building and Running the Secure Simpapp Sample Application
The Secure Simpapp sample application demonstrates using the SSL protocol and certificate authentication to protect communications between client applications and the BEA Tuxedo domain.
To build and run the Secure Simpapp sample application, complete the following steps:
Before you can use the Secure Simpapp sample application, obtain a certificate and private key (IIOPListener.pem) for the IIOP Listener/Handler from the certificate authority in your enterprise and load the certificate in a Lightweight Directory Access Protocol (LDAP)-enabled directory service. The runme command prompts you for the pass phrase for the private key for the IIOP Listener/Handler.
Step 1: Copy the Files for the Secure Simpapp Sample Application into a Work Directory
You need to copy the files for the Secure Simpapp sample application into a work directory on your local machine.
The files for the Secure Simpapp sample application are located in the following directories:
Windows 2000
drive:\TUXdir\samples\corba\simpappSSL
UNIX
/usr/local/TUXdir/samples/corba/simpappSSL
You will use the files listed in Table 11-1 to build and run the Secure Simpapp sample application.
Step 2: Change the Protection Attribute on the Files for the Secure Simpapp Sample Application
During the installation of the BEA Tuxedo software, the sample application files are marked read-only. Before you can edit or build the files in the Secure Simpapp sample application, you need to change the protection attribute of the files you copied into your work directory, as follows:
Windows 2000
prompt>attrib -r drive:\workdirectory\*.*
UNIX
prompt>/bin/ksh
ksh prompt>chmod u+w /workdirectory/*.*
On the UNIX operating system platform, you also need to change the permission of runme.ksh to give execute permission to the file, as follows:
ksh prompt>chmod +x runme.ksh
Step 3: Verify the Settings of the Environment Variables
Before building and running the Secure Simpapp sample application, you need to ensure that certain environment variables are set on your system. In most cases, these environment variables are set as part of the installation procedure. However, you need to check the environment variables to ensure they reflect correct information.
Table 11-2 lists the environment variables required to run the Secure Simpapp sample application.
To verify that the information for the environment variables defined during installation is correct, perform the following steps:
Windows 2000
The Control Panel appears.
The System Properties window appears.
The Environment page appears.
UNIX
ksh prompt>printenv TUXDIR
ksh prompt>printenv JAVA_HOME (for the CORBA Java client application)
To change the settings, perform the following steps:
Windows 2000
UNIX
ksh prompt>export TUXDIR=directorypath
ksh prompt>export JAVA_HOME=directorypath (for the CORBA Java client application)
Step 4: Execute the runme Command
The runme command automates the following steps:
Note: You can also run the Secure Simpapp sample application manually. The steps for manually running the Secure Simpapp sample application are described in the Readme.html file.
To build and run the Secure Simpapp sample application, enter the runme command, as follows:
Windows 2000
prompt>cd workdirectory
prompt>runme
UNIX
ksh prompt>cd workdirectory
ksh prompt>./runme.ksh
The Secure Simpapp sample application runs and prints the following messages:
Testing simpapp
cleaned up
prepared
built
loaded ubb
booted
ran
shutdown
saved results
PASSED
During execution of the runme command, you are prompted for a password. Enter the pass phrase of the private key of the IIOP Listener/Handler.
Table 11-3 lists the C++ files in the work directory generated by the runme command.
Table 11-4 lists the Java files in the work directory generated by the runme command.
Table 11-5 lists files in the RESULTS directory generated by the runme command.
Using the Secure Simpapp Sample Application
Run the server application in the Secure Simpapp sample application, as follows:
Windows 2000
prompt>tmboot -y
UNIX
ksh prompt>tmboot -y
Run the CORBA C++ client application in the Secure Simpapp sample application as follows:
Windows 2000
prompt> set TOBJADDR=corbalocs://host:port
prompt> simple_client -ORBid BEA_IIOP -ORBpeerValidate none
String?
Hello World
HELLO WORLD
hello world
UNIX
ksh prompt>export TOBJADDR=corbalocs://host:port
ksh prompt>simple_client -ORBid BEA_IIOP -ORBpeerValidate none
String?
Hello World
HELLO WORLD
hello world
Run the CORBA Java client application in the Secure Simpapp sample application, as follows:
Windows 2000
prompt> set CLASSPATH=%TUXDIR%\udataobj\java\jdk\m3envobj.jar;
%TUXDIR%\udataobj\java\jdk\wleclient.jar;.;%CLASSPATH%
java -DTOBJADDR=%TOBJADDR% -Dorg.omg.CORBA.ORBpeerValidate=none
classpath %CLASSPATH% SimpleClient
String?
Hello World
HELLO WORLD
hello world
UNIX
ksh prompt>export CLASSPATH=${TUXDIR}/udataobj/java/jdk/m3envobj.jar;
${TUXDIR}/udataobj/java/jdk/wleclient.jar:.:${CLASSPATH}
java -DTOBJADDR=${TOBJADDR} -Dorg.omg.CORBA.ORBpeerValidate=none
-classpath ${CLASSPATH} SimpleClient
String?
Hello World
HELLO WORLD
hello world
Note: The CORBA Java client application in the Secure Simpapp sample CORBA Java client application uses the client-only JAR files m3envobj.jar and wleclient.jar.
Before using another sample application, enter the following commands to stop the Secure Simpapp sample application and to remove unnecessary files from the work directory:
Windows 2000
prompt>tmshutdown -y
prompt>nmake -f makefile.nt clean
UNIX
ksh prompt>tmshutdown -y
ksh prompt>make -f makefile.mk clean
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|