Hmm... doesn't look like there is a way to do it right now.   I'll see what I 
can do with it tomorrow.   I THINK we can delay the creation of the 
ConnectionFactory until the first call to getConnectionFactory.    Instead, 
store the JndiTemplate (which has the properties environment in it that you 
could edit) on the JMSConfiguration and then create on demand.

Dan



On Wednesday 28 January 2009 2:30:49 am Hartmut Lang wrote:
> Did not receive any answer so far.
> Maybe I should ask the question in another way.
>
> In our application we want to programmatically set the URL of the
> ActiveMQ broker that is used be our web-services over JMS e.g. overwrite
> the value given in the cxf.xml
>
> Up to the fix in CXF_1806 we could do that: create an unstarted
> endpoint, overwrite the JMSNamingproperty "java.naming.provider.url",
> start the endpoint.
> After the fix CXF_1806 was introduced this does not work any more.
> Of course we can also create and unstarted endpoint and overwrite the
> "java.naming.provider.url" in the JndiTemplate. But this has no effect,
> since the ActiveMQConnectionFactory is already created with the
> properties out of the cxf.xml file when the endpoint is instantiated.
>
> In the code it looks like that in
> JMSOldConfigHolder.getConnectionFactoryFromJndi() the ConnectionFactory
> is created and initialised from the JndiTemplate.
> So if I change the JndiTemplate later (change the provider.url property)
> there should be a way to reinitialise the ConnectionFactory.
> So far I could not find out how to do this.
>
>
> Thanks for any help,
> Hartmut
>
> -----Original Message-----
> Hi,
>
>
>
> We have this Problem since the changes for CXF_1806 were introduced in
> 2.0.x cxf:
>
>
> https://issues.apache.org/jira/browse/CXF-1806 "Use Spring JMSTemplate
> in JMSConduit instead of direct JMS"
>
>
> What we try to do is that we create an "unstarted" endpoint (conduit or
> destination) and overwrite during runtime the default
> "java.naming.provider.url" that was given in the cxf.xml file.
>
>
> It is possible to update the value of the java.naming.provider.url
> property. But it seems that the JMSConnection was already created and
> the changed property has no effect.
>
>
> Hope someone can help.
>
> Here part of our cxf.xml
>
>
>
>         <jms:address destinationStyle="queue"
>
>             jndiConnectionFactoryName="ConnectionFactory"
>
>             jndiDestinationName="dynamicQueues/ResourceProvisioning"
>
>             connectionUserName="soiuser" connectionPassword="soipasswd">
>
>             <jms:JMSNamingProperty name="java.naming.factory.initial"
>
>
> value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" />
>
>             <jms:JMSNamingProperty name="java.naming.provider.url"
>
>                 value="tcp://localhost:61616" />
>
>         </jms:address>
>
>
>
>
>
> Regards,
>
> Hartmut Lang



-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to