Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration or JmsTemplate? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration or JmsTemplate?

    Seems like I have a tough choice ahead of me...

    I could either create a stand alone Spring Integration JMS Consumer or embed the Spring JmsTemplate into existing Spring Web application. Without regard to performance, which route should I take? The reason I said to ignore performance is because we have less than 10 users at most. So, I'm hesitant to create another server using Spring Integration. At the same time, if there's any benefit in using Spring Integration over JmsTemplate then I'm all ears. Also, please assume that I'm "only" using JMS... don't need any Spring Integeration w/ files, emails, rmi, web services, and etc... I guess I'm really looking for "valid" reason to use Spring Integration for technical learning purpose or to convince my co-workers.

  • #2
    Spring Integration doesn't really add any overhead; it's just calling JmsTemplate methods for you while exposing a more generic interface. Can you describe the use-case a bit? You are sending a Message from within a Controller?

    Comment


    • #3
      Originally posted by Mark Fisher View Post
      Spring Integration doesn't really add any overhead; it's just calling JmsTemplate methods for you while exposing a more generic interface. Can you describe the use-case a bit? You are sending a Message from within a Controller?
      Thanks for the response. No, it's not from the controller. This is only for in-bound JMS process that performs CRUD operation on to the DB.

      Comment


      • #4
        Without knowing too many details, it sounds like using Spring's basic Message-Driven POJO support might be sufficient. That does not even require the use of JmsTemplate. Instead, you would simply point to a POJO via configuration and let all the JMS details be handled behind the scenes.

        If you think you need to take advantage of a pipes-and-filters model for transformation, routing, etc., then you could look at Spring Integration.

        Can you describe why you think Spring Integration might be useful beyond what you get from Spring's Message-Driven POJO support?

        Comment


        • #5
          Originally posted by Mark Fisher View Post
          Without knowing too many details, it sounds like using Spring's basic Message-Driven POJO support might be sufficient. That does not even require the use of JmsTemplate. Instead, you would simply point to a POJO via configuration and let all the JMS details be handled behind the scenes.

          If you think you need to take advantage of a pipes-and-filters model for transformation, routing, etc., then you could look at Spring Integration.

          Can you describe why you think Spring Integration might be useful beyond what you get from Spring's Message-Driven POJO support?
          As of now, I don't need any of transformation, routing, and etc... The only reason I thought of Spring Integration is that I can create stand alone JMS provider server. For example, the flow would be JMS stand alone server -> DB <- Web App

          Then, I don't need to include JMS code into Web Server. Yeah..it's not a compelling reason... but I think I'll go w/ Spring Core way of doing this and be part of Web App.

          Comment


          • #6
            Originally posted by noob78 View Post
            The only reason I thought of Spring Integration is that I can create stand alone JMS provider server. For example, the flow would be JMS stand alone server -> DB <- Web App

            Then, I don't need to include JMS code into Web Server. Yeah..it's not a compelling reason... but I think I'll go w/ Spring Core way of doing this and be part of Web App.
            I'm not following what you mean by "JMS stand alone server". There is no difference in the way Spring Core or Spring Integration would handle the JMS reception. In other words, you can easily use Spring Core's JMS support for Message-driven POJOs as a standalone Application Context that is not part of the webapp.

            Does that make sense?

            Comment


            • #7
              Originally posted by Mark Fisher View Post
              I'm not following what you mean by "JMS stand alone server". There is no difference in the way Spring Core or Spring Integration would handle the JMS reception. In other words, you can easily use Spring Core's JMS support for Message-driven POJOs as a standalone Application Context that is not part of the webapp.

              Does that make sense?
              Yeah, that's true. I suppose I could make stand alone JMS server using Spring Core but mind as well be using Spring Integration. Still, thanks for the tip! Maybe next time, I get to use Spring Integration.

              Comment


              • #8
                You might want to have a look at the 2.0 milestone code that includes JDBC adapters. If your DB updates are simple enough, then you might be able to have a 100% configuration-driven application that does use Spring Integration as: JMS-inbound -> JDBC-outbound

                Comment

                Working...
                X