You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Marc Nädele <ma...@hotmail.com> on 2007/12/03 18:40:53 UTC

[Axis2] Considerations regarding a static RPCServiceClient instance

Hi all,
I have some serious problems (like out-of socket errors) with the RPCServiceClient class when I have a burst of web service calls very fast in a row and create a new RPCServiceClient instance for each call. Normally my application creates series of fast web service calls (to the same web service) in a row like a "burst". Unfortunately because of the system architecture I don't know in my module - which implements the web service request - how many service calls will follow a certain service call. So I can not use the best solution like creating a RPCServiceClient instance when the first call to the web service occurs and "shut down" the RPCServiceClient instance when all requests of this "burst" are done.
 
The only solution I currently have is to use a static RPCServiceClient instance which will be created when the applciation starts and lives until the application is shut down.This solution seems to be OK at the first glance but I am afraid that this will result in some other problems like not freeing ressources or other ugly side-effects.
Does anyone have some hints what I have to consider if I use a "static" RPCServiceClient instance and which options or parameters I should use?
Any help or comment is welcome.
 
Thanks in advance- Marc
_________________________________________________________________
Importieren Sie ganz einfach Ihre E-Mail Adressen in den Messenger!
http://messenger.live.de/community/neuekontakte_adressimport.html

RE: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Pär Malmqvist <pa...@hotmail.com>.
Hi Marc! If you dont feel safe of your implementation or how different resources are used the best thing is to test your webservice at heavy load and for a long time.Make as many calls as you can for a day or even better a couple of days with all kinds of data input.If your applications have not grown in memory usage and still is working as it should then you probably dont have a problem. /Pär > From: marc_1111@hotmail.com> To: axis-user@ws.apache.org> Subject: RE: [Axis2] Considerations regarding a static RPCServiceClient instance> Date: Tue, 4 Dec 2007 07:36:11 +0000> > > Hi Michele,> > the state does not matter. The calls to the service are independent. So the WS implementation on the server does not need to know anything about the state.> > My problem is that the client application produces bursts of independend web service calls to the same web service. The user can load a file where elements are stored. Some of those elements are converted using a web service depending on their type. Because of the system architecture the module which wrapps the RPCServiceClient and which calls the web service can not know how many elements are converted via the web service because the conversion of each element is an independent operation. So until know I create a new RPCServiceClient for every conversion operation. Since there may be up to 5000 elements which must be converted in a row, 5000 instances of RPCServiceClient are created in a short period of time and I run into the described ressource problems with the sockets.> > My concerns are that I keep a living static instance of RPCServiceClient during the whole lifetime of my application which may never close open ressources. So my question is what I have to do when I reuse one instance during the lifetime of the application. Is it important to initialize and close the instance for each call or can I just create and initialize the instance once and then reuse it without using any special method?> > I hope this helps to understand the problem.> > Thanks> - Marc> > > ----------------------------------------> > From: Michele.Mazzucco@ncl.ac.uk> > Subject: Re: [Axis2] Considerations regarding a static RPCServiceClient instance> > Date: Mon, 3 Dec 2007 17:50:38 +0000> > To: axis-user@ws.apache.org> > > > Marc,> > > > have you considered making your WS statefull?, Using a static > > variable to store the state (i.e. your RPCServiceClient) doesn't > > sound a good idea to me.> > About your concerns (i.e. resource usage) can you be more specific?> > > > > > Michele> > > > > > On 3 Dec 2007, at 17:40, Marc Nädele wrote:> > > >> Hi all,> >> I have some serious problems (like out-of socket errors) with the > >> RPCServiceClient class when I have a burst of web service calls > >> very fast in a row and create a new RPCServiceClient instance for > >> each call. Normally my application creates series of fast web > >> service calls (to the same web service) in a row like a "burst". > >> Unfortunately because of the system architecture I don't know in my > >> module - which implements the web service request - how many > >> service calls will follow a certain service call. So I can not use > >> the best solution like creating a RPCServiceClient instance when > >> the first call to the web service occurs and "shut down" the > >> RPCServiceClient instance when all requests of this "burst" are done.> >>> >> The only solution I currently have is to use a static > >> RPCServiceClient instance which will be created when the > >> applciation starts and lives until the application is shut down.> >> This solution seems to be OK at the first glance but I am afraid > >> that this will result in some other problems like not freeing > >> ressources or other ugly side-effects.> >>> >> Does anyone have some hints what I have to consider if I use a > >> "static" RPCServiceClient instance and which options or parameters > >> I should use?> >> Any help or comment is welcome.> >>> >> Thanks in advance> >> - Marc> >>> >> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie > >> neue Blickwinkel!> > > > > > ---------------------------------------------------------------------> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> > For additional commands, e-mail: axis-user-help@ws.apache.org> > > > _________________________________________________________________> Jetzt kostenlos downloaden: 30 Messenger Emoticons!> http://www.messenger-emoticons.de/> ---------------------------------------------------------------------> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> For additional commands, e-mail: axis-user-help@ws.apache.org> 
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE

