• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invoking webservice with axis HttpConnection pool

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently, I'm using org.apache.axis.client.Call to invoke a web service. I don't believe Call using connection pool internally. Since apache does has MultithreadedHttpConnectionManagerIs there a way to config axis client, so it will create, maintain, and get Httpconnection from connection pool?
[ March 22, 2007: Message edited by: vu lee ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not aware that there is a way to do this, but I'm fairly certain that it wouldn't make a big difference. HTTP connections (in contrast to JDBC connection) are not kept open -I don't think HTTP keep-alive applies to this situation-, so the savings you get by using a pool is mainly the object instantiation. That used to be a costly operation, but JVMs have gotten much better at it. At any rate, in most if not all circumstances the time needed for instantiation pales in comparison to the time used for making the actual network connection, so I wouldn't think that this is worthwhile persuing.
 
vu lee
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your quick response Ulf Dittmer.
I'm thinking if it is not worth, then why apache put some effort to create such HttpConnection pool (http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP).

In my case, we have internal web services which being called multiple times. By reusing connection, instead of creating and destroying it on every single web service invocation, I could gain performance and efficiency in resource management.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you found your answer.

I could gain performance and efficiency in resource management.



Now that you know how to do it, it should be easy to find out whether that's the case.
 
vu lee
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Since apache does has MultithreadedHttpConnectionManager, Is there a way to config axis client, so it will create, maintain, and get Httpconnection from connection pool?



To do it myself, I'll need to change several components. I'm asking for an better way-- changing the configuration --, so I don't need to maintain additional code.
 
vu lee
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
found it. Just overwrite the max connection property in AxisDefault.properties file.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi vu lee,

Could you please specify how did you made code changes and did that worked ?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic