Announcement Announcement Module
Collapse
No announcement yet.
Why my configured [JMS Listener from SessionAwareMessageListener ] does not work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why my configured [JMS Listener from SessionAwareMessageListener ] does not work

    I implemented a JMS Listener and configured in the Listener container, and then I configure to [jms:inbound-gateway], but the configured JMS Listened does not work,
    the code as follow:

    Code:
    	<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
    		<property name="connectionFactory" ref="connectionFactory" />
    	</bean>
    	
    	<bean id="myListener" class="com.hbo.controlhub.soa.jms.MyJmsListener"/>
    	
    	<bean id="jmsContainer"   class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    		<property name="connectionFactory" ref="connectionFactory"/>
    		<property name="destination" ref="mindQueueCODX"/>
    		<property name="messageListener" ref="myListener"/>  
    		<property name="messageSelector" value="SERVICE='CODX'"/>
    		<property name="transactionManager" ref="jmsTransactionManager"/>
    	</bean>
    
    	<jms:inbound-gateway id="myGateway"
    		request-destination="myDestQueue" request-channel="reqstChannel"
    		error-channel="errChannel" auto-startup="false"
    		container="jmsContainer" extract-request-payload="false"
    		request-timeout="-1" />
    
    
    public class MyJmsListener implements SessionAwareMessageListener {
    	public void onMessage(Message message, Session session) {	
    			try {
    
    				int mod =session.getAcknowledgeMode();				
    				boolean istr =session.getTransacted();
    
    			} catch (JMSException ex) {
    				throw new RuntimeException(ex);
    			}catch (HboException ex) {
    				throw new RuntimeException(ex);
                            }
              }

    1. The below is some of the Jboss starup log:

    [INFO,EventDrivenConsumer,main,] started org.springframework.integration.config.ConsumerEnd pointFactoryBean#21
    [INFO,EventDrivenConsumer,main,] started org.springframework.integration.config.ConsumerEnd pointFactoryBean#36
    [INFO,DefaultLifecycleProcessor,main,] Starting beans in phase 0
    [INFO,ChannelPublishingJmsMessageListener,main,] started org.springframework.integration.jms.ChannelPublish ingJmsMessageListener#0
    [INFO,ChannelPublishingJmsMessageListener,main,] started org.springframework.integration.jms.ChannelPublish ingJmsMessageListener#1


    2. The application did not enter my [MyJmsListener] onMethod's breakpoint,
    Is there some incorrect configuration ?
Working...
X