Sounds like a good idea +1



John Hawkins




Samisa Abeysinghe <[EMAIL PROTECTED]>

25/01/2005 07:59

Please respond to
"Apache AXIS C Developers List"

To
Apache AXIS C Developers List <axis-c-dev@ws.apache.org>
cc
Subject
ChannelFactory::LoadChannelLibrary is called for each method call on Stub





Hi,
   It looks to me that the above mentioned method is called for each
method invocation.
   This is because we have
m_pTransport->setTransportProperty( CHANNEL_HTTP_DLL_NAME,
pcChannelHTTPLibraryPath);

inside Call::openConnection() and this is called by Call::initialize()
which is always called when a method is invoked.

   The code works OK, but the problem is in case of performance.
1. A Channel object is created for every method invocation
2. Because of 1 above, we always have to create a new connection
3. 2 above violates Connection-keep-alive in HTTP/1.1

In axis2 transport, we had the featurer, where the connection to
service is re-established iff the URL changes, thus re-using the same
connection for subsequent invocations in case of HTTP/1.1

Because of the channel loading mechanism, it is a but though to do the
same in case of axis3. But I think if we conditionnaly invoke
m_pTransport->setTransportProperty( CHANNEL_HTTP_DLL_NAME,
pcChannelHTTPLibraryPath); if and only if pcChannelHTTPLibraryPath has
changed, then we could increase the efficancy.
Using something like:
if( !strcmp(pcChannelHTTPLibraryPath, pcOldChannelHTTPLibraryPath)
{
   m_pTransport->setTransportProperty( CHANNEL_HTTP_DLL_NAME,
pcChannelHTTPLibraryPath);
}

If we change this, the connection related stuff will work as axis2 as
we used the same code here in axis3.
I did not change any code in CVS because I am not sure if the above
would have any side effects or any other related concerns.

Thoughts please.

Thanks,
Samisa...

Reply via email to