7.19 ProcessingUnit Object
| Used on |
|
| Description | A Processing Unit (PU) is a self contained unit of work. It contains a data element (a space) and business logic (space-class) which uses one
or more spaces, either the local spaces are remote spaces contained within other Processing Units.
|
Contained Lists |
| 1 |
| Name | space |
| Type | space
|
| Description | The list of spaces contained within this processing unit - i.e. "local to this PU".
There can be any number of spaces in a PU.
There may be other spaces referenced by the business logic of this processing unit
(i.e. the remote spaces), but they should not be included in this list.
Instead, remote spaces should have references in the appropriate places (e.g. from actions).
|
| Indexed property | name |
|
| |
| 2 |
| Name | interface |
| Type | interface
|
| Indexed property | name |
|
| |
| 3 |
| Name | jarGlobalImports |
| Type | String |
| Description | List of packages to import into the Jar.
The packages specified on this list are included in the import statement on *all* generated Java files in the Jar.
The individual names on this list (e.g. "jeewiz.test") will have ".*" appended, so the import statement will be "import jeewiz.test.*;".
The imports get put into 'import' statements in the *.java files (or 'using' in C#, maybe).
The complete list of imports put into a interface or class in a Jar is
- the imports listed in the interface or class, plus
- the Jar's jar-global-imports list, plus
- all the packages (as 'package.*') from all the interfaces or classes in the jar, if the create-aggregate-imports is true (which is the default, as described above).
In GigaSpaces, we also (and later) models that support the _ObjectUID mechanism,
we also add any types for field and parameters on methods, or method return-types.
In XML, you can use one or more nested elements as an alternative to the 'jarGlobalImports=' property.
|
| Unique | false |
|
| |
| 4 |
| Name | class |
| Type | class
|
| Indexed property | name |
|
| |
| 5 |
| Name | javaBean |
| Type | javaBean
|
| Indexed property | name |
|
| |
| 6 |
| Name | action |
| Type | action
|
| Description | The list of actions that can be performed in this processing unit
|
| Indexed property | name |
|
| |
| 7 |
| Name | pulse |
| Type | pulse
|
| Description | The pulses that can be performed in this processing unit.
|
| Indexed property | name |
|
| |
| 8 |
| Name | startClient |
| Type | startClient
|
| Description | The pulses that can be performed in this processing unit.
|
| Indexed property | name |
|
| |
| 9 |
| Name | service |
| Type | service
|
| Indexed property | name |
|
| |
| 10 |
| Name | dependsOn |
| Type | String |
| Description | This is a list of the other jars and processing units that this processing unit depends on.
If the modelling tool permits, this should be modelled as a dependency on the other PUs.
Otherwise, this can be a string list of the names.
If this is omitted, this PU's Eclipse project is made dependent on all jars and PUs listed before this PU in the specification.
|
| Unique | false |
|
| |
| 11 |
| Name | receiver |
| Type | receiver
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 12 |
| Name | browser |
| Type | browser
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 13 |
| Name | subscriber |
| Type | subscriber
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 14 |
| Name | puDeploymentOption |
| Type | puDeploymentOption
|
| Description | The list of pu-deployment-options for this processing-unit.
|
| Indexed property | name |
|
|
Inherited properties |
| template |
(base property)
| |
| text |
(base property)
| |
| jwpattern |
(base property)
| |
|
7.19.1 Property 'canBePartitioned'
|
| Description | Set this true to allow the PU to be deployed as partitioned.
If you do not set this, then a deploymentOption that specifies more than one partition for this PU will cause the generation to fail.
If this is set, you will also have to design the routing information for service calls,
and whether subscribers, receivers and browsers (all modelling concepts available in GigaSystemBuilder)
should act on a local space or across a cluster.
|
| Type | boolean |
| Default | false |
7.19.2 Property 'constraintExceptionType'
|
| Description | The constraintExceptionType is the type of the exception which is thrown if the constraint fails.
It can be any valid class name - probably defined by a 'jwclass'. It could be, for example, a specific class of business exception which should be thrown for this constraint.
If this is not in the same package as the build module (e.g. in the EJB Jar or Ear), then the name should be qualified by the package name.
The constraintExceptionType is available on constraints, objects and assemblies, and can also be set in the top level properties build file (e.g. build.jwp).
Because this is a delegated property, the actual value used is whichever instance is encountered first, working up from the validation object.
This means it is very easy to specialise the exceptions thrown in part of the specification tree (e.g. one session EJB), leaving the rest unchanged.
Failing any value at all, 'RuntimeException' is used ... but clearly this should not be used in production systems.
|
| Type | String |
7.19.3 Property 'description'
|
| Description | Optional description.
Use this to
- document the meaning of a particular item
- specify functionality at the design stage for implementation later.
|
| Type | String |
7.19.4 Property 'generateLogLevel'
|
| Description | Should be a number for the trace level priority to generate code.
Any lower priority traces will be filtered out at *generate* time.
Most tracing mechanisms, such as log4j, can also filter traces at run-time.
The priorities are
- 1 = Fatal
- 2 = Error
- 4 = Warning
- 6 - Info
- 8 - Debug (Fine)
- 9 - DetailedDebug (Finest)
This is a delegated property.
The default can be set for builds by setting generateLogLevel in the build properties.
Failing that, the default is currently set in the Java system.properties to Info level ($logLevelInfo).
This property is typed as "String" so it can be picked up by delegation from classes and jars;
numeric properties in system.properties (like '10') are stored as strings in Java/Velocity.
|
| Type | String |
7.19.5 Property 'name'
|
| Description | The name of the jar (e.g. 'myjar.jar'). This is required.
The output jar goes in the $projectDir/dest directory.
No extension is added automatically, so if you want to create a jar you must add '.jar'.
The name of a jar must be unique within an application.
This is not enforceable at the Java level because it does not have the higher-level concept, like 'Application', that can list jars.
However, extensions of the 'jar' concept will require that jar names are unique.
|
| Type | String |
| Required | true |
| Default | jar1 |
7.19.6 Property 'package'
|
| Alias | namespace |
| Description | This is the package attribute: it declares the name of the package that this interface (or class, or entity, etc.) belongs to.
It can be used on
- reference types (interfaces and classes) and all their derivatives
- associations
- assemblies of model-objects
- containers of same, like jars.
It uses delegation of responsibility to search its parent chain. For example, in the J2EE realm, this means that the package can be specified on (working up the containment chain):
- an entity,
- or its ejb-jar,
- or the application,
- or in the assembly
- or in the build properties '.jwp' file.
If none of these is specified the package will be null.
Null packages are not recommended but legal for simple Java builds.
For larger systems, null packages are not allowed.
The combination of the package and class name (i.e. the fully-qualified Java classname) must be unique
across all reference types and their derivatives in a build.
|
| Type | String |
|