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 Falk Bauer <fa...@gmx.de> on 2006/09/12 00:32:04 UTC

[Axis2] Question about Behaviour of DeploymentEngine

I have a question about the behaviour of the DeploymentEngine of Axis2
in my environment.
Maybe someone of you know a hint or answer for it.

I have a Client-Application with Axis2 on one side and an instantiated
SimpleHTTPServer at the other.
The server got two services (LocalMonitor and ServiceManager) and two
modules (addressing and rampart).

For Round-Trip-Time Tests, the client calls a web service method at the
server five times with a delay of 2 seconds between each call.

With every call of the client the DeploymentEngine deploys the two
services and modules at server side. This causes a delay of nearly a
half of a second.
Here is an output of log4java out of the workflow from each client-call
to the server:

2006-09-11 19:42:54,656 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 0)
2006-09-11 19:42:55,265 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
2006-09-11 19:42:55,281 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
2006-09-11 19:42:55,359 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
2006-09-11 19:42:55,406 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
2006-09-11 19:42:55,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 1156 ms (Loop 0).
2006-09-11 19:42:56,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 1)
2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
2006-09-11 19:42:57,265 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
2006-09-11 19:42:57,296 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
2006-09-11 19:42:57,390 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 578 ms (Loop 1).

...

And a little more verbosity:

2006-09-11 19:44:42,296 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler InstanceDispatcher added to Phase Dispatch
2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing

...

2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler SecurityOutHandler added to Phase MessageOut
2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar

...

http://ws.apache.org/axis2/LocalMonitorPortType/thread_has_started_lib_callResponse
2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar


The deployment is the same if the SimpleHTTPServer is substituted with
the axis2-servlet in a tomcat-server.

Does anyone know how this behaviour can be prevented? The server should
deploy the services and modules only at server-start, not at each call.
Maybe in a way of reconfiguring the axis2.xml or services.xml?

Thanks
Falk

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


Re: [Axis2] Question about Behaviour of DeploymentEngine

Posted by Davanum Srinivas <da...@gmail.com>.
This behavior definitely does not sound right. Please log a bug with more logs.

thanks,
dims

On 9/11/06, Falk Bauer <fa...@gmx.de> wrote:
> I have a question about the behaviour of the DeploymentEngine of Axis2
> in my environment.
> Maybe someone of you know a hint or answer for it.
>
> I have a Client-Application with Axis2 on one side and an instantiated
> SimpleHTTPServer at the other.
> The server got two services (LocalMonitor and ServiceManager) and two
> modules (addressing and rampart).
>
> For Round-Trip-Time Tests, the client calls a web service method at the
> server five times with a delay of 2 seconds between each call.
>
> With every call of the client the DeploymentEngine deploys the two
> services and modules at server side. This causes a delay of nearly a
> half of a second.
> Here is an output of log4java out of the workflow from each client-call
> to the server:
>
> 2006-09-11 19:42:54,656 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 0)
> 2006-09-11 19:42:55,265 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
> 2006-09-11 19:42:55,281 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
> 2006-09-11 19:42:55,359 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
> 2006-09-11 19:42:55,406 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
> 2006-09-11 19:42:55,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 1156 ms (Loop 0).
> 2006-09-11 19:42:56,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 1)
> 2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
> 2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
> 2006-09-11 19:42:57,265 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
> 2006-09-11 19:42:57,296 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
> 2006-09-11 19:42:57,390 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 578 ms (Loop 1).
>
> ...
>
> And a little more verbosity:
>
> 2006-09-11 19:44:42,296 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler InstanceDispatcher added to Phase Dispatch
> 2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
> 2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
> 2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
> 2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
> 2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
> 2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
> 2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
> 2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
>
> ...
>
> 2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler SecurityOutHandler added to Phase MessageOut
> 2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
> 2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
>
> ...
>
> http://ws.apache.org/axis2/LocalMonitorPortType/thread_has_started_lib_callResponse
> 2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
> 2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
>
>
> The deployment is the same if the SimpleHTTPServer is substituted with
> the axis2-servlet in a tomcat-server.
>
> Does anyone know how this behaviour can be prevented? The server should
> deploy the services and modules only at server-start, not at each call.
> Maybe in a way of reconfiguring the axis2.xml or services.xml?
>
> Thanks
> Falk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: [Axis2] Question about Behaviour of DeploymentEngine

Posted by Falk Bauer <fa...@gmx.de>.
Hi Deepal,

i'm not sure i completely understand your question, but let me try :-)

The ServiceManager forwards messages, send from a client, to the
LocalMonitor and sends the response back to the client. The Client,
ServiceManager and LocalMonitor must not necessarily run on the same
machine but in a LAN. The goal is to recognize the limits of Axis2 (and
also of Axis1) with certain configurations (signing, encryption or both
for example).

The ServiceManager uses a stub for the LocalMonitor to forward the
client-messages. With your hints the stub has been refactored to a
class-field and will be instantiated when the first invocations comes
from a client. Additionally the scope of the ServiceManager has been set
to "application".
So i think the Web Service ServiceManager uses the same ServiceClient
for all service invocations of the client. But there is no way, that the
ServiceManager and the Client uses the same ServiceClient-instantiation.

Hopes, this is the answer you asked for. Otherwise tell me.

Bye
Falk

Deepal Jayasinghe wrote:
> Hi Falk;
> Is there any possibility of creating one service client and use that for
> all the service invocations.
>
> Thanks
> Deepal
>
> Falk Bauer wrote:
>
>   
>>>>> Well you can have this behavior in the client side , ...
>>>>>        
>>>>>
>>>>>           
>> That was it. My code produces new ServiceClients at server-side and so the deployment happens in every new call of the client.
>>
>> Some more explanations:
>>
>> The Round-Trip-Time Tests send a message the following way:
>> Client->ServiceManager->LocalMonitor->ServiceManager->Client
>>
>> So in the ServiceManagerSkeleton-class there is an instantiation of a stub for the LocalMonitor. Here were two issues responsible for the repeated deployment:
>>
>> 1. The stub was instantiated in a method-local object. So the deployment happens each time of the instantiation of the stub.
>> Refactoring this method-local object to a class-field corrects this point.
>>
>> 2. I have forgotten the attribute scope="application" for some services.xml.
>>
>>
>> So the SimpleHTTPServer works absolutely right. It was solely my fault.
>>
>> Many many thanks to both of you. Your mails were greatly helpfull!
>> By the way, the round-trip-times alleviates from 700ms to 20ms ;-)
>>
>>
>>     

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


Re: [Axis2] Question about Behaviour of DeploymentEngine

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Falk;
Is there any possibility of creating one service client and use that for
all the service invocations.

Thanks
Deepal

Falk Bauer wrote:

>>>>Well you can have this behavior in the client side , ...
>>>>        
>>>>
>
>
>That was it. My code produces new ServiceClients at server-side and so the deployment happens in every new call of the client.
>
>Some more explanations:
>
>The Round-Trip-Time Tests send a message the following way:
>Client->ServiceManager->LocalMonitor->ServiceManager->Client
>
>So in the ServiceManagerSkeleton-class there is an instantiation of a stub for the LocalMonitor. Here were two issues responsible for the repeated deployment:
>
>1. The stub was instantiated in a method-local object. So the deployment happens each time of the instantiation of the stub.
>Refactoring this method-local object to a class-field corrects this point.
>
>2. I have forgotten the attribute scope="application" for some services.xml.
>
>
>So the SimpleHTTPServer works absolutely right. It was solely my fault.
>
>Many many thanks to both of you. Your mails were greatly helpfull!
>By the way, the round-trip-times alleviates from 700ms to 20ms ;-)
>
>
>
>Deepal Jayasinghe wrote:
>  
>
>>Hi Fal;
>>
>>I tested this with both SimpleHTTPServer and Axis2 war distribution and
>>I was unable to find such a behavior. Well you can have this behavior in
>>the client side , if you are trying to create new service client for
>>each request.
>>Any way please create JIRA attaching both client and server side code.
>>
>>  
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



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


Re: [Axis2] Question about Behaviour of DeploymentEngine

Posted by Falk Bauer <fa...@gmx.de>.
>>>Well you can have this behavior in the client side , ...


That was it. My code produces new ServiceClients at server-side and so the deployment happens in every new call of the client.

