Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

MDBs are not necessarily asynchronous, are they?

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You know from EJB3.0 on an MDB (Message Driven Bean) can handle messages synchronously.



This is wrong.
 
Antonio Fornie
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Discussion.

Cheers!
Prathap.
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
crispy bacon. crispy tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic