11.18 Jar Object
| Used on |
|
| Description | A jar in GigaSpaces modelling will produce a Java jar that only contains normal Java classes and Java Beans.
It is a shared "bucket" of useful items that can be used in any of the other areas of an application.
Because a jar is included in all other deployments, in theory you only need one of these in an application,
but you can create as many as you like if that is convenient to you.
In modelling an application, this jar is a peer of "Processing Unit".
Because the Processing Unit is self-contained and artifacts in it will not be deployed on other PUs,
it cannot contain reference to artifacts that are 'in' other PUs.
In other words, an interface or a bean that is defined as part of one PU effectively becomes local to that PU.
Therefore, where one PU creates an object an another works on it, there must either be an interface or bean in a common jar
so that both PUs can make reference to it.
All jars in an application are included in the build and execution classpaths of all PUs.
|
Contained Lists |
| 1 |
| Name | javaBean |
| Type | javaBean
|
| Indexed property | name |
|
| |
| 2 |
| Name | class |
| Type | class
|
| Indexed property | name |
|
| |
| 3 |
| Name | interface |
| Type | interface
|
| Indexed property | name |
|
|
Inherited properties |
|
11.18.1 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.18.2 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.18.3 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 |
|