11.26 ProcessingUnit Object
| Used on |
|
| Description | A Processing Unit (PU) is a self-contained processing element that runs in its own Java Virtual Machine.
This means its address space is distinct from all other PU's.
If you are used to GigaSpaces, you might be expecting to see 'spaces' as children of PUs.
We've taken them out in CloudTran: there is one space, and each PU has an embedded local space.
|
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 | action |
| Type | action
|
| Description | The list of actions that can be performed in this processing unit
|
| Indexed property | name |
|
| |
| 3 |
| Name | pulse |
| Type | pulse
|
| Description | The pulses that can be performed in this processing unit.
|
| Indexed property | name |
|
| |
| 4 |
| Name | startClient |
| Type | startClient
|
| Description | The pulses that can be performed in this processing unit.
|
| Indexed property | name |
|
| |
| 5 |
| Name | interface |
| Type | interface
|
| Indexed property | name |
|
| |
| 6 |
| 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 |
|
| |
| 7 |
| Name | receiver |
| Type | receiver
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 8 |
| Name | sender |
| Type | sender
|
| Description | The list of senders. A sender represents an outbound endpoint of a web service.
|
| Indexed property | name |
|
| |
| 9 |
| Name | browser |
| Type | browser
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 10 |
| Name | subscriber |
| Type | subscriber
|
| Description | The list of space events triggered in this PU.
|
| GenerateAllList | true |
|
| |
| 11 |
| 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. "com.myco.test") will have ".*" appended, so the import statement will be "import com.myco.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 |
|
| |
| 12 |
| Name | class |
| Type | class
|
| Indexed property | name |
|
| |
| 13 |
| Name | javaBean |
| Type | javaBean
|
| Indexed property | name |
|
| |
| 14 |
| Name | entity |
| Type | entity
|
| Indexed property | name |
|
| |
| 15 |
| Name | service |
| Type | service
|
| Indexed property | name |
|
| |
| 16 |
| Name | puDeploymentOption |
| Type | puDeploymentOption
|
| Description | The list of pu-deployment-options for this processing-unit.
|
| Indexed property | name |
|
|
Inherited properties |
|
11.26.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/CloudTran)
should act on a local space or across a cluster.
|
| Type | boolean |
| Default | false |
11.26.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 |
11.26.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 |
11.26.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 |
11.26.5 Property 'generateSecurityRoles'
|
| Description | If set to "true", switches on the automatic creation of the security roles from any existing role-groups defined in the application or EjbJars.
This value is available on EJBJars and Applications as well as within the role-groups.
This is a delegated property, so you do not need to set the value on this object.
The value used will then be the first value encountered on the parent chain.
The default is true - security-roles are generated. This is set in the business object models system.properties.
If you want to disable this for a particular object, set the value to "false".
|
| Type | boolean |
11.26.6 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 |
11.26.7 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 |
|