JeeWiz Home

 
  
 
Contents  >   7.  GigaSystemBuilder Profile Reference
 


7.24 Service Object

Used on
processingUnit
DescriptionThis defines a GigaSpaces service which is externally callable (from a client PU).

It has a list of business methods that define the functionality of the service.
Contained
Lists
1
Name  action
Type  action
Description  The list of methods and business-methods for this service.

Business methods define the functionality of the service.

The methods are defined so that the generated service objects can have init and destroy methods (which are defined by setting the initMethod and destroyMethod flags on the method object). It also allows non-business methods to be declared (e.g. for heper methods).
Indexed property  name
 
2
Name  annotation
Type  String
Description  An optional list, comma-separated, of Java annotations.

You can put the '@' as the first character on the annotation, but it is not necessary.

You can add the annotation as either

    • an XML element, with the CDATA being the annotation text
    • a property which can contain multiple annotations, comma-separated.
If you use the property form, you cannot add multiple element-pair values as the syntax conflicts with the comma-separation syntax. In other words, annotation="@Annotation(id=27,name='Fred')" will be parsed into two separate annotations, and then inserted into the code as "@Annotation(id=27" and "@name='Fred')", which is incorrect syntax.

Because of this, some modelling environments allow annotations to be added as a property (this is most convenient) and as a list (this allows complex annotations).
Unique  false
 
3
Name  businessMethod
Type  businessMethod
Description  The list of methods and business-methods for this service.

Business methods define the functionality of the service.

The methods are defined so that the generated service objects can have init and destroy methods (which are defined by setting the initMethod and destroyMethod flags on the method object). It also allows non-business methods to be declared (e.g. for heper methods).
Indexed property  name
 
4
Name  implements
Type  String
Description  Specifies the interface(s) which this class implements.
Unique  false
 
5
Name  import
Type  String
Description  List of classes or packages to import. The imports get put into 'import' statements in the *.java files (and could be put in a 'using' statement in C#).

In XML, you can use one or more <import> nested elements as an alternative to the 'import=' property.

See also the import list on the Business Object Model jar, which provides additional facilities.
Unique  false
 
6
Name  method
Type  method
Description  The list of methods and business-methods for this service.

Business methods define the functionality of the service.

The methods are defined so that the generated service objects can have init and destroy methods (which are defined by setting the initMethod and destroyMethod flags on the method object). It also allows non-business methods to be declared (e.g. for heper methods).
Indexed property  name
 
7
Name  typeParameter
Type  typeParameter
Description  A list of type-parameters on the reference-type.

If this is a generic type, then there will be one or more type-parameter's.

In the current implementation,

(a) type-parameters can also be specified via the name, in which case they should be in canonical form ... define. This approach should really be used as a last resort, and trigger a rethink ...! (b) once the canonical name for a reference-type is generated from a list of type-parameters, the type-parameters are ignored (in the current implementation).

Therefore, the implementation is oriented towards patterns that produce type-parameters, and modelled classes (which will then have to generate the type-parameters).
GenerateAllList  false
 
8
Name  spaceHashMap
Type  spaceHashMap
Indexed property  name
 
9
Name  spaceDelayQueue
Type  spaceDelayQueue
Indexed property  name
Inherited
properties
template (base property)

text (base property)

jwpattern (base property)

 7.24.1  Property 'description'
 7.24.2  Property 'name'
 7.24.3  Property 'package'
 7.24.4  Property 'space'

7.24.1  Property 'description'
DescriptionOptional description.

Use this to
  1. document the meaning of a particular item
  2. specify functionality at the design stage for implementation later.
TypeString

7.24.2  Property 'name'
DescriptionSpecifies name of the interface or class. This should be a valid java identifier name and will be used as-is as the interface or class name.
TypeString
Requiredtrue

7.24.3  Property 'package'
Aliasnamespace
DescriptionThis 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.
TypeString

7.24.4  Property 'space'
DescriptionThe space in which this service exists - a service needs to be attached to a space.

If this 'space' property is not specified, then the default is the first space (as listed in the specification) in the parent PU. If you have not modelled any spaces for a PU and you specify one or more services, then a default space will be created for the services to use. The name of this default space is defined in the component.properties - the default is '<PU_name>Space'.
TypeString

Copyright (c) 2001-2009 New Technology/enterprise Ltd.