1

I need some clarity on the right approach of implementing JMS in our system.

Currently we have two JBoss servers in load-balanced for end user transaction purpose, we are extending the notification features based on various event in the transaction. To make it work have decided to use following approach, hornetQ will be embedded in transaction Jboss servers and MDB will be attached in same JBoss server to listend and call another JBoss server which will have some business code to categorize the users to be sent and finally that server will make a call to XMPP server with appropriate users.

Here my doubt is, deploying MDB (event consumer) in transaction JBoss server is good approach or move the MDB to JBoss server dedicated for notification pupose. Please throw some idea for better approach.

Regards, Vairam

MaDa
  • 10,511
  • 9
  • 46
  • 84
vairam
  • 471
  • 1
  • 11
  • 26

2 Answers2

2

As I said earlier your question here is poorly written, but I'm really trying to help you...

so, it's always a good choice to deploy MDBs to process transactions instead of using a database directly as you are going to do the TX asynchronously.

When you send data from one MDB to another application server, you can have both operations as part of the same TX, hence you can make usage of XA to make sure the process of the Message and whatever is done afterwards (another message send, another EJB call or another DB operation) would be done as part of the same TX.

If you need more help, please re-edit your question making sure you are using the right terminology. I don't think you're having a language barrier.. you're just using wrong terms.. like, you can't embed HornetQ in a Transaction, that's just something that doesn't exist.

Clebert Suconic
  • 5,353
  • 2
  • 22
  • 35
0

Your question is a bit confusing to be understood. How can you deploy a MDB in a transaction? You deploy a MDB on an application server.

Your question is not making much sense. Perhaps it's a language barrier?

Clebert Suconic
  • 5,353
  • 2
  • 22
  • 35
  • 2 Jboss application servers for transaction( lets have jb1), it handles transaction related requests i.e creating new bookings, edit & save action in bookings. we will deploy MDB in same server, if any jms request comes it will be delivered to MDB, MDB will call another jboss server(jb2) for processing the details i.e getting the details related with bookings + user list for delivering the message. in case of any transaction failures in jb2 or jb2 is down, this scenarios will be handled by MDB transaction management. will is it this kind of setup is good to implement. – vairam Aug 09 '11 at 05:48
  • There's no such thing as MDB transaction management. There's the Transaction Manager at the application server. Also, you said "will call another jboss server" but you didn't say how... That could mean N things.... Actually there's no such thing as calling another jboss server. You can call an EJB on another server, you can send a message to another server... etc... It seems that you need to gather a few concepts about application development. Anyway, the Transaction Manager should manage the multiple XA branches you have if you properly configure it. – Clebert Suconic Aug 09 '11 at 16:03