It's not a secret anymore!
The moose likes Web Services and the fly likes JAXM Vs JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXM Vs JMS" Watch "JAXM Vs JMS" New topic


Deepa Janakiraman

Joined: Jan 22, 2003
Posts: 22
I am new to web services and JAX APIs. I couldn't understand the difference between JMS and JAXM. I can see both can send XML doc as messages.
Is that redundant? Please help me understand this.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Is that redundant?

That's a good question without a correct answer.
JMS and JAXM are redundant from the point of view that both are messaging APIs. But, the details support the opposite view. JMS does not define a transport protocol and thus isn't as viable for integration - JAXM uses SOAP as a transport. On the other hand, JAXM only supports point-to-point communication (which is the mostly used in EAI).
In general, JMS provides more performance and flexibility while JAXM provides compatibility.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
JMS provides reliable asynchronous communication between enterprise components, i.e. There are message producers generating messages, while consumers receive and process messages, asynchronously....Messages exchanged via JMS may be XML, text, bytes etc..
JAXM is a convenient (wrappered) API that makes it easy to create and send XML messages over the Internet, without worrying about the protocol.
In an nutshell:
1. JMS is used within an enterprise while JAXM is used to send messages over the internet
2. JMS supports publish/subscribe model, but not sure if JAXM can send messages to multiple recepients..
3. JMS messages can be XML, text, byes, objects while JAXM send XML messages (only)
4. JMS provides a reliable service, i.e. guaranteed delivery, whereas when using JAXM, I think calls will fail if remote host/port is unavailable.
Experts - please share if you disagree..
[ March 25, 2003: Message edited by: Rama Raghavan ]

Rama Raghavan<br />SCJP2<br />SCWCD
I agree. Here's the link:
subject: JAXM Vs JMS
It's not a secret anymore!