*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes [MDB] K&B, What technique is better ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "[MDB] K&B, What technique is better ?" Watch "[MDB] K&B, What technique is better ?" New topic
Author

[MDB] K&B, What technique is better ?

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3199
    
    5
Hi, K&B !
Since MDB does not have local/remote interfaces, what is better
technique:
1) To call MDB directly from client (for example, Java Servlet, possibly on separate server).
2) To call MDB from Enterprise Bean.
Java message is delivered over JMS provider, it looks like there is not
any difference, but maybe there are some other issues/tricks which should be considered. What is best best practice ?
[ October 31, 2003: Message edited by: Mikalai Zaikin ]

Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

You cannot call a MDB directly beacuse it does not have a home/component interfaces. You can send a message to a JMS server so that a MDB can be invoked by the container.
Hope this helps,


Groovy
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3199
    
    5
Well, when I say "call MDB" that ofcourse means "send message to MDB over JMS"
My question actually was : *is there any difference for client location*?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

It does not make any difference whether you sent messages from a servlet or EJB.
You can replace the sender any time, that is the advantage of using messaging system.
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
Client and MDB are highly decoupled.Thanks to JMS


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: [MDB] K&B, What technique is better ?
 
Similar Threads
How to stop MDB retry invocation during System Exception
SQL On-Update Trigger notifying Java; Service Activator Pattern?
I'm new to Java and interested to take SCJP
What is the relationship between JMS and MDB?
Authentication JMS/MDB