Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Enlisting IBM Websphere MQ Series in COM+ transaction

Enlisting IBM Websphere MQ Series in COM+ transaction

Scheduled Pinned Locked Moved COM
helpcomsysadmindata-structuresquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Jansson
    wrote on last edited by
    #1

    Hi guys, I have some serious problems with com+ and the ibm mq series. I have a windows service with a com+ defined class (inherits ServicedComponent, has [Transaction(TransactionOption.RequiresNew)] and [AutoComplete(true)] on the method. The problem is that the mq series part never rolls back in case of any errors, the other transactions works perfectly fine. When it comes to the mq connection, I have set up the enviroment to use server- bindings (a requirement for using transactions)

    MQEnvironment.properties[MQC.TRANSPORT_PROPERTY] = MQC.TRANSPORT_MQSERIES_BINDINGS;

    and the connection / send looks like this (stripped):

    queueManager = new MQQueueManager(queueManagerName, channel, host);
    queueManager.Connect();
    ...
    sendOptions = new MQPutMessageOptions();
    sendOptions.Options += MQC.MQRO_NEW_MSG_ID + MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
    sendOptions.Options += MQC.MQGMO_SYNCPOINT;
    ...
    queue = queueManager.AccessQueue(queueName, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
    queue.Put(msg, sendOptions);
    queue.Close();

    Do I have to do anything in perticular in the transaction-based method for this to work? Scaled down, it looks lite this:

    [AutoComplete(true)]
    function void DoWork()
    {
    try
    {
    send_message_on_mqqueue();
    do_some_db_work();
    ContextUtil.SetComplete();
    }
    catch (Exception)
    {
    ContextUtil.SetAbort();
    }
    }

    Any help, thoughts or suggestions are appreciated!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups