I am trying to make current Spring application work with Websphere 7 default JMS provider. I have created a Bus and assign a queue with it, also a SIB QueueConnectionFactory, a SIB Queue and a Activation Specification and link it with the SIB queue. I am assured that the message engine started for the application server.
So there is my web.xml to refer the JNDI resource
<!-- Question: should I define Activation Specification here as well as a resource ? -->
<resource-ref>
<description>JNDI JMS Conn Factory </description>
<res-ref-name>jms/ConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>JNDI JMS Queue </description>
<res-ref-name>jms/queue/QueueOrderUpdate</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
The when I start the application, it gives me:
Could not refresh JMS Connection for destination 'ORDER.QUEUE' - retrying in 5000 ms. Cause:
CWSIA0025E: The method setExceptionListener is not permitted in this container.
javax.jms.IllegalStateException: CWSIA0025E: The method setExceptionListener is not permitted
in this container.
ORDER.QUEUE
is what the app refers to the queue from WS:
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="jmsCachingConnectionFactory" />
<!-- same queue as jms/queue/QueueOrderUpdate -->
<property name="defaultDestinationName" value="ORDER.QUEUE" />
<property name="messageConverter" ref="orderMessageConverter"/>
</bean>
and that should be
<!-- I think this should be the queue defined for the bus but not the SIB queue right? -->
<jee:jndi-lookup id="jmsQueue" jndi-name="jms/queue/QueueOrderUpdate">
<jee:environment>
java.naming.provider.url=${java.naming.provider.url}
java.naming.factory.initial=${java.naming.factory.initial}
java.naming.factory.url.pkgs=${java.naming.factory.url.pkgs}
</jee:environment>
</jee:jndi-lookup>
It should be the queue I defined in Websphere:
Here are my questions:
- If the default JMS provider is chosen from Websphere, then by default it should be the JCA compliant JMS implementation and I assume it should use the
Activation Specification
adapter instead of listener ports? - If so, then should I link the Activation Specification JNDI in web.xml and Spring bean config instead of the Connection Factory? so there should be three in web.xml, one for ConnectionFactory, one for Queue and one for Activation Specification?
- Why the exception thrown?
UPDATE:
I find no listener ports bind to current server, please see following screenshot: