You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "colin.chi" <ib...@hotmail.com> on 2009/11/20 08:23:59 UTC

About Message Driver Bean

Can I deploy an MDB(Message Driver Bean which is an EJB) to ServiceMix and
let MDB listen a JMS service?

I want to write a MDB to consum message in queue and to process message.

As I know, MDB should be deploy to an EJB container, and run in it. so does
ServcieMix can support it? or should we deploy ServiceMix to a J2EE
application server, such as jboss, weblogic?
-- 
View this message in context: http://old.nabble.com/About-Message-Driver-Bean-tp26427814p26427814.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: About Message Driver Bean

Posted by "colin.chi" <ib...@hotmail.com>.
Hi JB,

Thanks for you reply.

Thanks and regards,
colin.chi



Jean-Baptiste Onofré wrote:
> 
> Hi Colin,
> 
> for now, ServiceMix doesn't support EJB deployment.
> 
> But basicly, a MDB is an EJB which listen to a queue and react to an 
> incoming message in the onMessage() method.
> 
> So you can achieve exactly the same using a JMS consumer endpoint and 
> defining your own marshaler.
> 
> Your marshaler will be called when a message is posted into the queue. 
> You can do whatever in your marshaler (I recommand to only 
> read/parse/small transform the message) and routes the message to 
> another service which implements the business logic (for example a 
> service based on servicemix-bean or cxf-se to use directly an EJB).
> 
> Regards
> JB
> 
> colin.chi wrote:
>> Can I deploy an MDB(Message Driver Bean which is an EJB) to ServiceMix
>> and
>> let MDB listen a JMS service?
>> 
>> I want to write a MDB to consum message in queue and to process message.
>> 
>> As I know, MDB should be deploy to an EJB container, and run in it. so
>> does
>> ServcieMix can support it? or should we deploy ServiceMix to a J2EE
>> application server, such as jboss, weblogic?
> 
> 

-- 
View this message in context: http://old.nabble.com/About-Message-Driver-Bean-tp26427814p26462206.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: About Message Driver Bean

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Colin,

for now, ServiceMix doesn't support EJB deployment.

But basicly, a MDB is an EJB which listen to a queue and react to an 
incoming message in the onMessage() method.

So you can achieve exactly the same using a JMS consumer endpoint and 
defining your own marshaler.

Your marshaler will be called when a message is posted into the queue. 
You can do whatever in your marshaler (I recommand to only 
read/parse/small transform the message) and routes the message to 
another service which implements the business logic (for example a 
service based on servicemix-bean or cxf-se to use directly an EJB).

Regards
JB

colin.chi wrote:
> Can I deploy an MDB(Message Driver Bean which is an EJB) to ServiceMix and
> let MDB listen a JMS service?
> 
> I want to write a MDB to consum message in queue and to process message.
> 
> As I know, MDB should be deploy to an EJB container, and run in it. so does
> ServcieMix can support it? or should we deploy ServiceMix to a J2EE
> application server, such as jboss, weblogic?