Some more explanations:

The Round-Trip-Time Tests send a message the following way:
Client->ServiceManager->LocalMonitor->ServiceManager->Client

So in the ServiceManagerSkeleton-class there is an instantiation of a stub for the LocalMonitor. Here were two issues responsible for the repeated deployment:

1. The stub was instantiated in a method-local object. So the deployment happens each time of the instantiation of the stub.
Refactoring this method-local object to a class-field corrects this point.

2. I have forgotten the attribute scope="application" for some services.xml.


So the SimpleHTTPServer works absolutely right. It was solely my fault.

Many many thanks to both of you. Your mails were greatly helpfull!
By the way, the round-trip-times alleviates from 700ms to 20ms ;-)



Deepal Jayasinghe wrote:
> Hi Fal;
>
> I tested this with both SimpleHTTPServer and Axis2 war distribution and
> I was unable to find such a behavior. Well you can have this behavior in
> the client side , if you are trying to create new service client for
> each request.
> Any way please create JIRA attaching both client and server side code.
>
>   

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


Re: [Axis2] Question about Behaviour of DeploymentEngine

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Fal;

I tested this with both SimpleHTTPServer and Axis2 war distribution and
I was unable to find such a behavior. Well you can have this behavior in
the client side , if you are trying to create new service client for
each request.
Any way please create JIRA attaching both client and server side code.

Falk Bauer wrote:

>I have a question about the behaviour of the DeploymentEngine of Axis2
>in my environment.
>Maybe someone of you know a hint or answer for it.
>
>I have a Client-Application with Axis2 on one side and an instantiated
>SimpleHTTPServer at the other.
>The server got two services (LocalMonitor and ServiceManager) and two
>modules (addressing and rampart).
>
>For Round-Trip-Time Tests, the client calls a web service method at the
>server five times with a delay of 2 seconds between each call.
>
>With every call of the client the DeploymentEngine deploys the two
>services and modules at server side. This causes a delay of nearly a
>half of a second.
>Here is an output of log4java out of the workflow from each client-call
>to the server:
>
>2006-09-11 19:42:54,656 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 0)
>2006-09-11 19:42:55,265 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
>2006-09-11 19:42:55,281 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
>2006-09-11 19:42:55,359 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
>2006-09-11 19:42:55,406 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
>2006-09-11 19:42:55,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 1156 ms (Loop 0).
>2006-09-11 19:42:56,812 [main] de.siegen.bs.omis.clients.Test_RTT0  - Start Test RTT0 (Loop 1)
>2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
>2006-09-11 19:42:57,203 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
>2006-09-11 19:42:57,265 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
>2006-09-11 19:42:57,296 [HttpConnection-6060-3] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
>2006-09-11 19:42:57,390 [main] de.siegen.bs.omis.clients.Test_RTT0  - End Test after 578 ms (Loop 1).
>
>...
>
>And a little more verbosity:
>
>2006-09-11 19:44:42,296 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler InstanceDispatcher added to Phase Dispatch
>2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
>2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
>2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
>2006-09-11 19:44:42,484 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : rampart
>2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(addingnewmodule)
>2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - adding new module
>2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployeingmodule)
>2006-09-11 19:44:42,515 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying module : addressing
>
>...
>
>2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.engine.Phase  - Handler SecurityOutHandler added to Phase MessageOut
>2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
>2006-09-11 19:44:42,562 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  ServiceManager.aar
>
>...
>
>http://ws.apache.org/axis2/LocalMonitorPortType/thread_has_started_lib_callResponse
>2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.i18n.ProjectResourceBundle  - org.apache.axis2.i18n.resource::handleGetObject(deployingws)
>2006-09-11 19:44:42,593 [HttpConnection-6060-1] org.apache.axis2.deployment.DeploymentEngine  - Deploying Web service  LocalMonitor.aar
>
>
>The deployment is the same if the SimpleHTTPServer is substituted with
>the axis2-servlet in a tomcat-server.
>
>Does anyone know how this behaviour can be prevented? The server should
>deploy the services and modules only at server-start, not at each call.
>Maybe in a way of reconfiguring the axis2.xml or services.xml?
>
>Thanks
>Falk
>
>---------------------------------------------------------------------
>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