GridGain™ 2.1.0
Java API Specification

org.gridgain.grid.loaders.websphere
Class GridWebsphereLoader

java.lang.Object
  extended by org.gridgain.grid.loaders.websphere.GridWebsphereLoader
All Implemented Interfaces:
com.ibm.websphere.runtime.CustomService, GridWebsphereLoaderMBean

@GridLoader(description="Websphere loader")
public class GridWebsphereLoader
extends Object
implements GridWebsphereLoaderMBean, com.ibm.websphere.runtime.CustomService

This is GridGain loader implemented as Websphere custom service (MBean). Websphere loader should be used to provide tight integration between GridGain and Websphere AS. Specifically, Websphere loader integrates GridGain with Websphere logging, MBean server and work manager (JSR-237).

The following steps should be taken to configure this loader:

  1. Add CustomService in administration console (Application Servers -> server1 -> Custom Services -> New).
  2. Add custom property for this service: cfgFilePath=config/default-spring.xml.
  3. Add the following parameters:

For more information consult Developing Custom Services and Configuring and Starting GridGain.

Note: Websphere is not shipped with GridGain. If you don't have Websphere, you need to download it separately. See http://www.ibm.com/software/websphere/ for more information.

How to use AOP with Websphere

The following steps should be taken before using Gridify annotation in applications on Websphere.

AspectJ AOP

  1. Add GridWebsphereLoader with configuration described above.
  2. Classpath text field for Custom Service (GridWebsphereLoader) should contain the [GRIDGAIN_HOME]/config/aop/aspectj folder..
  3. Add JVM option -javaagent:[GRIDGAIN_HOME]/libs/aspectjweaver-1.5.3.jar (replace [GRIDGAIN_HOME] with absolute path) in admin console (Application servers > server1 > Process Definition > Java Virtual Machine text field Generic JVM arguments)
  4. Add java permission for GridGain classes in server.policy file. For example, in file /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/server.policy
     grant codeBase "file:/home/link/svnroot/gridgain/work/libs/-" {
         // Allow everything for now
         permission java.security.AllPermission;
     };
     

Spring AOP

Spring AOP framework is based on dynamic proxy implementation and doesn't require any specific runtime parameters for online weaving. All weaving is on-demand and should be performed by calling method GridifySpringEnhancer.enhance(Object) for the object that has method with Gridify annotation.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

 

Field Summary
 
Fields inherited from interface com.ibm.websphere.runtime.CustomService
externalConfigURLKey
 
Constructor Summary
GridWebsphereLoader()
           
 
Method Summary
 String getConfigurationFile()
          Gets configuration file path set in XML configuration for this service.
 void initialize(Properties properties)
          
 void setConfigurationFile(String cfgFile)
          Sets configuration file path.
 void shutdown()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridWebsphereLoader

public GridWebsphereLoader()
Method Detail

initialize

public void initialize(Properties properties)
                throws Exception

Specified by:
initialize in interface com.ibm.websphere.runtime.CustomService
Throws:
Exception

shutdown

public void shutdown()
              throws Exception

Specified by:
shutdown in interface com.ibm.websphere.runtime.CustomService
Throws:
Exception

getConfigurationFile

public String getConfigurationFile()
Gets configuration file path set in XML configuration for this service.

Specified by:
getConfigurationFile in interface GridWebsphereLoaderMBean
Returns:
Configuration file path.

setConfigurationFile

public void setConfigurationFile(String cfgFile)
Sets configuration file path.

Specified by:
setConfigurationFile in interface GridWebsphereLoaderMBean
Parameters:
cfgFile - Configuration file path.

toString

public String toString()

Overrides:
toString in class Object

GridGain™ 2.1.0
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.