JMS queue sender not joining transaction - Weblogic

This is a discussion on JMS queue sender not joining transaction - Weblogic ; Hi, we've migrated recently to wls 8.1 sp2 and while the behavior worked fine for us with WLS 6.1, we are having problems getting this to work. I have a SLSB that sends messages to a JMS queue and to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: JMS queue sender not joining transaction

  1. JMS queue sender not joining transaction

    Hi, we've migrated recently to wls 8.1 sp2 and while the behavior worked
    fine for us with WLS 6.1, we are having problems getting this to work.

    I have a SLSB that sends messages to a JMS queue and to a JMS topic which
    are both bound to different MDBs. I am using 2 different XA connection
    factories to send to the queue and topic and am using an XA JDBC driver
    (weblogic's xa oracle driver). I have also configured the connection
    factories to be XA Connection Factory enabled. The problem I'm having is
    that the MDB's are receiving the message before my primary transaction
    fails. To replicate the transaction failure, I through a EJBException in
    the SLSB method after having sent my messages to the queue. The data is not
    stored in the db (which the SLSB does prior to sending the JMS messages) but
    I can see the MDB's get invoked before the SLSB method completes. The SLSB
    is set to transaction required and the two MDBs are set to container managed
    transactions and Transaction required.

    If anyone has any other ideas of what to look for, I'd greatly appreciate
    your help.

    Thanks,
    Gary



  2. Re: JMS queue sender not joining transaction

    Hi Gary,

    The JMS FAQ has information on debugging transaction
    problems, you can find it here:

    http://dev2dev.bea.com/technologies/jms/index.jsp

    In particular:

    - Make sure there really is a transaction on the thread
    that is invoking the send.

    - Make sure the sender is using the connection factory you
    think it is.

    - Make sure the sender is not using a "transacted" session. (The
    first parameter of conn.createQueueSession() must be false).

    Tom

    Gary T. Mui wrote:
    > Hi, we've migrated recently to wls 8.1 sp2 and while the behavior worked
    > fine for us with WLS 6.1, we are having problems getting this to work.
    >
    > I have a SLSB that sends messages to a JMS queue and to a JMS topic which
    > are both bound to different MDBs. I am using 2 different XA connection
    > factories to send to the queue and topic and am using an XA JDBC driver
    > (weblogic's xa oracle driver). I have also configured the connection
    > factories to be XA Connection Factory enabled. The problem I'm having is
    > that the MDB's are receiving the message before my primary transaction
    > fails. To replicate the transaction failure, I through a EJBException in
    > the SLSB method after having sent my messages to the queue. The data is not
    > stored in the db (which the SLSB does prior to sending the JMS messages) but
    > I can see the MDB's get invoked before the SLSB method completes. The SLSB
    > is set to transaction required and the two MDBs are set to container managed
    > transactions and Transaction required.
    >
    > If anyone has any other ideas of what to look for, I'd greatly appreciate
    > your help.
    >
    > Thanks,
    > Gary
    >
    >



  3. Re: JMS queue sender not joining transaction

    Tom -

    Thanks so much for your response. I was indeed using a transacted session
    in my queue sender.
    Changing that fixed my problem!

    Thanks again and have a good weekend.

    Gary





+ Reply to Thread