axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] [Moved] (AXIS2-5534) Caching InitialContexts in JMS transport sender
Date Fri, 10 May 2013 10:49:17 GMT


Andreas Veithen moved TRANSPORTS-12 to AXIS2-5534:

    Component/s:     (was: JMS)
            Key: AXIS2-5534  (was: TRANSPORTS-12)
        Project: Axis2  (was: Axis2 Transports)
> Caching InitialContexts in JMS transport sender
> -----------------------------------------------
>                 Key: AXIS2-5534
>                 URL:
>             Project: Axis2
>          Issue Type: Improvement
>          Components: JMS
>            Reporter: Rajika Kumarasiri
>              Labels: JMS, transport
>         Attachments: AXIS2-4658.patch, AXIS2-4658.patch
> When using the JMS transport sender for sending messages  to external broker it creates
InitialContext per message. This is actually unnecessary since we can cache and use the same
intialContext., and also some brokers behave strangely when re-creating the initialContext.
This patch cache the InitalContext using the EPR as the key. User can specify to use caching
using the property "transport.jms.CacheInitialContext" set to true. Synchronization has done
as required since creating InitialContext is not thread safe and also JNDI look up. 
> User has to define an Initial Context definition in the JMSTransport sender configuration
as follows. 
> <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
>         <parameter name="default" locked="false">
>         	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
>         	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
>         	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
> 		<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
> 		<parameter name="transport.jms.CacheLevel">producer</parameter>
>                 <parameter name="transport.jms.CacheInitialContext">true</parameter>
>         </parameter>
> </transportSender> 
> A related discusstions also can be found here:
> Some of the improvements in this patch was suggested by Paul Inglis who also submitted
the patch for issue - 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message