• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring JMS vs MDB

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Can anyone please suggest on how we can compare Spring JMS with EJB3 MDB. I mean which one is better? I want to implement JMS with features like load balancing, multithreading etc. and am confused over which open source software to go with.
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dorothy,

as far as I know, I'd say one big difference is that EJB is a standard and Spring is not. Moreover I remember that the EJB specification allows another messaging service besides JMS for MDBs although I don't know what alternatives exist in practice. Because I don't know more details about Spring JMS, I unfortunately can't tell you more differences but perhaps this helps a little bit.

I want to implement JMS with features like load balancing, multithreading etc. and am confused over which open source software to go with.


What does this mean? Do you really want to implement a JMS provider or something like that by yourself? Or is it that you want to know which open source implementations you can use?

Marco
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you mean Spring's MDP support vs MDB. The main difference is if your MDP will be called by multiple threads you have to make your MDP implementation thread-safe.
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, in order to make it thread-safe, i guess we can use the DMServer and maybe also to take care of clustering and things like that. But what I am trying to know is that is Spring MDP better than EJB MDB or not? My application is a multithreaded application. In this app, there are many processes that asynchronously communicate with each other by placing messages in queues
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dorothy Taylor wrote:Well, in order to make it thread-safe, i guess we can use the DMServer and maybe also to take care of clustering and things like that.


I don't know how using DM Server or clustering would make any object thread-safe. You need to handle it yourself.

Dorothy Taylor wrote:
But what I am trying to know is that is Spring MDP better than EJB MDB or not?


MDP is an alternative of MDB, so you can make something like MDB without using EJB container.
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I'll provide a few details on my requirement. I have an aplication that runs on a single machine and there are various processes. Each process is taking input from a queue and placing the output in another queue for the next application to process. So one process's output(into an IBM MQ) is another process's input. All these processes are currently in a single machine, they are multithreaded and the performance is okay with the current load, but if we will increase the load, the performance may not be so good. So I am looking out for options such that:

  • The cost is minimal i.e. if IBM MQ could be replaced with open source alternative
  • Multithreading, failover, load balancing etc. can be accomplished with ease


  • So one option is that Spring JMS can be a choice for doing JMS and JBoss MQ may be the queuing solution. Now the question is that how can we compare EJB MDB's and Spring MDP's. Also since there is no front end can we use Spring DMServer for all the things like clustering etc.

    thanks
     
    Hong Anderson
    Ranch Hand
    Posts: 1936
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Multi-thread could lead to thread-safe issue. If you use EJB you don't have to worry because all enterprise beans are thread-safe.
    But if you use Spring's MDP support, you have to make your MDP implementation thread-safe, if the MDP can be called by multiple threads.
     
    Dorothy Taylor
    Ranch Hand
    Posts: 104
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Will the server on which the MDP is deployed, not take care of making the app thread safe?
     
    Hong Anderson
    Ranch Hand
    Posts: 1936
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Dorothy Taylor wrote:Will the server on which the MDP is deployed, not take care of making the app thread safe?


    No.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic