0

I tried a simple spring jms example and deployed in tomee worked fine (din't start activemq server). Then I migrated to wildfly 10. But here i need to start activemq server. Is it needed wildfly is already integrated with activemq right? On starting the server (standalone.bat) should start the activemq isn't?

EDIT: Actually some configuration has been changed (I was not aware of the change). I unzipped wildfly 10 again and tried to deploy using "standalone.bat -c standalone-full.xml". Server started successfully but got the below given error.

10:29:26,172 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started in 13367ms - Started 401 of 691 services (397 services are lazy, passive or on-demand)
10:29:29,101 INFO  [org.springframework.jms.listener.DefaultMessageListenerContainer] (org.springframework.jms.listener.DefaultMessageListenerContainer#0-1) JMS message listener invoker needs to establish shared Connection
10:29:30,111 ERROR [org.springframework.jms.listener.DefaultMessageListenerContainer] (org.springframework.jms.listener.DefaultMessageListenerContainer#0-1) Could not refresh JMS Connection for destination 'myMessageQueue' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect
  • JMS is only run if you use standalone-full.xml. Run your server with "standalone.bat -c standalone-full.xml". – stdunbar Aug 26 '16 at 21:51
  • Thank you for your reply, but if I run standalone-full.xml am getting missing dependency exception for DefaultJMSConnectionFactory. How to solve it? – user3095604 Aug 26 '16 at 21:58
  • What version of Wildfly are you using (like 10.0.0.Final)? When do you get the missing dependency exception - startup or after use? And have you made any modifications to the configuration file? – stdunbar Aug 26 '16 at 22:58
  • Deployment is successful in standalone-full.xml but getting an error. Edited my question again. – user3095604 Aug 27 '16 at 16:59

1 Answers1

0

I managed to fix this problem by adding an embedded broker to my springcontext.xml

<amq:broker id="broker" useJmx="false" persistent="false">
    <amq:transportConnectors>
        <amq:transportConnector uri="tcp://localhost:61617" />
    </amq:transportConnectors>
</amq:broker>

Refered : http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html