Summary: Installing WebLogic; setting security policy; GigaSpaces WebLogic 9.2.1/10 examples.
Overview
This section describes required steps for building J2EE Web applications with BEA WebLogic 9.2.1 or Weblogic 10 and GigaSpaces.
Two simple examples accompanied to this document demonstrates the flow and relevant components integration to provide access into the GigaSpaces API.
WebLogic Download
Download WebLogic 9.2.1 Application Server from:
http://commerce.bea.com/showallversions.jsp?family=WLS – scroll down to WebLogic Server Package Installer and select WebLogic Server 9.2 MP1.
Download WebLogic 10 Application Server from:
http://commerce.bea.com/showproduct.jsp?family=WLS&major=10&minor=0
 | 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. |
Setting WebLogic Security Policy
- Open a command window.
- Move to the examples configuration directory
cd %BEA_HOME%\samples\domains\wl_server\bin
- Edit one of the following files:
- StartWeblogic.cmd – for Windows platforms
- StartWeblogic.sh – for UNIX platforms
- Modify the command line to have the following Java security policy setting:
-Djava.security.policy=<GigaSpaces Root>\policy\policy.all
- Make sure your <GigaSpaces Root>\policy\policy.all file includes the following:
grant {
permission java.security.AllPermission;
};
This setting avoids access permissions problems when Weblogic accesses the space.
 | 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 WebLogic Server
- Open a command window.
- Move to the examples server configuration directory
cd %BEA_HOME%\samples\domains\wl_server\bin
- Run one of the following files:
- StartWeblogic.cmd – for Windows platforms
- StartWeblogic.sh – for UNIX platforms
Start Administration Console
- Start the Administration Console, with the user name: weblogic, and password: weblogic.
After starting the Weblogic Server successfully, you can now deploy the first GigaSpaces example. This example demonstrates the use of a Session Bean, using the regular API for GigaSpaces application.
GigaSpaces WebLogic 9.2.1/10 Example