Hi Ruchith,

thanks very much for the quick response. Please see my comments inline.

Ruchith Fernando wrote:
> Hi Michele,
> 
> You can store the state information as properties of the context
> hierarchy where appropriate.
> 
> To make state available across different client invocations you have
> two options:
> 
> 1.) If it is the same client's requests that you want to maintain
> state you can place the state attributes in service context or service
> group context as required by making the service available application
> scope.
> 
> 2.) If you want to share state across different clients then you will
> have to place state attributes in the configuration context. In this
> case make sure you give unique identifiers as keys.


Service code:

private static ConfigurationContext confCtx;

public void setOperationContext(OperationContext opContext){
        confCtx = opContext.getConfigurationContext();

        handleRequest(getMessageContext(WSDLConstants.MESSAGE_LABEL_IN);        
 (for
example)
}


private static void handleRequest(MessageContext inCtx) {
        confCtx.setProperty(<something>);
        .....
        // eventually confCtx.getProperty(<some_key);
        // process
}


My concern, however, is that this way you don't sort the problem out
since at every client invocation the configuration context is overriden
(it doesn't matter if it's declared as static or not). Am I right?


Thanks,
Michele

> 
> Thanks,
> Ruchith
> 
> On 6/1/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> how can I maintain the service state across different client invocations
>> (other than through  static fields)?
>>
>>
>> Thanks in advance,
>> Michele
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to