Praveen Singh

Introduction of Spring JMS with ActiveMQ: Point to Point

Introduction


INTRODUCTION OF SPRING JMS WITH ACTIVEMQ: POINT TO POINT

Recently i got the chance to work on JMS.
I decided to use Spring framework (Spring 3) and it's jmsTemplate and MDP (Message Driven POJO) concept to access JMS apis, as it is most famous J2EE framework available in market today.
I decided to use Apache ActiveMQ as message broker in my application.
But when i started my work, i surprised by knowing the fact that how much less is available about this topic on FREE World Wide Web.

Hence i decided to provide up to date, easy to understand and easy to configure material on this topic on FREE World Wide Web.

Note: As per my understanding this the easiest way to explain HelloWorld application with Spring/JMS
Please let me know if any reader feel it could be much simpler, i will try to update the page with those suggestions.

Note: For Advance options and configuration, try my following blogs
ActiveMQ in embedded mode in Tomcat
http://icodingclub.blogspot.com/2011/09/spring-jms-with-embeded-activemq-in.html

HornetQ in embedded mode in Tomcat
http://icodingclub.blogspot.com/2011/09/spring-jms-with-embeded-hornetq-in.html

Now coming back, 'up to date' is a tricky phrase !
As today's latest material may not be the same tomorrow.
So my blog is based on following contract or technology

  • Spring 3.1 M1
  • Apache ActiveMQ 5.5
  • Eclipse Helios.
Before we jump to code, lets have a small introduction of JMS and demo applications
First of all, in this blog, i am going to cover only Point to Point Model.
Publish and Subscribe is Coming Soon !

So what is a JMS ?






 Idea is simple, JMS is mainly used for Asynchronous Message Communication.
We have a Sender ( or Producer) Application and a Listener ( or Consumer) Application.
To hold the message we have a broker in between. This broker is often called as a Message Queue or MQ.
We are using ActiveMQ for this role.

Now lets know about the Demo Application

  1. MQ: ActiveMQ.
  2. Listener: A standalone Java Programe.
  3. Sender: A standalone Java Program.
In this Demo, we will send a Hello World Message from Sender to Listener.


Lets go one by one

Configuring ActiveMQ


Configuring ActiveMQ on windows or Linux is actually no configuration.
Step 1: Just download the zip distribution from their official website: http://activemq.apache.org/download.html
Step 2: Extract in some folder.
Step 3: Go to activemq-5.5.0\bin folder
  •             activemq-5.5.0\bin for 64 bit
  •             activemq-5.5.0\bin\win32 for 32 bit
 Step 4: open cmd at this location and run: activemq

  You will see a active mq is running and providing few information on console(Check video at the end of this blog)


Now lets start with Listener and Sender now, as i mention already both are separate application

Note: Few book and blog provide the matarial where they run both, sender and Listener on same application. this leads to confusion, as in real world they will never run together!!
Why to waste energy on something which has no real world use?

Libs/Jars


Lets have a look on this libs, what i am using in demo applications, both apps share same libs



Development


Listener Application


Structure of application is as follows










Please go through the comments to understand things properly

Listener's ApplicationContext file: JMSConfig.xml


<beans xmlns:jms="http://www.springframework.org/schema/jms" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemalocation="  
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
 <bean class="org.apache.activemq.command.ActiveMQQueue" id="destination">

  <constructor-arg value="TEST.Q1"></constructor-arg>
 </bean>
 <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="connectionFactory" p:brokerurl="tcp://localhost:61616"></bean>
 <bean class="com.jms.helloworld.listner.MessageListenerImpl" id="simpleMessageListener">
  <bean class="org.springframework.jms.listener.DefaultMessageListenerContainer" id="jmsContainer">
   <property name="connectionFactory" ref="connectionFactory"></property>
   <property name="destination" ref="destination"></property>
   <property name="messageListener" ref="simpleMessageListener"></property>
  </bean>
 </bean>
</beans>  



Listener's implementation

package com.jms.helloworld.listner;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

public class MessageListenerImpl implements MessageListener
{
 public void onMessage(Message message)
 {
  System.out.println("RECEIVER");
  TextMessage msg = (TextMessage) message;
  try
  {
   System.out.println("MESSAGE: " + msg.getText());
  }
  catch (JMSException e)
  {
   e.printStackTrace();
  }
 }

}



Listener's implementation Runner
package com.jms.helloworld.test;

