Skip to main content

port vs service

1 reply [Last post]
jvalerio
Offline
Joined: 2007-01-24
Points: 0

Hi all,

I am writing a multi-threaded jax-ws client. I initially created a commons pool of portTypes for my service to consume and it uses them effectively. This model falls short because there is no way to validate the portType(that I can figure out anyhow?), to ensue the connection is still valid. Then I started thinking. Where is the connection overhead? Is it on the creation of the service, or on the creation of the portType? If it is on the service, do I have to "close" the portType to close the connection, or just let the gc collect it with the other garbage?

If anyone knows how these two work I would be incredibly grateful for your in-site.

Thanks,

Joe Valerio

Technology and Planning
Yale University

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jvalerio
Offline
Joined: 2007-01-24
Points: 0

I wrote a performance test to benchmark the reuse of a port vs creating a new one each time from a cached service. The results showed that there is little to no difference between the two. The difference after 50K ws requests was more attributable to network traffic than to the difference in the two methods.

I'm abandoning WS connection pooling.

- Joe