Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7270

MDB Transaction Batch Support

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • None
    • EJB
    • None

      When someone is receiving messages, this is a pretty common useCase:

      Consumer cons = sess.createConsumer(....);
      Transaction tx = getTheTransactionSomehow);
      int counter = 0;

      Message msg = null;
      try
      {
      do

      { msg = cons.receive(2000); // or a configured timeout if (counter ++ == 1000) tx.commit(); performDBOperations(msg); }

      while (msg != null);
      }
      catch (Exception e)
      {
      tx.rollback();
      }

      However, this is not possible over MDBs. You basically have to transact every received message.

      With the code above, we would instead commit or rollback the entire group.

      It should be possible to do this kind of batching with MDBs somehow.

      IMO this should be suggested as part of the Specification, as other systems also have it.

              rhn-engineering-cdewolf Carlo de Wolf
              csuconic@redhat.com Clebert Suconic
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: