Adding State

From GCube System
Revision as of 18:47, 25 March 2008 by Manuele.simi (Talk | contribs) (Multi Port-Type service)

Jump to: navigation, search

Adding State

In the first part of this tutorial we have created a stateless service for simplicity. However, the most common patterns used when developing gCube services are the ones that allow to create stateful service. In this part of the tutorial we see how to add a state to the SampleService.

Multi Port-Type service

To add a state we need firstly to add two new Port-Types to the SampleService:

  1. one is dedicated to create a new stateful resource, the so-called Factory Port-Type
  2. the other one is dedicated to access and manage the state, the so-called Service Port-Type

For both, we need to perform the same steps done for the Stateless Port-Type:

Basic steps

Implementation

Configuring JNDIs & Descriptors

Building & Deploying

A Test Client