axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <>
Subject AW: [Axis2 1.1 RC2]Can't manage session
Date Mon, 27 Nov 2006 10:14:57 GMT
Hi axis2 session-management-team

Can someone from this axis2 team explain me why a first client thread can not 
continue to operate because it's service group id is no longer valid at the server
as soone as the second client starts working? And the second client fails with the
same error "invalid service group ID" as soon as the third client starts.

I need to have 20 clinets running in 20 threads, each shall have it's own session
which must last as long as ths clinets thread exist, talking to 20 instances (objects)
of the same service-class. This service objects must all be state-fule and keep alive
until the client cancels the session. This service objects must be statefull to
keep for the livetime of the session a CORBA IOR or any other unique reference to 
a unique external background process?

Is there documentation about when and how axis2 creates an instance of a object and
relates it to a session?

The example below works with scope=soapsession but as said, it works only as long as 
only one client works, and it dies when the second client stzarts. Therefore I beleave 
there is a bug in AXIS2.


-----Urspr√ľngliche Nachricht-----
Von: Stadelmann Josef []
Gesendet: Mittwoch, 22. November 2006 12:11
Betreff: AW: [Axis2 1.1 RC2]Can't manage session

Hi Sanka, Team

Thanks for your help. I have read
all about axis2 sessionmanagement.

I am running axis2-1.1-snapshot from 25th october

I have read your answers below. And have attched my 
client and server code plus service.xml and axis2.xml from the
client side user repository (used to engage modules).

I toke the RESTClient initially but then realised that for session mgmt
I had to add SOAP Headers, so I changed it until it has become a SOPAClient!

When I EXECUTE the first RESTClient from NetBEans 3.6 then the server returns 
wsa:ReferenceParameter etc. etc. I ionvoke the start method! After the start method
there are consecutive echo messgae sent/received for 1000 loops. 

My client uses the same sender object to invoke and remain in the same session. 
And the dialog goes over because I want to test some several 1000 loops to the 
server and back.

NOTE: the first RESTClient works very well with about 10 to 40 msg/sec.
up to the loop limit of 1000 when it terminates correctly

Running the first RESTClient ....
All works well until I lauch the same RESTClient code in a second thread from
within NetBeans. The second client starts and receives it's wsa:ReferenceParameter.

And then the second client goes on for the same 1000 loops, correctly looping to 
the server and back with data. 

Note: The second client works well with about 10 to 40 msg/sec!

BUT NOW: shortly after the second client is operating, the first client
bails out with an exception.

Invalid Service Group Id urn:uuid:0715218C458CA2825511641843495561

it seams that the old service grouop id is given up/lost and that would
explain that my first client runs into the error above, while the second
continus to work perfectly untill I launch a third client. then the second
dies with the same error and so on.

How can I have two clients each talking to it's real own session-object
I want to have two objects, two instances of the same MyService.class

I really don't know how to do that. Also one can see that when the service
gets started it keeps a start-time-stamp. When a next servie starts then
I would exopect that client no 2 brings a different start-time-stamp back.

But that is never the case. So including the Real RESTClient, I have for sure
only one MyService.class instance and all client threads are requesting from 
the same instanciated service object.

Where can I learn more about AXIS2 session managment? How is that doen?

Any help welcome

-----Urspr√ľngliche Nachricht-----
Von: Sanka Samaranayke []
Gesendet: Mittwoch, 8. November 2006 15:33
Betreff: Re: [Axis2 1.1 RC2]Can't manage session

Hash: SHA1

Takanori Suzuki wrote:
> I try to manage a session, but it is failed.
> I used the pojo sample 'AddressBook' which is in RC2. The entry is
> not keep when I change  as follows:
> Try : SOAP Session
> 1. services.xml <service name="AddressBookService"
> scope="soapsession">
> 2. AddressBookRPCClient Options options =
> serviceClient.getOptions(); options.setManageSession(true);

To enable SOAP sessions, you need to do little more work than that,

a) you need to engage addressing module since the SOAP sessions
are maintained with the aid of <wsa:ReferenceParamenters> addressing

RPCServiceClient serviceClient = new RPCServiceClient(..);
serviceClient.engageModule(new QName("", "addressing-1.1");

b) you need to set the soap:Action for the appropriate methods.

for findEntry()


for addEntry()


c) In this case you need to invoke findEntry(..) as the starting point
you need to get session info from the server when you about to start a
SOAP session.

Therefore you need to invoke the findEntry(..) to start the SOAP session
and then any method in any sequence you want.

> Try : Transport Session
> 1. services.xml <service name="AddressBookService"
> scope="transportsession">
> 2. AddressBookRPCClient Options options =
> serviceClient.getOptions(); options.setManageSession(true);
> 3. axis2.xml <parameter name="manageTransportSession"
> locked="false">true</parameter>
> It failed in both. What's wrong?
> Thanks, Takanori Suzuki
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: For
> additional commands, e-mail:

- --
Sanka Samaranayake
WSO2 Inc.
T:+94-77-3506382 F:+94-11-2424304
Version: GnuPG v1.4.2.1 (GNU/Linux)


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message