axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chamikara Jayalath" <chamikar...@gmail.com>
Subject Re: [Axis2] stopping the ListenerManager in Async InOut invocations
Date Wed, 18 Oct 2006 03:37:20 GMT
Hi,

Agree.
But in this scenario the starting of the listner is not done by the client.
It's done by Axis2 transparently. But the client has to stop it. Looks a bit
confusing.

Is it possible for a ServiceClient object to remember weather the listner
was started by it. If so I guess it can stop it in the 'cleanup' method. But
if the listner was started by the client the 'cleanup' method should not try
to stop it.

Chamikara


On 10/17/06, Sanjiva Weerawarana <sanjiva@opensource.lk> wrote:
>
> On Tue, 2006-10-17 at 10:24 +0530, Chamikara Jayalath wrote:
> > Hi All,
> >
> > Currently according to the way ServiceClient.cleanup() method hs been
> > written, it seems to be stopping the listner only if the
> > ConfigurationContext was not passed by the the user. So if the
> > ConfigurationContext was passed by the user he has to write
> > his code as follows
> >
> > <code>
> >
> > ConfigurationContext configContext =
> > ConfigurationContextFactory.createConfigurationContextFromFileSystem();
> > ServiceClient serviceClient = new ServiceClient
> > (configContext,null);
> > //Do the invocation
> > configContext.getListenerManager().stop();
> > serviceClient.cleanup();
> >
> > </code>
> >
> > If line 4 was not included to stop the listner, the client hangs.
> > Is this the expected behaviour, or should we do a change in the
> > 'cleanup' method to stop the listner in all the scenarios ?
>
> Hmmm. The problem is that there can be many servic clients running off
> the same config context - as such you can't clean the world when a
> single service client is done.
>
> I think your lines 4 & 5 should be in the other order .. you clean up
> the service client and then tell configcontext to stop the world.
>
> Not sure I see a sane way around this.
>
> Sanjiva.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Mime
View raw message