Java Reference
In-Depth Information
works well enough. However, there are many things you may want to configure, and because GridGain is
Spring-friendly from the core, this is very easy. If instead you'd like to override the settings in that file, pass
in your own application context:
./gridgain.sh my-application-context.xml
If you want even further control over the process, down to the last shell script, you can bootstrap the
GridGain grid nodes yourself. The crux of the process is a call to
org.gridgain.grid.GridFactory.start( “my-application-context.xml”) ;
There are many versions of the start method, but most of them take a Spring application context
(either an instance of ApplicationContext , or a String or URL to an XML application context). The
application context is where you configure the grid node.
There are many pre-built implementations for starting a Grid instance, however, and you'll rarely
need to write your own. The implementations, called Grid Loaders, provide the necessary integration to
start the Grid in many different environments. Summarized in Table 10-1 are some of the common ones.
Table 10-1 Common GridLoader implementations that you can use in different environments.
Table 10-1 . Description of the various GridLoader implementations.
Class
Description
org.gridgain.grid. loaders .cmdline.GridCommandLineLoader
This is the default implementation.
This is what is used when you run
gridgain.sh or gridgain.bat .
org.gridgain.grid. loaders .servlet.GridServletLoader
This is likely the second most useful
implementation. This provides a
servlet that bootstraps the GridGain
instance inside any web container as
a servlet.
org.gridgain.grid. loaders .jboss.GridJbossLoader
Provides a hook for running a Grid
inside of JBoss as JMX MBean
org.gridgain.grid. loaders .weblogic.GridWeblogicStartup,
org.gridgain.grid.loaders.weblogic.GridWeblogicShutdown
Provides integration with Weblogic's
infrastructure for JMX (monitoring),
logging, and the WorkManager
implementation.
org.gridgain.grid. loaders .websphere.GridWebsphereLoader
This GridGain loader is implemented
as a JMX MBean. This, like the
WebLogic integration, provides
integration with logging, and the
WorkManager implementation.
org.gridgain.grid. loaders .glassfish.GridGlassfishLoader
Provides integration with Glassfish as a
lifecycle listener that works on both
Glassfish 1 and 2.
Search WWH ::




Custom Search