import javax.jms.JMSException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestJMSListner
{
 public static void main(String[] args) throws JMSException
 {
  System.out.println("LISTNER STARTED");
  ApplicationContext context = new ClassPathXmlApplicationContext(
    new String[] { "com/jms/helloworld/config/JMSConfig.xml" });
 }
}



Now lets move to Sender 3. Sender Application Structure of Sender's application is as follows
Please go through the comments to understand things properly Sender's ApplicationContext file: JMSConfig.xml



<beans xmlns:jms="http://www.springframework.org/schema/jms" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemalocation="  
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
    <bean class="org.apache.activemq.command.ActiveMQQueue" id="destination">
        <constructor-arg value="TEST.Q1"></constructor-arg>
    </bean>
    <bean class="org.springframework.jms.core.JmsTemplate" id="producerTemplate" p:connectionfactory-ref="connectionFactory" p:defaultdestination-ref="destination"></bean>
    <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="connectionFactory" p:brokerurl="tcp://localhost:61616"></bean>
    <bean class="com.jms.helloworld.producer.MessageProducer" id="simpleMessageProducer">
        <property name="jmsTemplate" ref="producerTemplate"></property>
    </bean>
</beans>





Sender's implementation
package com.jms.helloworld.producer;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;

public class MessageProducer
{
 protected JmsTemplate jmsTemplate;

 public JmsTemplate getJmsTemplate()
 {
  return jmsTemplate;
 }

 public void setJmsTemplate(JmsTemplate jmsTemplate)
 {
  this.jmsTemplate = jmsTemplate;
 }

 public void sendMessages() throws JMSException
 {
  System.out.println("PRODUCER");
  MessageCreator messageCreator = new MessageCreator()
  {
   public Message createMessage(Session session) throws JMSException
   {
    TextMessage message = session.createTextMessage("Hello World: Spring - JMS");
    return message;
   }
  };
  jmsTemplate.send(messageCreator);
 }
}




Sender's implementation Runner
package com.jms.helloworld.test;

import javax.jms.JMSException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.jms.helloworld.producer.MessageProducer;

public class TestJMSProducer
{
 public static void main(String[] args) throws JMSException
 {

  ApplicationContext context = new ClassPathXmlApplicationContext(
    new String[] { "com/jms/helloworld/config/JMSConfig.xml" });
  MessageProducer myBean = (MessageProducer) context.getBean("simpleMessageProducer");
  myBean.sendMessages();
 }
}




How to Run whole system ?


Step 1: start the ActiveMQ
Step 2: Start the listener by ruining TestJMSListner.java you will see the message, "LISTNER STARTED" on console
Step 3: Start the Sender by running TestJMSProducer.java
 you will get the message "PRODUCER" on producer console
and
RECEIVER MESSAGE: Hello World: Spring - JMS on Listener console

Note: Please click on console icon of eclipse, if you can't see all messages.

Demo Vodeo





