|
Search XAP 7.0
Offline Documentation
Download latest offline documentation in HTML format:
|
Summary: This page describes the processing unit directory structure
The Processing Unit Jar FileMuch like a JEE web application or an OSGi bundle, The Processing Unit is packaged as a .jar file and follows a certain directory structure which enables the GigaSpaces runtime environment to easily locate the deployment descriptor and load its classes and the libraries it depends on. A typical processing unit looks as follows: |----META-INF |--------spring |------------pu.xml |------------pu.properties |------------sla.xml |----com |--------mycompany |------------myproject |----------------MyClass1.class |----------------MyClass2.class |----lib |--------hibernate3.jar |--------.... |--------commons-math.jar The processing unit jar file is composed of several key elements:
Runtime ModesThe processing unit can run in multiple modes. When deployed on to the GigaSpaces runtime environment or when running in standalone mode, all the jars under the lib directory of your processing unit jar, will be automatically added to the processing unit's classpath. When running within your IDE, it is similar to any other Java application, i.e. you should make sure all the dependent jars are part of your project classpath. Deploying the Processing Unit to the GigaSpaces Service GridWhen deploying the processing unit to GigaSpaces Service Grid, the processing unit jar file is uploaded to the GigaSpaces Manager (GSM) and extracted to the deploy directory of the local GigaSpaces installation (located by default under <GigaSpaces Root>/deploy). Once extracted, the GSM processes the deployment descriptor and based on that provisions processing unit instances to the running GigaSpaces containers. Each GSC to which a certain instance was provisioned, downloads the processing unit jar file from the GSM, extracts it to its local work directory (located by default under <GigaSpaces Root>/work/deployed-processing-units) and starts the processing unit instance. Deploying Data Only Processing UnitsIn some cases, your processing unit contains only a Space and no custom code. One way to package such processing unit is to use the standard processing unit packaging described above, and create a processing unit jar file which only includes a deployment descriptor with the required space definitions and SLA. GigaSpaces also provides a simpler option via its built-in data-only processing unit templates (located under <GigaSpaces Root>/deploy/templates/datagrid. Using these templates you can deploy and run data only processing unit without creating a dedicated jar for them. For more information please refer to this section Class LoadersHere is the structure of the class loaders when several processing units are deployed on the Service Grid (GSC): Bootstrap (Java)
|
System (Java)
|
Common (Service Grid)
/ \
Service CL1 Service CL2
The following table shows which user controlled locations end up in which class loader, and the important JAR files that exist within each one:
In terms of class loader delegation model, the service class loader uses a parent last delegation mode. This means that the processing unit instance class loader will first try and load classes from its own class loader, and only if they are not found, will delegate up to the parent class loader. |
The Processing Unit Structure and Configuration
This documentation refers to product version 7.0
(None)

Comments (1)
Aug 11, 2009
Anonymous says:
Correct the typo error gsrungime.jarCorrect the typo error gs-rungime.jar
Add Comment