Difference between revisions of "Configuration Components"

From GCube System
Jump to: navigation, search
(Configuring the ServiceContext)
(Configuring the ServiceContext)
Line 46: Line 46:
 
The ServiceContext is initialised by a special port-type: the <code>GCUBEStartupPortType</code>. In order to allow the ServiceContext (and then the service) initialisation, gCore requires that a service MUST:
 
The ServiceContext is initialised by a special port-type: the <code>GCUBEStartupPortType</code>. In order to allow the ServiceContext (and then the service) initialisation, gCore requires that a service MUST:
 
* implement one port-type class that extends the <code>GCUBEStartupPortType</code>
 
* implement one port-type class that extends the <code>GCUBEStartupPortType</code>
* that port-type has to be declared with the parameter <code><parameter name="loadOnStartup" value="true"/></code> in the '''deploy-server.wsdd''' file in the etc folder under the service location.  
+
* the related port-type has to be declared with the parameter <code><parameter name="loadOnStartup" value="true"/></code> in the '''deploy-server.wsdd''' file in the etc folder under the service location.  
  
 
gCore recommends that only one port-type extends the <code>GCUBEStartupPortType</code>. If two (or more) port-types extend the GCUBEStartupPortType, you have to be aware that your service context is initialised twice. This is an overhead but not an issue for the gCore initialisation procedure. However, it could be a problem if a service performs specific initialisation actions in the service context events (like the onReady() or onInitialisation() callback methods) that are supposed to be executed only once.
 
gCore recommends that only one port-type extends the <code>GCUBEStartupPortType</code>. If two (or more) port-types extend the GCUBEStartupPortType, you have to be aware that your service context is initialised twice. This is an overhead but not an issue for the gCore initialisation procedure. However, it could be a problem if a service performs specific initialisation actions in the service context events (like the onReady() or onInitialisation() callback methods) that are supposed to be executed only once.
  
 
==== Configuring the Port-Type Context(s) ====
 
==== Configuring the Port-Type Context(s) ====

Revision as of 23:56, 1 June 2008

[coming soon]

Configure What?

[coming soon]

Profiles, JNDIs & Descriptors

[coming soon]

JNDIs

Each context can be configured with a JNDI section automatically loaded by gCore. Following the stack of contexts, we can configure:

  • the GHN Context
  • the Service Context
  • the port-type Context

While the first one is global for each node and its configuration is under the GHN manager responsibility, the others are service-specific and MUST be taken into consideration when developing a new gCore compliant service. Per each service, there are:

  • one and only one ServiceContext
  • several port-type Contexts, depending on the service architecture and needs

Both the Service Context and the port-type Contexts can be configured with a dedicated service element in the file called deploy-jndi-config.xml and placed in the etc folder under the service location.

Configuring the ServiceContext

The ServiceContext models the configuration of the service instance as a whole. The context configuration MUST be placed in the deploy-jndi-config.xml in the etc folder under the service location as a service element. The minimal configuration requires the declaration of the service configuration folder as follows:

<?xml version="1.0" encoding="UTF-8"?>
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
	<service name="acme/sample">
		<environment 
		name="configDir" 
	 	value="@config.dir@" 
	 	type="java.lang.String"
	 	override="false" />
	</service>
</jndiConfig>

The name assigned to the service element MUST be returned by the getJNDIName() method of the class extending the GCUBEServiceContext. The @config.dir@ is a placeholder replaced by the Axis facilities at deployment time with etc folder under the target service location. Other optional parameters of the service configuration managed by gCore are:

  • securityManagerClass: configure the security manager for the service
  • ...
  • ...

In addition, service-specific parameters can be added as needed. In this case, they can be read with the method getProperty(String name) exposed by the class extending the GCUBEServiceContext

The ServiceContext is initialised by a special port-type: the GCUBEStartupPortType. In order to allow the ServiceContext (and then the service) initialisation, gCore requires that a service MUST:

  • implement one port-type class that extends the GCUBEStartupPortType
  • the related port-type has to be declared with the parameter <parameter name="loadOnStartup" value="true"/> in the deploy-server.wsdd file in the etc folder under the service location.

gCore recommends that only one port-type extends the GCUBEStartupPortType. If two (or more) port-types extend the GCUBEStartupPortType, you have to be aware that your service context is initialised twice. This is an overhead but not an issue for the gCore initialisation procedure. However, it could be a problem if a service performs specific initialisation actions in the service context events (like the onReady() or onInitialisation() callback methods) that are supposed to be executed only once.

Configuring the Port-Type Context(s)