I'm trying to setup a JMS endpoint, following the directions from
http://cxf.apache.org/docs/using-the-jmsconfigfeature.html, and am running into
an exception.
Is the information on this page still accurate? I ask because in debugging the
initialization, it appears the exception I get happens way before the
JMSConfigFeature ever has the opportunity to initialize, so I don't think the
page works as advertised. The exception is happening during
Destination.activate, which happens before the
AbstractFeature.initialize(Server, Bus), so the feature never has a chance to
provide the config. Do I need to go with the specially named bean approach
instead to configure the JMS endpoint?
Spring file snippet:
<jaxws:endpoint
id="JMS_prototype"
implementor="expedia.cc.samples.sampleservice.v2.contract.SampleServicePortTypeImpl"
wsdlLocation="com.expedia.cc.samples.sampleservice.v2.contract.wsdl"
address="${url}">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature"/>
<bean class="org.apache.cxf.transport.jms.JMSConfigFeature">
<property name="jmsConfig" ref="jmsConfig" />
</bean>
</jaxws:features>
</jaxws:endpoint>
Wsdl snippet:
<wsdl:service name="SampleService">
<wsdl:port name="SampleServiceJMSSOAPBinding"
binding="tns:SampleServiceSoapBinding">
<jms:address>
</jms:address>
</wsdl:port>
</wsdl:service>
Exception Snippet:
Caused by: javax.xml.ws.WebServiceException:
org.apache.cxf.configuration.ConfigurationException: Insufficient configuration
for Destination. Did you configure a <jms:destination
name="{urn:expedia:cc:samples:sampleservice:v2:contract}SampleServiceJMSSOAPBinding.jms-destination">
and set the jndiConnectionFactoryName ?
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:343)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:489)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 17 more
Caused by: org.apache.cxf.configuration.ConfigurationException: Insufficient
configuration for Destination. Did you configure a <jms:destination
name="{urn:expedia:cc:samples:sampleservice:v2:contract}SampleServiceJMSSOAPBinding.jms-destination">
and set the jndiConnectionFactoryName ?
at
org.apache.cxf.transport.jms.JMSConfiguration.ensureProperlyConfigured(JMSConfiguration.java:105)
at
org.apache.cxf.transport.jms.JMSDestination.activate(JMSDestination.java:110)
at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
at
org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:181)
at
org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:836)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
... 26 more