According to the following thread:

http://www.mail-archive.com/[email protected]/msg44983.html

If calling a WSDL2Java generated client stub within a multithreaded framework 
such as a Struts servlet, the recommended approach is to create a new client 
stub per thread but have a cached or singleton ConfigurationContext since this 
is an expensive object to recreate every time.

My question is if the transport for the client is JMS and there is a known 
Request Queue and Response Queue for which connections come from the same 
ConnectionFactory.  Will the ConnectionFactory, sendDestination and 
receiveDestination be cached in the ConfigurationContext at all (it is unclear 
from the documentation what happens in Axis2 when jms is used as the transport 
for the client instead of the server, but from my inspection of the Axis2 src 
it does not appear that jms objects are cached for the clients) ?

I plan to instantiate a new client stub for every new thread and pass in a 
ConfigurationContext.  I would like to avoid a jndi lookup of the jms 
ConnectionFactory as well as the send and receive destinations since a remote 
jndi lookup is expensive.

What is the best approach to implement this ?

Andreas, thank you for showing me where to find the transports jar, I did not 
realize in Axis2 version 1.5.x it was moved to a separate jar.

Thanks in advance,
-Niroop

Reply via email to