aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes MDBs are not necessarily asynchronous, are they? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "MDBs are not necessarily asynchronous, are they?" Watch "MDBs are not necessarily asynchronous, are they?" New topic
Author

MDBs are not necessarily asynchronous, are they?

Antonio Fornie
Ranch Hand

Joined: Aug 07, 2008
Posts: 117
Hello all!

You know from EJB3.0 on an MDB (Message Driven Bean) can handle messages synchronously, on the other hand there will be a lot of questions in the SCEA5 where they expect you to say MDBs are used to handle asynchronous messages. So what would you do? Imagine you have some answers:
a) MDBs are used for asynchronous messaging
b) MDBs are used for synchronous messaging
c) MDBs are used for synchronous and asynchronous messaging

What would you answer? Because it's true that now they can handle synchronous messages too, but they may want me to say the general use...

Thank you very much!

antonio

I feel there must be far better ways to do what I do... that makes learning even funnier
Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112
Antonio,

Where did you find such information? Can you post it? Because, for me, MDB's are exclusively asynchronous. If you want synchronously, should use Session Bean. So, in my opinion, answers 'A' is correct.
J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
You know from EJB3.0 on an MDB (Message Driven Bean) can handle messages synchronously.


This is wrong.


SCJP, SCWCD, SCBCD, SCEA 5
Antonio Fornie
Ranch Hand

Joined: Aug 07, 2008
Posts: 117
Jonathan Aotearoa wrote:
You know from EJB3.0 on an MDB (Message Driven Bean) can handle messages synchronously.


This is wrong.


Yes, I was wrong. I had been reading about MDBs not using JMS (a MDB but not a javax.jms.MessageListener), but other JCA implementations and I got muddled.

By the way, are all JCA implementations asynchronous? I don't think so as JDBC itself is a JCA implementation, isn't it? So, wouldn't it be possible to call an MDB with another JCA implementation synchronously? I could swear I read it somwhere...

And one more thing, as MDBs can work with other JCS implementations, can we say the same about SLSBs?

Thank you very much and sorry for my confusion!

antonio
prathap venkata naga yelugula
Ranch Hand

Joined: Aug 13, 2008
Posts: 243
Good Discussion.

Cheers!
Prathap.
J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
OK, I see what you're getting at.

The JCA architecture defines a number of system level contracts between application servers and EIS. One of these is a message inflow contract. This allows a resource adapter to asynchronously deliver messages to components (i.e. endpoints) residing with an application server.

So, wouldn't it be possible to call an MDB with another JCA implementation synchronously?


As far as I'm aware no. The message inflow contract defined by the JCA is based purely on asynchronous message delivery.

You should check out the JCA 1.5 specification. All the information you need is contained therein.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDBs are not necessarily asynchronous, are they?