aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes MOM question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "MOM question " Watch "MOM question " New topic
Author

MOM question

Timber Lee
Ranch Hand

Joined: Oct 14, 2002
Posts: 157
which can be used as MOM client?
1.EJB
2.applet
3.JSP
4.Servlet
5.MDB


SCJP<br />SCWCD<br />SCEA
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
an applet is the most likely.
EJB is also possible (now), but in the exam version of EJB it's not allowed.
(whats an MBD?)
Simon
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
MDB = Message Driven Bean which is part of the EJB 2.0 Specification.
Naichen Liu
Ranch Hand

Joined: Aug 17, 2000
Posts: 46
Maybe all of them are correct,
MDB could act as message consumer, and others could be producers.
Eduard Manas
Ranch Hand

Joined: May 12, 2002
Posts: 69
Everything that can use JMS is a potential MOM client, so I'd say them all are correct.
MOM servers is a different story though... and the answer to that auto-asked question is just MDB.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Be careful don't confuse client -> server with message producer -> consumer. Remember the MOM sits in the middle as a topic or queue. Whether you produce or consume, you interact with MOM. As a result, you could interpret the relationship so that the MOM (i.e. MQSeries, SonicMQ, etc.) is the only real server and all those other things (i.e. applets, jsp, session beans, mdb, etc...) are clients that either produce and/or consume. Remember a mdb is simply a way of easily creating a long running listener to a topic/queue. You can implement the JMS interfaces yourself and create your own listener, but it's more work because you have to provide it a means of staying alive and therefore you must deal with it's lifecycle.
Regards,


Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Eduard Manas:
Everything that can use JMS is a potential MOM client, so I'd say them all are correct.
MOM servers is a different story though... and the answer to that auto-asked question is just MDB.

What if the MOM server does not support JMS?
My point is, the term MOM is not synonymous with JMS. There are plenty of MOM servers that do not support the JMS spec. This question should have really been worded, "Which can be used as JMS client?"
Shankar Shanmugam
Greenhorn

Joined: Sep 12, 2001
Posts: 23
Hi,
I have a basic question which is not related to MOM/MDB. Just wanted to know the J2EE/EJB version covered in the SCEAJ exam.
Thanks in Advance,
Shankar Shanmugam


Shankar Shanmugam<br />Sun Certified Programmer for Java 2 Platform<br />Sun Certified Developer for Java 2 Platform<br />Email: shankar.s@vsnl.net<br /> "Walking on water and building IT Architecture from <br /> specification are easy if and only if both are frozen"<br />-----------------------------------------------
Eduard Manas
Ranch Hand

Joined: May 12, 2002
Posts: 69
Originally posted by Byron Estes:
[QB]Be careful don't confuse client -> server with message producer -> consumer. [QB]

Thanks for your correction Byron, now that I think about it I agree with you and I don't think the term 'MOM server' is correct. To me 'MOM server' sounds more like part of the MOM itself.
I'd say you should call it either message consumer, or topic subscriber. The problem here is how would you call the entity/process/piece of code that is listening for messages coming from a MOM, without mentioning whether they are using queue or topic. You cannot call it consumer or subscriber.
Does anyone know whether there is a name for it?
Eduard
Eduard Manas
Ranch Hand

Joined: May 12, 2002
Posts: 69

What if the MOM server does not support JMS?

... well, in that case you are screwed! ...or maybe not?
I suppose that you could encapsulate the asynchronous call with a DAO using the third-party specific protocol. In that case you could also use it from anywhere that has access to the DAOs.

My point is, the term MOM is not synonymous with JMS. There are plenty of MOM servers that do not support the JMS spec.

I agree, but I wouldn't expect that the examiners expect you to assume that, first of all because all major MOM vendors provide JMS interfaces. In other words, if they don't tell you otherwise, I would assume there is a JMS driver for it.


This question should have really been worded, "Which can be used as JMS client?"

That sounds much better!
Eduard
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Actually, if you look at the JMS API in J2EE 1.4 you'll find two interfaces of interest: MessageConsumer and MessageProducer.
Each of these have subinterfaces specific to whether you are dealing with a topic or a queue.
MessageConsumer
- QueueReceiver
- TopicSubscriber
MessageProducer
- QueueSender
- TopicPublisher
Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MOM question