RE: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Pär Malmqvist <pa...@hotmail.com>.
Hello!
 
I checked the Axis2 source code a couple of weeks ago to see if there would be any difference for my generated client when I use different ways of cleanups. 1. options.setCallTransportCleanup(true)  2. Using any of these methods after each call.stub._getServiceClient().cleanup()
stub._getServiceClient().cleanupTransport()stub.cleanup() For my client I could not see a reason to do anything more than using 1) and everything would cleanup by itself.But this might not be the case for your client, I dont know. /Pär  > From: marc_1111@hotmail.com> To: axis-user@ws.apache.org> Subject: RE: [Axis2] Considerations regarding a static RPCServiceClient instance> Date: Thu, 6 Dec 2007 17:17:51 +0000> > > Hi Michele and Pär,> > Finally my code seems to work with minimum ressource allocation and mutch faster than before. When I create the RPCServiceClient instance I set> > options.setCallTransportCleanup(true);> options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);> > I couldn't find documentation for setCallTransportCleanup, but Pär assumed to use this in an other thread. Can someone explain what it really does?> > Thanks> -Marc> > ----------------------------------------> > From: Michele.Mazzucco@ncl.ac.uk> > Subject: Re: [Axis2] Considerations regarding a static RPCServiceClient instance> > Date: Tue, 4 Dec 2007 09:51:26 +0000> > To: axis-user@ws.apache.org> > > > > > On 4 Dec 2007, at 07:36, Marc Nädele wrote:> > > >>> >> Hi Michele,> >>> >> the state does not matter. The calls to the service are > >> independent. So the WS implementation on the server does not need > >> to know anything about the state.> > > > You didn't get my point. The state is your RPCServiceClient instance > > (you're doing the same using a stateless WS + static variable).> >>> >> My problem is that the client application produces bursts of > >> independend web service calls to the same web service. The user can > >> load a file where elements are stored. Some of those elements are > >> converted using a web service depending on their type. Because of > >> the system architecture the module which wrapps the > >> RPCServiceClient and which calls the web service can not know how > >> many elements are converted via the web service because the > >> conversion of each element is an independent operation. So until > >> know I create a new RPCServiceClient for every conversion > >> operation. Since there may be up to 5000 elements which must be > >> converted in a row, 5000 instances of RPCServiceClient are created > >> in a short period of time and I run into the described ressource > >> problems with the sockets.> >>> >> My concerns are that I keep a living static instance of > >> RPCServiceClient during the whole lifetime of my application which > >> may never close open ressources. So my question is what I have to > >> do when I reuse one instance during the lifetime of the > >> application. Is it important to initialize and close the instance > >> for each call or can I just create and initialize the instance once > >> and then reuse it without using any special method?> > > > Keep using your single instance and clean only when you're done.> >>> >> I hope this helps to understand the problem.> >>> >> Thanks> >> - Marc> >>> > > > > > Michele> >>> >> ----------------------------------------> >>> From: Michele.Mazzucco@ncl.ac.uk> >>> Subject: Re: [Axis2] Considerations regarding a static > >>> RPCServiceClient instance> >>> Date: Mon, 3 Dec 2007 17:50:38 +0000> >>> To: axis-user@ws.apache.org> >>>> >>> Marc,> >>>> >>> have you considered making your WS statefull?, Using a static> >>> variable to store the state (i.e. your RPCServiceClient) doesn't> >>> sound a good idea to me.> >>> About your concerns (i.e. resource usage) can you be more specific?> >>>> >>>> >>> Michele> >>>> >>>> >>> On 3 Dec 2007, at 17:40, Marc Nädele wrote:> >>>> >>>> Hi all,> >>>> I have some serious problems (like out-of socket errors) with the> >>>> RPCServiceClient class when I have a burst of web service calls> >>>> very fast in a row and create a new RPCServiceClient instance for> >>>> each call. Normally my application creates series of fast web> >>>> service calls (to the same web service) in a row like a "burst".> >>>> Unfortunately because of the system architecture I don't know in my> >>>> module - which implements the web service request - how many> >>>> service calls will follow a certain service call. So I can not use> >>>> the best solution like creating a RPCServiceClient instance when> >>>> the first call to the web service occurs and "shut down" the> >>>> RPCServiceClient instance when all requests of this "burst" are > >>>> done.> >>>>> >>>> The only solution I currently have is to use a static> >>>> RPCServiceClient instance which will be created when the> >>>> applciation starts and lives until the application is shut down.> >>>> This solution seems to be OK at the first glance but I am afraid> >>>> that this will result in some other problems like not freeing> >>>> ressources or other ugly side-effects.> >>>>> >>>> Does anyone have some hints what I have to consider if I use a> >>>> "static" RPCServiceClient instance and which options or parameters> >>>> I should use?> >>>> Any help or comment is welcome.> >>>>> >>>> Thanks in advance> >>>> - Marc> >>>>> >>>> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie> >>>> neue Blickwinkel!> >>>> >>>> >>> ---------------------------------------------------------------------> >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> >>> For additional commands, e-mail: axis-user-help@ws.apache.org> >>>> >>> >> _________________________________________________________________> >> Jetzt kostenlos downloaden: 30 Messenger Emoticons!> >> http://www.messenger-emoticons.de/> >> ---------------------------------------------------------------------> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> >> For additional commands, e-mail: axis-user-help@ws.apache.org> >>> > > > > > ---------------------------------------------------------------------> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> > For additional commands, e-mail: axis-user-help@ws.apache.org> > > > _________________________________________________________________> Importieren Sie ganz einfach Ihre E-Mail Adressen in den Messenger!> http://messenger.live.de/community/neuekontakte_adressimport.html> ---------------------------------------------------------------------> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org> For additional commands, e-mail: axis-user-help@ws.apache.org> 
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Re: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
On 6 Dec 2007, at 17:17, Marc Nädele wrote:

> Finally my code seems to work with minimum ressource allocation and  
> mutch faster than before. When I create the RPCServiceClient  
> instance I set
>
> options.setCallTransportCleanup(true);
> options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);

This code is not related to how many ServiceClient objects you  
instantiate -- it simply means that under the wood only one http  
client instance is created.

Michele


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Marc Nädele <ma...@hotmail.com>.
Hi Michele and Pär,

Finally my code seems to work with minimum ressource allocation and mutch faster than before. When I create the RPCServiceClient instance I set

options.setCallTransportCleanup(true);
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);

I couldn't find documentation for setCallTransportCleanup, but Pär assumed to use this in an other thread. Can someone explain what it really does?

Thanks
-Marc

----------------------------------------
> From: Michele.Mazzucco@ncl.ac.uk
> Subject: Re: [Axis2] Considerations regarding a static RPCServiceClient instance
> Date: Tue, 4 Dec 2007 09:51:26 +0000
> To: axis-user@ws.apache.org
> 
> 
> On 4 Dec 2007, at 07:36, Marc Nädele wrote:
> 
>>
>> Hi Michele,
>>
>> the state does not matter. The calls to the service are  
>> independent. So the WS implementation on the server does not need  
>> to know anything about the state.
> 
> You didn't get my point. The state is your RPCServiceClient instance  
> (you're doing the same using a stateless WS + static variable).
>>
>> My problem is that the client application produces bursts of  
>> independend web service calls to the same web service. The user can  
>> load a file where elements are stored. Some of those elements are  
>> converted using a web service depending on their type. Because of  
>> the system architecture the module which wrapps the  
>> RPCServiceClient and which calls the web service can not know how  
>> many elements are converted via the web service because the  
>> conversion of each element is an independent operation. So until  
>> know I create a new RPCServiceClient for every conversion  
>> operation. Since there may be up to 5000 elements which must be  
>> converted in a row, 5000 instances of RPCServiceClient are created  
>> in a short period of time and I run into the described ressource  
>> problems with the sockets.
>>
>> My concerns are that I keep a living static instance of  
>> RPCServiceClient during the whole lifetime of my application which  
>> may never close open ressources. So my question is what I have to  
>> do when I reuse one instance during the lifetime of the  
>> application. Is it important to initialize and close the instance  
>> for each call or can I just create and initialize the instance once  
>> and then reuse it without using any special method?
> 
> Keep using your single instance and clean only when you're done.
>>
>> I hope this helps to understand the problem.
>>
>> Thanks
>> - Marc
>>
> 
> 
> Michele
>>
>> ----------------------------------------
>>> From: Michele.Mazzucco@ncl.ac.uk
>>> Subject: Re: [Axis2] Considerations regarding a static  
>>> RPCServiceClient instance
>>> Date: Mon, 3 Dec 2007 17:50:38 +0000
>>> To: axis-user@ws.apache.org
>>>
>>> Marc,
>>>
>>> have you considered making your WS statefull?, Using a static
>>> variable to store the state (i.e. your RPCServiceClient) doesn't
>>> sound a good idea to me.
>>> About your concerns (i.e. resource usage) can you be more specific?
>>>
>>>
>>> Michele
>>>
>>>
>>> On 3 Dec 2007, at 17:40, Marc Nädele wrote:
>>>
>>>> Hi all,
>>>> I have some serious problems (like out-of socket errors) with the
>>>> RPCServiceClient class when I have a burst of web service calls
>>>> very fast in a row and create a new RPCServiceClient instance for
>>>> each call. Normally my application creates series of fast web
>>>> service calls (to the same web service) in a row like a "burst".
>>>> Unfortunately because of the system architecture I don't know in my
>>>> module - which implements the web service request - how many
>>>> service calls will follow a certain service call. So I can not use
>>>> the best solution like creating a RPCServiceClient instance when
>>>> the first call to the web service occurs and "shut down" the
>>>> RPCServiceClient instance when all requests of this "burst" are  
>>>> done.
>>>>
>>>> The only solution I currently have is to use a static
>>>> RPCServiceClient instance which will be created when the
>>>> applciation starts and lives until the application is shut down.
>>>> This solution seems to be OK at the first glance but I am afraid
>>>> that this will result in some other problems like not freeing
>>>> ressources or other ugly side-effects.
>>>>
>>>> Does anyone have some hints what I have to consider if I use a
>>>> "static" RPCServiceClient instance and which options or parameters
>>>> I should use?
>>>> Any help or comment is welcome.
>>>>
>>>> Thanks in advance
>>>> - Marc
>>>>
>>>> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie
>>>> neue Blickwinkel!
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>
>> _________________________________________________________________
>> Jetzt kostenlos downloaden: 30 Messenger Emoticons!
>> http://www.messenger-emoticons.de/
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
Importieren Sie ganz einfach Ihre E-Mail Adressen in den Messenger!
http://messenger.live.de/community/neuekontakte_adressimport.html
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
On 4 Dec 2007, at 07:36, Marc Nädele wrote:

>
> Hi Michele,
>
> the state does not matter. The calls to the service are  
> independent. So the WS implementation on the server does not need  
> to know anything about the state.

You didn't get my point. The state is your RPCServiceClient instance  
(you're doing the same using a stateless WS + static variable).
>
> My problem is that the client application produces bursts of  
> independend web service calls to the same web service. The user can  
> load a file where elements are stored. Some of those elements are  
> converted using a web service depending on their type. Because of  
> the system architecture the module which wrapps the  
> RPCServiceClient and which calls the web service can not know how  
> many elements are converted via the web service because the  
> conversion of each element is an independent operation. So until  
> know I create a new RPCServiceClient for every conversion  
> operation. Since there may be up to 5000 elements which must be  
> converted in a row, 5000 instances of RPCServiceClient are created  
> in a short period of time and I run into the described ressource  
> problems with the sockets.
>
> My concerns are that I keep a living static instance of  
> RPCServiceClient during the whole lifetime of my application which  
> may never close open ressources. So my question is what I have to  
> do when I reuse one instance during the lifetime of the  
> application. Is it important to initialize and close the instance  
> for each call or can I just create and initialize the instance once  
> and then reuse it without using any special method?

Keep using your single instance and clean only when you're done.
>
> I hope this helps to understand the problem.
>
> Thanks
> - Marc
>


Michele
>
> ----------------------------------------
>> From: Michele.Mazzucco@ncl.ac.uk
>> Subject: Re: [Axis2] Considerations regarding a static  
>> RPCServiceClient instance
>> Date: Mon, 3 Dec 2007 17:50:38 +0000
>> To: axis-user@ws.apache.org
>>
>> Marc,
>>
>> have you considered making your WS statefull?, Using a static
>> variable to store the state (i.e. your RPCServiceClient) doesn't
>> sound a good idea to me.
>> About your concerns (i.e. resource usage) can you be more specific?
>>
>>
>> Michele
>>
>>
>> On 3 Dec 2007, at 17:40, Marc Nädele wrote:
>>
>>> Hi all,
>>> I have some serious problems (like out-of socket errors) with the
>>> RPCServiceClient class when I have a burst of web service calls
>>> very fast in a row and create a new RPCServiceClient instance for
>>> each call. Normally my application creates series of fast web
>>> service calls (to the same web service) in a row like a "burst".
>>> Unfortunately because of the system architecture I don't know in my
>>> module - which implements the web service request - how many
>>> service calls will follow a certain service call. So I can not use
>>> the best solution like creating a RPCServiceClient instance when
>>> the first call to the web service occurs and "shut down" the
>>> RPCServiceClient instance when all requests of this "burst" are  
>>> done.
>>>
>>> The only solution I currently have is to use a static
>>> RPCServiceClient instance which will be created when the
>>> applciation starts and lives until the application is shut down.
>>> This solution seems to be OK at the first glance but I am afraid
>>> that this will result in some other problems like not freeing
>>> ressources or other ugly side-effects.
>>>
>>> Does anyone have some hints what I have to consider if I use a
>>> "static" RPCServiceClient instance and which options or parameters
>>> I should use?
>>> Any help or comment is welcome.
>>>
>>> Thanks in advance
>>> - Marc
>>>
>>> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie
>>> neue Blickwinkel!
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
> _________________________________________________________________
> Jetzt kostenlos downloaden: 30 Messenger Emoticons!
> http://www.messenger-emoticons.de/
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Marc Nädele <ma...@hotmail.com>.
Hi Michele,

the state does not matter. The calls to the service are independent. So the WS implementation on the server does not need to know anything about the state.

My problem is that the client application produces bursts of independend web service calls to the same web service. The user can load a file where elements are stored. Some of those elements are converted using a web service depending on their type. Because of the system architecture the module which wrapps the RPCServiceClient and which calls the web service can not know how many elements are converted via the web service because the conversion of each element is an independent operation. So until know I create a new RPCServiceClient for every conversion operation. Since there may be up to 5000 elements which must be converted in a row, 5000 instances of RPCServiceClient are created in a short period of time and I run into the described ressource problems with the sockets.

My concerns are that I keep a living static instance of RPCServiceClient during the whole lifetime of my application which may never close open ressources. So my question is what I have to do when I reuse one instance during the lifetime of the application. Is it important to initialize and close the instance for each call or can I just create and initialize the instance once and then reuse it without using any special method?

I hope this helps to understand the problem.

Thanks
- Marc


----------------------------------------
> From: Michele.Mazzucco@ncl.ac.uk
> Subject: Re: [Axis2] Considerations regarding a static RPCServiceClient instance
> Date: Mon, 3 Dec 2007 17:50:38 +0000
> To: axis-user@ws.apache.org
> 
> Marc,
> 
> have you considered making your WS statefull?, Using a static  
> variable to store the state (i.e. your RPCServiceClient) doesn't  
> sound a good idea to me.
> About your concerns (i.e. resource usage) can you be more specific?
> 
> 
> Michele
> 
> 
> On 3 Dec 2007, at 17:40, Marc Nädele wrote:
> 
>> Hi all,
>> I have some serious problems (like out-of socket errors) with the  
>> RPCServiceClient class when I have a burst of web service calls  
>> very fast in a row and create a new RPCServiceClient instance for  
>> each call. Normally my application creates series of fast web  
>> service calls (to the same web service) in a row like a "burst".  
>> Unfortunately because of the system architecture I don't know in my  
>> module - which implements the web service request - how many  
>> service calls will follow a certain service call. So I can not use  
>> the best solution like creating a RPCServiceClient instance when  
>> the first call to the web service occurs and "shut down" the  
>> RPCServiceClient instance when all requests of this "burst" are done.
>>
>> The only solution I currently have is to use a static  
>> RPCServiceClient instance which will be created when the  
>> applciation starts and lives until the application is shut down.
>> This solution seems to be OK at the first glance but I am afraid  
>> that this will result in some other problems like not freeing  
>> ressources or other ugly side-effects.
>>
>> Does anyone have some hints what I have to consider if I use a  
>> "static" RPCServiceClient instance and which options or parameters  
>> I should use?
>> Any help or comment is welcome.
>>
>> Thanks in advance
>> - Marc
>>
>> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie  
>> neue Blickwinkel!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
Jetzt kostenlos downloaden: 30 Messenger Emoticons!
http://www.messenger-emoticons.de/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Considerations regarding a static RPCServiceClient instance

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Marc,

have you considered making your WS statefull?, Using a static  
variable to store the state (i.e. your RPCServiceClient) doesn't  
sound a good idea to me.
About your concerns (i.e. resource usage) can you be more specific?


Michele


On 3 Dec 2007, at 17:40, Marc Nädele wrote:

> Hi all,
> I have some serious problems (like out-of socket errors) with the  
> RPCServiceClient class when I have a burst of web service calls  
> very fast in a row and create a new RPCServiceClient instance for  
> each call. Normally my application creates series of fast web  
> service calls (to the same web service) in a row like a "burst".  
> Unfortunately because of the system architecture I don't know in my  
> module - which implements the web service request - how many  
> service calls will follow a certain service call. So I can not use  
> the best solution like creating a RPCServiceClient instance when  
> the first call to the web service occurs and "shut down" the  
> RPCServiceClient instance when all requests of this "burst" are done.
>
> The only solution I currently have is to use a static  
> RPCServiceClient instance which will be created when the  
> applciation starts and lives until the application is shut down.
> This solution seems to be OK at the first glance but I am afraid  
> that this will result in some other problems like not freeing  
> ressources or other ugly side-effects.
>
> Does anyone have some hints what I have to consider if I use a  
> "static" RPCServiceClient instance and which options or parameters  
> I should use?
> Any help or comment is welcome.
>
> Thanks in advance
> - Marc
>
> Mit Live Search: Ihre Stadt in der Vogelperspektive! Erleben Sie  
> neue Blickwinkel!


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org