57 comments:

  1. It is very nice video. Thanks for that. Can we put the Listener program in application deploy into the Tomcat server instead of running in separate Java program?

    ReplyDelete
  2. Thanks Nayan!
    yes we can deploy the listner program in an application deployed in tomcat.
    The fact is most of the time, this is what we do !

    In my next blog, i am going to cover same stuff with how to integrate the activemq with tomcat in place of default jetty !

    ReplyDelete
  3. Hey man.. can u tell me how i can specify my send channel and receive channel please? i need to create 2 or more receivers and 2 or more senders..

    Tks

    ReplyDelete
    Replies
    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

      Delete
  4. I believe we have different section in this question
    1. send channel and receive channel
    Ans: This is the way we do it, TEST.Q1 is name channel(Queue)
    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="TEST.Q1"></constructor-arg></bean>

    2. How to increase the no of consumer ?
    Ans: Update the jmsContainer bean like this

    <bean id="jmsContainer"
    class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="cachedConnectionFactory" />
    <property name="destination" ref="fooQueue" />
    <property name="messageListener" ref="simpleMessageListener" />
    <property name="maxConcurrentConsumers" value="10" />
    </bean>

    maxConcurrentConsumers is the property which can used to increase the no of consumer

    3. How to increase the no of producer ?
    Producer is just a web app, so no of producer depends on no simultaneous request a server can receive (no of threads)

    ReplyDelete
  5. Hi, very nice post... the thing is that i am having problems.. i think is in the header of the config files... could you help me out, please?
    This is the error:

    Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

    Do you know why could that be?
    Thanks!

    ReplyDelete
    Replies
    1. Yes, that is because some of the IDE doesn't work if you don't specify tag .. put at the top ... and it will work ...
      other than that there are few typos present in the code snippet ... mainly in the config XML ... The listener config XML has an improper tag ...

      Delete
  6. Hi MeKaS
    I am not getting any exception on my system, re tested with the xml snippet posted on this page.

    I hope you copied it correctly (click on view plain -> Clt-C) or you have proper jars on your system.

    ReplyDelete
  7. Its weird... I dont know whats wrong... everything seems perfect in your code...

    But dont worry i got the idea, and from this and another few tuts i got an running example :)

    Thanks!
    Mario

    ReplyDelete
  8. Hi Praveen K Singh

    I need the list of libary for the both listener and sender application

    Can you send for me these libraries?
    my email is hongquanthuhuong@gmail.com or skypeID is billgate_qn

    I allways online skype all working day from 9 am to 5pm

    Thanks
    Quan

    ReplyDelete
  9. I'm using Spring libs 3.1.0.RC1 with Active MQ 5.5.1. I was getting the same error, as mentioned above:
    Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

    So I changed the JMSConfig.xml for Listener to read as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jms="http://www.springframework.org/schema/jms"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
    <bean class="org.apache.activemq.command.ActiveMQQueue" id="destination">

    <constructor-arg value="TEST.Q1"></constructor-arg>
    </bean>
    <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="connectionFactory">
    <property name="brokerURL"><value>tcp://localhost:61616</value></property>
    </bean>
    <bean class="com.jms.helloworld.listener.MessageListenerImpl" id="simpleMessageListener"/>
    <bean
    class="org.springframework.jms.listener.DefaultMessageListenerContainer"
    id="jmsContainer">
    <property name="connectionFactory" ref="connectionFactory"></property>
    <property name="destination" ref="destination"></property>
    <property name="messageListener" ref="simpleMessageListener"></property>
    </bean>
    </beans>


    and Sender JSMConfig.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jms="http://www.springframework.org/schema/jms"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
    <bean class="org.apache.activemq.command.ActiveMQQueue" id="destination">

    <constructor-arg value="TEST.Q1"></constructor-arg>
    </bean>
    <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="connectionFactory">
    <property name="brokerURL"><value>tcp://localhost:61616</value></property>
    </bean>
    <bean class="com.jms.helloworld.listener.MessageListenerImpl" id="simpleMessageListener"/>
    <bean
    class="org.springframework.jms.listener.DefaultMessageListenerContainer"
    id="jmsContainer">
    <property name="connectionFactory" ref="connectionFactory"></property>
    <property name="destination" ref="destination"></property>
    <property name="messageListener" ref="simpleMessageListener"></property>
    </bean>
    </beans>


    And this worked fine:)
    Dawud

    ReplyDelete
    Replies
    1. Hi Java Goose,

      Can you please post your Sender JSMConfig.xml. I think you have posted the same Listener JSMConfig.xml twice.


      Thanks

      Delete
    2. Hi Java Goose,


      Can you please post your Sender JSMConfig.xml.

      Thanks

      Delete
    3. This comment has been removed by the author.

      Delete
    4. This comment has been removed by the author.

      Delete
    5. Hi Venky and Bertrand
      What you need to do in Send JMSConfig is to use 'property name="defaultdestination" ref="destination"''/property'
      element instead of "p"
      NOTE: I can not use parenthese here, you need change my above code ' to parenthese
      And defaultDestination "D " should be uppercase case of it will throw " Bean property 'defaultdestination' is not writable or has an invalid setter method. Did you mean 'defaultDestination'?"

      Delete
    6. This comment has been removed by the author.

      Delete
    7. This comment has been removed by the author.

      Delete
  10. Could you please explain about more features on JMS?

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Good one. Simple. Straight forward.
    I got the same error as 'Java GooseJan 29, 2012 08:46 AM' and changed brokerURL and that fixed. But on Publisher gave errors on connectionFactory, defaultDestination and I've changed it as below.












    This worked for me. And I'm able to send/receive.

    But I need to try a topic without any spring, just ActiveMQ+embedded tomcat and using Topic and monitor. Thats my requirement. If any one has link please share else, will post once I'm done. Not sure when :)

    Thanks,
    Kiran.

    ReplyDelete
  13. the blank space was the changed code, i've pasted its not publishing it.

    ReplyDelete
  14. Could you please some links from where i can all these jars. I am not able to find them all. Please reply asap.

    ReplyDelete
  15. Hi Praveen,
    I have two servers. When I create Communication loss between my servers, after some time consumers go off on both servers. ActiveMQ shows socket and eof exception but I do not have implementation to catch these and recreate consumers. Could you tell how to overcome this problem.

    ReplyDelete
  16. Hi Praveen,
    You have written nice article. I followed this article step by step but when trying to run TestJMSListener calss, getting the following erro...
    I am very new to this technologies...Kindly help in the same.
    Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 7 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:509)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:427)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
    at com.jms.helloworld.test.TestJMSListner.main(TestJMSListner.java:11)
    Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)

    ReplyDelete
  17. @ Manjesh Kumar

    seems like xml formatting problem, try too look for beans tag, error is near to that.

    ReplyDelete
  18. Hi Praveen, Thanks for your quick response.... i checked out again and also verified with your xml using video ...still giving problem at line 7
    would you please send the .zip file for JMSListener and SpringJMSSender projects used in tutorial to my email .. manjesh_kumar@dell.com

    ReplyDelete
  19. Replies
    1. here is line 7 .. please look

      http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">

      Delete
  20. Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid;

    ReplyDelete
  21. I am getting this exception: Not sure that has to be done..
    .

    Exception in thread "main" org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Frame size of 1157 MB larger than max allowed 100 MB
    at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
    at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
    at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
    at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
    at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:526)
    at com.springsource.javapsyche.jms.producer.MyMessageProducer.sendMessage(MyMessageProducer.java:35)
    at com.springsource.javapsyche.jms.test.Test.main(Test.java:23)
    Caused by: javax.jms.JMSException: Frame size of 1157 MB larger than max allowed 100 MB
    at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1380)
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
    at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
    at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
    at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
    ... 4 more
    Caused by: java.io.IOException: Frame size of 1157 MB larger than max allowed 100 MB
    at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:277)
    at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:229)
    at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:221)
    at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
    at java.lang.Thread.run(Thread.java:680)

    ReplyDelete
  22. This tutorial is very much useful for Begineers, thanq very much, due to copying the above code we face some Exceptions these can be overcome by replacing p:brokerurl with brokerURL & connectionfactory with connectionFactory in both the config files, Before executing jst go through the config files.

    ReplyDelete
  23. Hi Praveen,

    Thanks for putting a very good tutorial to understand JMS quickly.

    ReplyDelete
  24. Where I can download the libraries?

    Does this demo is for download?

    Thanks!

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. really a nice tutorial.
    could you please send me the required jars?
    email: asish012@gmail.com

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete
  28. Awsome tutorial...ll give a go now :)..

    ReplyDelete
  29. Hi, how would you configure this for WebSphereMQ?

    ReplyDelete
  30. really a nice tutorial.
    and
    please explain how create Queue in activeMQ..

    Thanks

    ReplyDelete
  31. Hi, you explained very well. But, a small doubt, is there any way to use JMS, ActiveMQ with Apache Tomcat without Spring?

    ReplyDelete
  32. Hi Praveen,

    As per the libraries and files you specified am getting the below errors in JMSConfig.xml

    JMSConfig.xml Listner
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 106; cvc-elt.1: Cannot find the declaration of element 'beans'.

    JMSConfig.xml Sender
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from class path resource [com/jms/helloworld/config/JMSConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 106; cvc-elt.1: Cannot find the declaration of element 'beans'.

    Waiting for the reply..

    Thanks
    Venkatesh

    ReplyDelete
  33. This comment has been removed by the author.

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. This comment has been removed by the author.

    ReplyDelete
  36. Hi Praveen K Singh.
    I am having a problem using spring and activemq to create a sender web servlet that will receive messages through a form and send it to another web servlet consumer application. can you please do that scenario.

    ReplyDelete
  37. Hi Praveen,

    This tutorial is very nice i am new to spring and active mq, i just want to know that how can create a queue through code not using xml configuration and also i want to pass the broker url not with xml configuration through code.

    ReplyDelete
  38. I working on project which is going to used as CRM System. I am using Spring and Hibernate, I want to implement sms service in my application. I have to send sms each client who register in my application . how can i implement this functionality.

    ReplyDelete
  39. Hi praveen

    i want to implement spring kms template configuration to send and receive jms messages ?

    ReplyDelete
  40. Hi praveen

    i want to implement spring jms template configuration to send and receive jms messages ?

    ReplyDelete
  41. This comment has been removed by the author.

    ReplyDelete
  42. Hi praveen,
    This is nice tutorial which i never seen for spring jms tutorial.
    i wanna use spring jms with web services (SOAP).
    How can i implement??? please give me suggestions to implement this application

    ReplyDelete
  43. i want to merge 2 config file in one file and want to load using @ImportResource annotation. is it possible?

    ReplyDelete