cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Looking for JMSConfigFeature example with JNDI
Date Fri, 24 Apr 2009 06:12:53 GMT
Hi Marcel,

you are on the right track for the connection factory. Your bean should 
be correct. Now you simply inject it into the JmsConfiguration like in 
the example on the web.
For the queues you have to do the configuration a little different. You 
simply set the jndi names of the queues in the JmsConfiguration.
Then you create a JndiDestinationResolver like below and set it in the 
JmsConfiguration. So the system knows it should use Jndi to lookup 
names. I have not done this recently so I hope the information is 
correct. Could you check if this works and then send me the relevant 
parts of your spring context. I will then update the website.

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">com.ibm.webspher 
e.naming.WsnInitialContextFactory</prop>
<prop key="java.naming.provider.url">iiop://localhost:26017</prop>
</props>
</property>
</bean>

<bean id="jmsDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver">
<property name="jndiTemplate">
<ref bean="jndiTemplate"/>
</property>
</bean>

Greetings

Christian

Heemskerk, Marcel (M.) schrieb:
> In my JNDI provider I've configured my MQ conn factory and queues and
> referenced these in my Spring config: 
>
>       <bean id="queueConnectionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
> 		<property name="jndiName"
> value="java:comp/env/jms/MyQCF" />
> 	</bean>      
>
> 	<bean id="requestQueue"
> class="org.springframework.jndi.JndiObjectFactoryBean">
> 		<property name="jndiName"
> value="java:comp/env/jms/MyQRequest" />
> 	</bean>      
>
> 	<bean id="responseQueue"
> class="org.springframework.jndi.JndiObjectFactoryBean">
> 		<property name="jndiName"
> value="java:comp/env/jms/MyQResponse" />
> 	</bean>      
>
>
> This works fine, I'm able to inject these into a test class. How do I
> use JMSConfigFeature to use these JNDI references to add as
> <jaxws:features> to a <jaxws:endpoint> ?
> http://cwiki.apache.org/CXF20DOC/using-the-jmsconfigfeature.html  did
> not help me further. Do i need to make a JNDIConfiguration? 
> (The service impl is generated using JAXB/wsdl2java and will be used
> both with JMS and HTTP)
>
>
>
> Any examples are much appreciated !
>
>
>
> - Marcel
>
>
>
>
>
>
>
>
>
>   


-- 

Christian Schneider
---
http://www.liquid-reality.de


Mime
View raw message