background image
<< Undeploying the Sample Application | Using the deployment tool >>
<< Undeploying the Sample Application | Using the deployment tool >>

Deploying Stubs to the Sun J2EE Server

Deploying Stubs to the Sun J2EE Reference Server
65
Deploying Stubs to the Sun J2EE Reference Server
If you are working in a Sun J2EE Reference Server environment, you will need to
deploy any stubs that you generate (see Generating Stubs and Lookup Tables for the Unit
Test
on page 56)
before you can actually execute your test scripts.
To deploy stubs to the Sun J2EE Reference Server:
1
Verify that you have JAVA_HOME in your system or user classpath. If not, create
a JAVA_HOME environment variable that points to the root of your JDK 1.3.x
installation, for example
C:\jdk1.3.1
.
Note:
Sun JDK 1.3.x is the minimum required JDK for the Sun J2EE Reference
Server.
2
Start the Cloudscape database.
For example:
a
Open a Command Prompt window.
b
Type
<J2EE HOME>
\bin\cloudscape -start
.
3
In a new Command Prompt window, change the default security settings for the
Sun J2EE Reference Server.
The default security settings for the Sun J2EE Reference Server prevents native
libraries (DLLs) from being loaded. Because stubs require DLLs for logging and
lookup tables, the default security settings will prevent stubs from working. To
enable DLLs, add the following lines to the
server.policy
file found in the
<J2EE
HOME>
\lib\security
directory:
grant {
permission java.lang.RuntimePermission "loadLibrary.*";
};
Note:
You can add these lines anywhere in the file as long as the lines are not
inside another
grant{}
block.
4
Start the Sun J2EE Reference Server.
For example, type
<J2EE HOME>
\bin\j2ee.
5
Start the deployment tool.
For example, type
<J2EE HOME>
\bin\deploytool.