Summary: Installing WSAD; using correct JDK and JRE; ReplicatedSessionBean object; configuring server for an application; GigaSpaces WebSphere 6.1 example.
Overview
This section describes required steps for building J2EE Web applications with IBM WebSphere 6 and GigaSpaces. WebSphere is used as part of WebSphere Studio Application Developer (WSAD 6.1).
Two simple examples accompanied to this document demonstrates flow and relevant components integration to provide access into the GigaSpaces API.
WSAD 6 Download and Installation
- Download WebSphere Studio Application Developer for Windows (WSAD 6.1): http://www-128.ibm.com/developerworks/downloads/ws/was/
- WebSphere installation automatically creates a default profile called AppSer01 (a WebSphere profile is like a WebLogic domain) under AppServer\profiles.
 | This profile will be referred to as <Profile Root> from now on. |
 | Make sure the JDK version used by the application server to run the example matches the JDK version used to execute the ear.bat/sh file. For example, if the example runs in the application server using JDK 1.4, the ear.bat/sh file should be executed using JDK 1.4. |
 | Make sure the installation path doesn't contain any spaces, such as C:\Documents and Settings. |
Set Security Policy
Before starting the JCA Application on the server, you need to set the appropriate security policy.
- Replace the content of the <Profile Root>\properties\server.policy file with the content of the <GigaSpaces Root\policy\policy.all file.
- The content of this file should indicate all permissions (something like the following):
grant{
permission java.security.AllPermission "", "";
};
Enable Java 2 Security
- Java 2 Security is enabled by default in WebSphere. To make sure it is enabled, open the administration console:
- The following checkbox must be checked:
- If you encounter security exceptions, edit the following XML file, which in turn affects the windows service launch command line:
- At the end of the file, edit the genericJvmArguments property, for example:
This sets the security policy file, and turns on debugging.
 | You can augment or replace the default JVM runtime permissions using the java.security.policy System property to specify the path to a policy file. This System property is unique in that it can use "=" or "==" to indicate whether the policy file specified should append to, or replace the default permissions. If you use the "=", the permissions in the specified policy file are appended to the default permissions. If you use the "==", then the permissions in the specified policy file replace the default permissions. |
Start WebSphere Application Server
- To run the server, locate the following file:
- The WebSphere Application server starts as a Windows service, so you don't see a command line system output window. Instead, you can view the system output by accessing the log files in <Profile Root>\logs[Server-Name] (usually the path is: <WebSphere Root>\profiles\AppSrv01\logs\server1).
- You can see that the server has been started and is ready either by viewing the SystemOut.log file, or by checking the status of the windows service under Control Panel > Administrative Tools > Services. The service name is: IBMWAS61Service - [Machine-Name]Node01.
- The WebSphere installation also creates a link to the Administration Console of the default profile: http://localhost:9060/ibm/console.
- Log into the WebSphere application server: If you provided an administrator username and password during installation, use them now to log in. Otherwise, you can log in without a user ID (Just click Log in, without entering a user ID).
Deploy New Application
- Click Enterprise Applications to see the list of currently deployed applications. (It is recommended not to directly click Install New Application, since viewing the currently installed applications allows you to see if your application is already installed, and therefore needs to be deleted first before installing it again).
- Click Install.
J2EE WebSphere 6 examples