Using JBoss ESB sometimes a action processing pipeline is transactional, sometimes it's not.

Solution In Progress - Updated -

Environment

Red Hat JBoss SOA Platform 5.2.0

Issue

We have a action configured like this:

  <service category="Offline"
   description="Procesa los mensajes que ingresan al proceso offline"
   invmScope="GLOBAL" name="ProcessRequest">
   <listeners>
    <jms-listener busidref="offlineRegularJMSChannel" is-gateway="true" name="JMS-OfflineListener"/>
   </listeners>

When we invoke it, we find that sometimes the action processing pipeline is transaction, and sometimes it is not. How do we make our pipeline always transaction?

Resolution

Having InVM scope set to GLOBAL, means you will have 2 endpoints registered for the same service. One InVM Scope, and one with the JMS Bus. Which could explain why sometimes when you invoke the service it's transaction, and other times it does not. If you don't have any specific reason for using, I recommend you remove that as well eg:

<service category="Offline"
   description="Proceso que rutea el mensaje del flujo offline al conector correspondiente" name="ListenerResponse">

That will ensure that JMS is used for all on the bus communications, and that transaction management is the JMS layer's responsibility. See the jms_quickstart for an example. Do not remove it for services where to don't have a non-gateway jms listener.

For ProcessRequest, if you want to use JMS Transactions, you should set it like this:

<service category="Offline"
   description="Procesa los mensajes que ingresan al proceso offline"
   name="ProcessRequest">
   <listeners>
    <jms-listener busidref="offlineRegularJMSChannel" is-gateway="true" name="JMS-OfflineListener"/>
    <jms-listener busidref="internalOfflineRegularJMSChannel" name="JMS-OfflineListener"/>
   </listeners>

Where:

  • offlineRegularJMSChannel is a transacted jms bus
  • internalOfflineRegularJMSChannel is a new transacted jms bus

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.