Re: Attempt to resume transactions??? - Weblogic

This is a discussion on Re: Attempt to resume transactions??? - Weblogic ; A JMS transacted session uses an internal transaction that has nothing to do with the JDBC driver used by the EJB or the JDBC driver used by a JMS JDBC persistent store. Please make sure that your app is committing ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: Attempt to resume transactions???

  1. Re: Attempt to resume transactions???

    A JMS transacted session uses an internal
    transaction that has nothing to do with the JDBC driver used
    by the EJB or the JDBC driver used by a JMS JDBC persistent
    store.

    Please make sure that your app is committing the JMS
    transaction by calling "javax.jms.Session.commit()".
    If this doesn't help, could you post the full stack trace,
    version, and service-pack please?

    Tom

    Shiva P wrote:
    > Hi,
    > I am on weblogic 7.0 sp2, jdk1.3.1, solaris 8. Once in a while we keep
    > getting this exception
    >
    > weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    > inactiv
    > e transaction: 3:0962c50fde2214da:error resuming transacted session's
    > internal t
    > ransactionid
    >
    > This happens when an EJB tries to send a JMS message. My transactional
    > driver is configured something like this:
    >
    > > EnableTwoPhaseCommit="true" Name="gazooDataSource" PoolName="gazooPool"
    > Targets="tcluster"/>
    >
    > Bouncing the whole application server takes away the problem and then
    > after sometime it manifests again.
    >
    > Any help would be appreciated.
    >
    > Thanks,
    > Shiva.
    >
    >
    >
    >
    >



  2. Re: Attempt to resume transactions???

    So if I have an EJB that does a database operation and also send a JMS message
    to a queue, then how do we ensure that the JMS receiver sees the data in the
    database? It could happen that the EJB would not commit data to the database
    but the JMS message could be sent right away. The message receiver will not
    find the data in the database and things could go wrong.
    I shall try the session commit. In any case we are on 7.0 SP2 and here is the
    full stack trace.

    weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    inactive transaction: 3:80dca889de2214da:error resuming transacted session's
    internal transactionid= cannot send object
    info=
    isLogged=falsecom.gazoo.core.infrastructure.util.W riteException: cannot send
    object

    at
    com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:387)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)

    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)

    at
    com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceIm

    l.java:104)
    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    at
    com.gazoo.core.workflow.flow.ProcessFlowBase.setPr ocessState(ProcessFlowBase.java:785)

    at
    com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leSuccessfulResponseTemplateMethod(ProcessFlowLogi c.java:859)

    at
    com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leResponse(ProcessFlowLogic.java:219)

    at
    com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leResponse(ProcessFlowLogic.java:196)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:675)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:483)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.handleR esponse(ProcessLogic.java:1102)

    at
    com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.handleResponse(ProcessBean_3c8y4f_EOImpl.jav a:2589)

    at
    com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleIMResponseCollection(WfInternalMessageH andler.java:352)

    at
    com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleInternalMessage(WfInternalMessageHandle r.java:613)

    at
    com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleInternalMessageSynchronously(WfInternal MessageHandler.java:237)

    at
    com.gazoo.core.workflow.logic.StateTransitionBean. handleInternalMessageSynchronously(StateTransition Bean.java:530)

    at
    com.gazoo.core.workflow.logic.StateTransitionBean_ qrrmbq_EOImpl.handleInternalMessageSynchronously(S tateTransitionBean_qrrmbq_EOImpl.java:802)

    at
    com.gazoo.core.workflow.ProcessHandler.handleInter nalMessage(ProcessHandler.java:112)

    at com.gazoo.core.workflow.ProcessHandler.run(Process Handler.java:203)

    at
    com.gazoo.core.workflow.WfEngine$WfEngineTask.hand leTopicMessage(WfEngine.java:474)

    at
    com.gazoo.core.workflow.WfEngine$WfEngineTask.hand leQueueMessage(WfEngine.java:439)

    at
    com.gazoo.core.workflow.WfEngine$WfEngineTask.run( WfEngine.java:411)
    at
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(PooledExecutor.java:716)

    at java.lang.Thread.run(Thread.java:479)
    Underlying exception:
    weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    inactive transaction: 3:80dca889de2214da:error resuming transacted session's
    internal transaction
    at
    weblogic.jms.frontend.FESession.transactedExceptio n(FESession.java:1633)
    at
    weblogic.jms.frontend.FESession.throwTransactedExc eption(FESession.java:1645)
    at
    weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1720)
    at weblogic.jms.frontend.FEProducer.send(FEProducer.j ava:429)
    at weblogic.jms.frontend.FEProducer.invoke(FEProducer .java:534)
    at
    weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:602)
    at
    weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cNoTran(DispatcherImpl.java:335)

    at weblogic.jms.client.JMSProducer._send(JMSProducer. java:338)
    at weblogic.jms.client.JMSProducer.send(JMSProducer.j ava:172)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:449)
    at
    com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:385)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)

    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)

    at
    com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:104)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:1971)

    at
    com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.changeState(ProcessBean_3c8y4f_EOImpl.java:7 307)

    at
    com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.activation.ActivatableServer Ref.invoke(ActivatableServerRef.java:87)

    at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:313)

    at
    weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:821)

    at
    weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:308)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)

    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:189)
    ----------- Linked Exception -----------
    javax.transaction.InvalidTransactionException: Attempt to resume an inactive
    transaction: 3:80dca889de2214da
    at
    weblogic.transaction.internal.TransactionManagerIm pl.resume(TransactionManagerImpl.java:357)

    at
    weblogic.transaction.internal.ServerTransactionMan agerImpl.resume(ServerTransactionManagerImpl.java: 304)

    at
    weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1684)
    at weblogic.jms.frontend.FEProducer.send(FEProducer.j ava:429)
    at weblogic.jms.frontend.FEProducer.invoke(FEProducer .java:534)
    at
    weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:602)
    at
    weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cNoTran(DispatcherImpl.java:335)

    at weblogic.jms.client.JMSProducer._send(JMSProducer. java:338)
    at weblogic.jms.client.JMSProducer.send(JMSProducer.j ava:172)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:449)
    at
    com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:385)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    at
    com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)

    at
    com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)

    at
    com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:104)

    at
    com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)

    at
    com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    at
    com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:1971)

    at
    com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.changeState(ProcessBean_3c8y4f_EOImpl.java:7 307)

    at
    com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.activation.ActivatableServer Ref.invoke(ActivatableServerRef.java:87)

    at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:313)

    at
    weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:821)

    at
    weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:308)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)

    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:189)


    Shiva.

    Tom Barnes wrote:

    > A JMS transacted session uses an internal
    > transaction that has nothing to do with the JDBC driver used
    > by the EJB or the JDBC driver used by a JMS JDBC persistent
    > store.
    >
    > Please make sure that your app is committing the JMS
    > transaction by calling "javax.jms.Session.commit()".
    > If this doesn't help, could you post the full stack trace,
    > version, and service-pack please?
    >
    > Tom
    >
    > Shiva P wrote:
    > > Hi,
    > > I am on weblogic 7.0 sp2, jdk1.3.1, solaris 8. Once in a while we keep
    > > getting this exception
    > >
    > > weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    > > inactiv
    > > e transaction: 3:0962c50fde2214da:error resuming transacted session's
    > > internal t
    > > ransactionid
    > >
    > > This happens when an EJB tries to send a JMS message. My transactional
    > > driver is configured something like this:
    > >
    > > > > EnableTwoPhaseCommit="true" Name="gazooDataSource" PoolName="gazooPool"
    > > Targets="tcluster"/>
    > >
    > > Bouncing the whole application server takes away the problem and then
    > > after sometime it manifests again.
    > >
    > > Any help would be appreciated.
    > >
    > > Thanks,
    > > Shiva.
    > >
    > >
    > >
    > >
    > >



  3. Re: Attempt to resume transactions???

    I have one more question. Why is that if the JMS sender is in a transacted
    session then the receiver also needs to be in a transacted session? I couldn't
    find this in the spec anywhere. Hope I did not miss something important. My
    senders and receivers are asynchronous. I am attaching two examples showing
    the same. Any help would be greatly appreciated.

    Shiva.

    Tom Barnes wrote:

    > A JMS transacted session uses an internal
    > transaction that has nothing to do with the JDBC driver used
    > by the EJB or the JDBC driver used by a JMS JDBC persistent
    > store.
    >
    > Please make sure that your app is committing the JMS
    > transaction by calling "javax.jms.Session.commit()".
    > If this doesn't help, could you post the full stack trace,
    > version, and service-pack please?
    >
    > Tom
    >
    > Shiva P wrote:
    > > Hi,
    > > I am on weblogic 7.0 sp2, jdk1.3.1, solaris 8. Once in a while we keep
    > > getting this exception
    > >
    > > weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    > > inactiv
    > > e transaction: 3:0962c50fde2214da:error resuming transacted session's
    > > internal t
    > > ransactionid
    > >
    > > This happens when an EJB tries to send a JMS message. My transactional
    > > driver is configured something like this:
    > >
    > > > > EnableTwoPhaseCommit="true" Name="gazooDataSource" PoolName="gazooPool"
    > > Targets="tcluster"/>
    > >
    > > Bouncing the whole application server takes away the problem and then
    > > after sometime it manifests again.
    > >
    > > Any help would be appreciated.
    > >
    > > Thanks,
    > > Shiva.
    > >
    > >
    > >
    > >
    > >


    //package examples.jms.queue;

    import java.io.*;
    import java.util.*;
    import javax.jts.*;
    import javax.naming.*;
    import javax.jms.*;

    /**
    * This example shows how to establish a connection to a JMS
    * queue and receive messages from a queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received and to browse the queue
    * for messages. This class is used to receive and remove messages
    * from the queue.
    *
    * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    */
    public class QueueReceive
    implements MessageListener, ExceptionListener
    {
    public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    public final static String JMS_FACTORY="weblogic.jms.ConnectionFactory";
    public final static String QUEUE="javax.jms.asyncWorkflowQueue";
    private static String serverUrl = null;

    private QueueConnectionFactory qconFactory;
    private QueueConnection qcon;
    private QueueSession qsession;
    private QueueReceiver qreceiver;
    private Queue queue;
    private boolean quit = false;

    public void onException(JMSException exception) {
    System.out.println("Exception has occurred in connection to JMS");
    exception.printStackTrace();
    InitialContext ic = reConnect();
    boolean serverStatus = true;
    while(serverStatus) {
    try {
    init(ic, QUEUE);
    serverStatus = false;
    } catch(Exception ne) {
    System.out.println("Into exception");
    }
    }
    }

    private InitialContext reConnect() {
    while(true) {
    try {
    InitialContext ic = getInitialContext();
    return ic;
    } catch(Exception e) {
    System.out.println("Exception while reconnecting: " + e);
    }
    }
    }


    // MessageListener interface
    public void onMessage(Message msg)
    {
    try {
    String msgText;
    if (msg instanceof TextMessage) {
    msgText = ((TextMessage)msg).getText();
    } else {
    msgText = msg.toString();
    }

    System.out.println("Message Received: "+ msgText );
    } catch(Exception e) {
    e.printStackTrace();
    }
    }

    /**
    * Create all the necessary objects for receiving
    * messages from a JMS queue.
    */
    public void init(Context ctx, String queueName)
    throws NamingException, JMSException
    {
    qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    qcon = qconFactory.createQueueConnection();
    qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    //qsession.setExceptionListener(this);
    try {
    queue = (Queue) ctx.lookup(queueName);
    } catch (NamingException ne) {
    queue = qsession.createQueue(queueName);
    ctx.bind(queueName, queue);
    }
    qreceiver = qsession.createReceiver(queue);
    qreceiver.setMessageListener(this);
    qcon.setExceptionListener(this);
    qcon.start();
    }

    /**
    * Close JMS objects.
    */
    public void close()
    throws JMSException
    {
    qreceiver.close();
    qsession.close();
    qcon.close();
    }


    public static void main(String[] args)
    throws Exception
    {
    if (args.length != 1) {
    System.out.println("Usage: java examples.jms.queue.QueueReceive WebLogicURL");
    return;
    }
    serverUrl = args[0];
    InitialContext ic = getInitialContext();
    QueueReceive qr = new QueueReceive();
    qr.init(ic, QUEUE);

    System.out.println("JMS Ready To Receive Messages (To quit, send a \"quit\" message).");
    while(true);

    }

    private static InitialContext getInitialContext()
    throws NamingException
    {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, serverUrl);
    return new InitialContext(env);
    }

    }





    //package examples.jms.queue;

    import java.io.*;
    import java.util.*;
    import javax.jts.*;
    import javax.naming.*;
    import javax.jms.*;

    /** This example shows how to establish a connection to a JMS queue,
    * and send messages to the queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received and to browse the queue
    * for messages. The class is used to send messages to the queue.
    *
    * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    */
    public class QueueSend implements ExceptionListener
    {
    public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    public final static String JMS_FACTORY="weblogic.jms.ConnectionFactory";
    public final static String QUEUE="javax.jms.asyncWorkflowQueue";
    private static String serverUrl = null;

    private QueueConnectionFactory qconFactory;
    private QueueConnection qcon;
    private QueueSession qsession;
    private QueueSender qsender;
    private Queue queue;
    private TextMessage msg;

    public void onException(JMSException exception) {
    System.out.println("Exception has occurred in connection to JMS");
    exception.printStackTrace();
    InitialContext ic = reConnect();
    boolean serverStatus = true;
    while(serverStatus) {
    try {
    init(ic, QUEUE);
    serverStatus = false;
    } catch(Throwable ne) {
    System.out.println("into exception");
    }
    }
    }

    private InitialContext reConnect() {
    while(true) {
    try {
    InitialContext ic = getInitialContext();
    return ic;
    } catch(Exception e) {
    System.out.println("Exception while reconnecting: " + e);
    }
    }
    }
    /**
    * Create all the necessary objects for sending
    * messages to a JMS queue.
    */
    public void init(Context ctx, String queueName)
    throws NamingException, JMSException
    {
    qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    qcon = qconFactory.createQueueConnection();
    qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    try {
    queue = (Queue) ctx.lookup(queueName);
    } catch (NamingException ne) {
    queue = qsession.createQueue(queueName);
    ctx.bind(queueName, queue);
    }
    qsender = qsession.createSender(queue);
    msg = qsession.createTextMessage();
    qcon.setExceptionListener(this);
    qcon.start();
    }

    /**
    * Send a message to a JMS queue.
    */
    public void send(String message)
    throws JMSException
    {
    msg.setText(message);
    qsender.send(msg); //-- commented by Shiva.
    //qsender.send(msg, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, 5*1000);
    }

    /**
    * Close JMS objects.
    */
    public void close()
    throws JMSException
    {
    qsender.close();
    qsession.close();
    qcon.close();
    }


    public static void main(String[] args)
    throws Exception
    {
    if (args.length != 1) {
    System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
    return;
    }
    serverUrl = args[0];
    InitialContext ic = getInitialContext();
    QueueSend qs = new QueueSend();
    qs.init(ic, QUEUE);
    readAndSend(qs);
    //qs.send("h1");
    //qs.send("h2");
    //qs.send("h3");
    qs.close();
    }

    private static void readAndSend(QueueSend qs)
    throws IOException, JMSException
    {
    BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
    String line=null;
    boolean quitNow = false;
    while(true) {
    System.out.print("Enter message: ");
    line = msgStream.readLine();
    if (line != null && line.trim().length() != 0) {
    try {
    qs.send(line);
    } catch(Exception e) {
    qs.onException(new JMSException("Forced reconnect"));
    qs.send(line);
    }
    System.out.println("JMS Message Sent: "+line+"\n");
    }
    }

    }

    private static InitialContext getInitialContext()
    throws NamingException
    {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, serverUrl);
    return new InitialContext(env);
    }

    }



  4. Re: Attempt to resume transactions???

    My bad. Please neglect this.

    Shiva.

    Shiva P wrote:

    > I have one more question. Why is that if the JMS sender is in a transacted
    > session then the receiver also needs to be in a transacted session? I couldn't
    > find this in the spec anywhere. Hope I did not miss something important. My
    > senders and receivers are asynchronous. I am attaching two examples showing
    > the same. Any help would be greatly appreciated.
    >
    > Shiva.
    >
    > Tom Barnes wrote:
    >
    > > A JMS transacted session uses an internal
    > > transaction that has nothing to do with the JDBC driver used
    > > by the EJB or the JDBC driver used by a JMS JDBC persistent
    > > store.
    > >
    > > Please make sure that your app is committing the JMS
    > > transaction by calling "javax.jms.Session.commit()".
    > > If this doesn't help, could you post the full stack trace,
    > > version, and service-pack please?
    > >
    > > Tom
    > >
    > > Shiva P wrote:
    > > > Hi,
    > > > I am on weblogic 7.0 sp2, jdk1.3.1, solaris 8. Once in a while we keep
    > > > getting this exception
    > > >
    > > > weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    > > > inactiv
    > > > e transaction: 3:0962c50fde2214da:error resuming transacted session's
    > > > internal t
    > > > ransactionid
    > > >
    > > > This happens when an EJB tries to send a JMS message. My transactional
    > > > driver is configured something like this:
    > > >
    > > > > > > EnableTwoPhaseCommit="true" Name="gazooDataSource" PoolName="gazooPool"
    > > > Targets="tcluster"/>
    > > >
    > > > Bouncing the whole application server takes away the problem and then
    > > > after sometime it manifests again.
    > > >
    > > > Any help would be appreciated.
    > > >
    > > > Thanks,
    > > > Shiva.
    > > >
    > > >
    > > >
    > > >
    > > >

    >
    > ------------------------------------------------------------------------
    > //package examples.jms.queue;
    >
    > import java.io.*;
    > import java.util.*;
    > import javax.jts.*;
    > import javax.naming.*;
    > import javax.jms.*;
    >
    > /**
    > * This example shows how to establish a connection to a JMS
    > * queue and receive messages from a queue. The classes in this
    > * package operate on the same JMS queue. Run the classes together to
    > * witness messages being sent and received and to browse the queue
    > * for messages. This class is used to receive and remove messages
    > * from the queue.
    > *
    > * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    > */
    > public class QueueReceive
    > implements MessageListener, ExceptionListener
    > {
    > public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    > public final static String JMS_FACTORY="weblogic.jms.ConnectionFactory";
    > public final static String QUEUE="javax.jms.asyncWorkflowQueue";
    > private static String serverUrl = null;
    >
    > private QueueConnectionFactory qconFactory;
    > private QueueConnection qcon;
    > private QueueSession qsession;
    > private QueueReceiver qreceiver;
    > private Queue queue;
    > private boolean quit = false;
    >
    > public void onException(JMSException exception) {
    > System.out.println("Exception has occurred in connection to JMS");
    > exception.printStackTrace();
    > InitialContext ic = reConnect();
    > boolean serverStatus = true;
    > while(serverStatus) {
    > try {
    > init(ic, QUEUE);
    > serverStatus = false;
    > } catch(Exception ne) {
    > System.out.println("Into exception");
    > }
    > }
    > }
    >
    > private InitialContext reConnect() {
    > while(true) {
    > try {
    > InitialContext ic = getInitialContext();
    > return ic;
    > } catch(Exception e) {
    > System.out.println("Exception while reconnecting: " + e);
    > }
    > }
    > }
    >
    > // MessageListener interface
    > public void onMessage(Message msg)
    > {
    > try {
    > String msgText;
    > if (msg instanceof TextMessage) {
    > msgText = ((TextMessage)msg).getText();
    > } else {
    > msgText = msg.toString();
    > }
    >
    > System.out.println("Message Received: "+ msgText );
    > } catch(Exception e) {
    > e.printStackTrace();
    > }
    > }
    >
    > /**
    > * Create all the necessary objects for receiving
    > * messages from a JMS queue.
    > */
    > public void init(Context ctx, String queueName)
    > throws NamingException, JMSException
    > {
    > qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    > qcon = qconFactory.createQueueConnection();
    > qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    > //qsession.setExceptionListener(this);
    > try {
    > queue = (Queue) ctx.lookup(queueName);
    > } catch (NamingException ne) {
    > queue = qsession.createQueue(queueName);
    > ctx.bind(queueName, queue);
    > }
    > qreceiver = qsession.createReceiver(queue);
    > qreceiver.setMessageListener(this);
    > qcon.setExceptionListener(this);
    > qcon.start();
    > }
    >
    > /**
    > * Close JMS objects.
    > */
    > public void close()
    > throws JMSException
    > {
    > qreceiver.close();
    > qsession.close();
    > qcon.close();
    > }
    >
    > public static void main(String[] args)
    > throws Exception
    > {
    > if (args.length != 1) {
    > System.out.println("Usage: java examples.jms.queue.QueueReceive WebLogicURL");
    > return;
    > }
    > serverUrl = args[0];
    > InitialContext ic = getInitialContext();
    > QueueReceive qr = new QueueReceive();
    > qr.init(ic, QUEUE);
    >
    > System.out.println("JMS Ready To Receive Messages (To quit, send a \"quit\" message).");
    > while(true);
    >
    > }
    >
    > private static InitialContext getInitialContext()
    > throws NamingException
    > {
    > Hashtable env = new Hashtable();
    > env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    > env.put(Context.PROVIDER_URL, serverUrl);
    > return new InitialContext(env);
    > }
    >
    > }
    >
    > ------------------------------------------------------------------------
    > //package examples.jms.queue;
    >
    > import java.io.*;
    > import java.util.*;
    > import javax.jts.*;
    > import javax.naming.*;
    > import javax.jms.*;
    >
    > /** This example shows how to establish a connection to a JMS queue,
    > * and send messages to the queue. The classes in this
    > * package operate on the same JMS queue. Run the classes together to
    > * witness messages being sent and received and to browse the queue
    > * for messages. The class is used to send messages to the queue.
    > *
    > * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    > */
    > public class QueueSend implements ExceptionListener
    > {
    > public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    > public final static String JMS_FACTORY="weblogic.jms.ConnectionFactory";
    > public final static String QUEUE="javax.jms.asyncWorkflowQueue";
    > private static String serverUrl = null;
    >
    > private QueueConnectionFactory qconFactory;
    > private QueueConnection qcon;
    > private QueueSession qsession;
    > private QueueSender qsender;
    > private Queue queue;
    > private TextMessage msg;
    >
    > public void onException(JMSException exception) {
    > System.out.println("Exception has occurred in connection to JMS");
    > exception.printStackTrace();
    > InitialContext ic = reConnect();
    > boolean serverStatus = true;
    > while(serverStatus) {
    > try {
    > init(ic, QUEUE);
    > serverStatus = false;
    > } catch(Throwable ne) {
    > System.out.println("into exception");
    > }
    > }
    > }
    >
    > private InitialContext reConnect() {
    > while(true) {
    > try {
    > InitialContext ic = getInitialContext();
    > return ic;
    > } catch(Exception e) {
    > System.out.println("Exception while reconnecting: " + e);
    > }
    > }
    > }
    > /**
    > * Create all the necessary objects for sending
    > * messages to a JMS queue.
    > */
    > public void init(Context ctx, String queueName)
    > throws NamingException, JMSException
    > {
    > qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
    > qcon = qconFactory.createQueueConnection();
    > qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    > try {
    > queue = (Queue) ctx.lookup(queueName);
    > } catch (NamingException ne) {
    > queue = qsession.createQueue(queueName);
    > ctx.bind(queueName, queue);
    > }
    > qsender = qsession.createSender(queue);
    > msg = qsession.createTextMessage();
    > qcon.setExceptionListener(this);
    > qcon.start();
    > }
    >
    > /**
    > * Send a message to a JMS queue.
    > */
    > public void send(String message)
    > throws JMSException
    > {
    > msg.setText(message);
    > qsender.send(msg); //-- commented by Shiva.
    > //qsender.send(msg, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, 5*1000);
    > }
    >
    > /**
    > * Close JMS objects.
    > */
    > public void close()
    > throws JMSException
    > {
    > qsender.close();
    > qsession.close();
    > qcon.close();
    > }
    >
    > public static void main(String[] args)
    > throws Exception
    > {
    > if (args.length != 1) {
    > System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
    > return;
    > }
    > serverUrl = args[0];
    > InitialContext ic = getInitialContext();
    > QueueSend qs = new QueueSend();
    > qs.init(ic, QUEUE);
    > readAndSend(qs);
    > //qs.send("h1");
    > //qs.send("h2");
    > //qs.send("h3");
    > qs.close();
    > }
    >
    > private static void readAndSend(QueueSend qs)
    > throws IOException, JMSException
    > {
    > BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
    > String line=null;
    > boolean quitNow = false;
    > while(true) {
    > System.out.print("Enter message: ");
    > line = msgStream.readLine();
    > if (line != null && line.trim().length() != 0) {
    > try {
    > qs.send(line);
    > } catch(Exception e) {
    > qs.onException(new JMSException("Forced reconnect"));
    > qs.send(line);
    > }
    > System.out.println("JMS Message Sent: "+line+"\n");
    > }
    > }
    >
    > }
    >
    > private static InitialContext getInitialContext()
    > throws NamingException
    > {
    > Hashtable env = new Hashtable();
    > env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    > env.put(Context.PROVIDER_URL, serverUrl);
    > return new InitialContext(env);
    > }
    >
    > }



  5. Re: Attempt to resume transactions???



    Shiva P wrote:
    > I guess I figured out the solution. The way would be to make the connection factory support user transactions and use non-transacted session. Hope
    > I am right.


    Exactly right. For more information,
    the JMS FAQ and the JMS Performance Guide white-paper, and
    JMS Programmer's guide doc all contain sections that describe
    the difference between "User Transaction Aware" JMS
    sessions and "Transacted" JMS sessions.

    Tom

    > Also, neglect the exception as I fixed it. Thanks for your help.
    >
    > Shiva.
    >
    > Shiva P wrote:
    >
    >
    >>So if I have an EJB that does a database operation and also send a JMS message
    >>to a queue, then how do we ensure that the JMS receiver sees the data in the
    >>database? It could happen that the EJB would not commit data to the database
    >>but the JMS message could be sent right away. The message receiver will not
    >>find the data in the database and things could go wrong.
    >>I shall try the session commit. In any case we are on 7.0 SP2 and here is the
    >>full stack trace.
    >>
    >>weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    >>inactive transaction: 3:80dca889de2214da:error resuming transacted session's
    >>internal transactionid= cannot send object
    >>info=
    >>isLogged=falsecom.gazoo.core.infrastructure.util.W riteException: cannot send
    >>object
    >>
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:387)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceIm
    >>
    >>l.java:104)
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    >> at
    >>com.gazoo.core.workflow.flow.ProcessFlowBase.setPr ocessState(ProcessFlowBase.java:785)
    >>
    >> at
    >>com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leSuccessfulResponseTemplateMethod(ProcessFlowLogi c.java:859)
    >>
    >> at
    >>com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leResponse(ProcessFlowLogic.java:219)
    >>
    >> at
    >>com.gazoo.core.workflow.flow.ProcessFlowLogic.hand leResponse(ProcessFlowLogic.java:196)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:675)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:483)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.handleR esponse(ProcessLogic.java:1102)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.handleResponse(ProcessBean_3c8y4f_EOImpl.jav a:2589)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleIMResponseCollection(WfInternalMessageH andler.java:352)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleInternalMessage(WfInternalMessageHandle r.java:613)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.WfInternalMessageHan dler.handleInternalMessageSynchronously(WfInternal MessageHandler.java:237)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.StateTransitionBean. handleInternalMessageSynchronously(StateTransition Bean.java:530)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.StateTransitionBean_ qrrmbq_EOImpl.handleInternalMessageSynchronously(S tateTransitionBean_qrrmbq_EOImpl.java:802)
    >>
    >> at
    >>com.gazoo.core.workflow.ProcessHandler.handleInter nalMessage(ProcessHandler.java:112)
    >>
    >> at com.gazoo.core.workflow.ProcessHandler.run(Process Handler.java:203)
    >>
    >> at
    >>com.gazoo.core.workflow.WfEngine$WfEngineTask.hand leTopicMessage(WfEngine.java:474)
    >>
    >> at
    >>com.gazoo.core.workflow.WfEngine$WfEngineTask.hand leQueueMessage(WfEngine.java:439)
    >>
    >> at
    >>com.gazoo.core.workflow.WfEngine$WfEngineTask.run( WfEngine.java:411)
    >> at
    >>EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(PooledExecutor.java:716)
    >>
    >> at java.lang.Thread.run(Thread.java:479)
    >>Underlying exception:
    >>weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    >>inactive transaction: 3:80dca889de2214da:error resuming transacted session's
    >>internal transaction
    >> at
    >>weblogic.jms.frontend.FESession.transactedExceptio n(FESession.java:1633)
    >> at
    >>weblogic.jms.frontend.FESession.throwTransactedExc eption(FESession.java:1645)
    >> at
    >>weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1720)
    >> at weblogic.jms.frontend.FEProducer.send(FEProducer.j ava:429)
    >> at weblogic.jms.frontend.FEProducer.invoke(FEProducer .java:534)
    >> at
    >>weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:602)
    >> at
    >>weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cNoTran(DispatcherImpl.java:335)
    >>
    >> at weblogic.jms.client.JMSProducer._send(JMSProducer. java:338)
    >> at weblogic.jms.client.JMSProducer.send(JMSProducer.j ava:172)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:449)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:385)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:104)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:1971)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.changeState(ProcessBean_3c8y4f_EOImpl.java:7 307)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl_WLSkel.invoke(Unknown
    >>Source)
    >> at
    >>weblogic.rmi.internal.activation.ActivatableServer Ref.invoke(ActivatableServerRef.java:87)
    >>
    >> at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:313)
    >>
    >> at
    >>weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:821)
    >>
    >> at
    >>weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:308)
    >> at
    >>weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)
    >>
    >> at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:213)
    >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:189)
    >>----------- Linked Exception -----------
    >>javax.transaction.InvalidTransactionException: Attempt to resume an inactive
    >>transaction: 3:80dca889de2214da
    >> at
    >>weblogic.transaction.internal.TransactionManagerIm pl.resume(TransactionManagerImpl.java:357)
    >>
    >> at
    >>weblogic.transaction.internal.ServerTransactionMan agerImpl.resume(ServerTransactionManagerImpl.java: 304)
    >>
    >> at
    >>weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1684)
    >> at weblogic.jms.frontend.FEProducer.send(FEProducer.j ava:429)
    >> at weblogic.jms.frontend.FEProducer.invoke(FEProducer .java:534)
    >> at
    >>weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:602)
    >> at
    >>weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cNoTran(DispatcherImpl.java:335)
    >>
    >> at weblogic.jms.client.JMSProducer._send(JMSProducer. java:338)
    >> at weblogic.jms.client.JMSProducer.send(JMSProducer.j ava:172)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:449)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.sendO bject(JMSSender.java:385)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:257)
    >> at
    >>com.gazoo.core.infrastructure.util.JMSSender.send( JMSSender.java:185)
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:841)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.sen dToQueue(ServiceActivator.java:794)
    >>
    >> at
    >>com.gazoo.core.infrastructure.ServiceActivator.wri teToQueue(ServiceActivator.java:352)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:457)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:200)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:104)
    >>
    >> at
    >>com.gazoo.core.infrastructure.JMSInternalServiceIm pl.writeToQueue(JMSInternalServiceImpl.java:78)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.sendWFP rocessStateChangeNotification(ProcessLogic.java:13 49)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.modifyS tate(ProcessLogic.java:372)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:320)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:299)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.setStat e(ProcessLogic.java:288)
    >> at
    >>com.gazoo.core.workflow.logic.ProcessLogic.changeS tate(ProcessLogic.java:1971)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl.changeState(ProcessBean_3c8y4f_EOImpl.java:7 307)
    >>
    >> at
    >>com.gazoo.core.workflow.logic.ProcessBean_3c8y4f_E OImpl_WLSkel.invoke(Unknown
    >>Source)
    >> at
    >>weblogic.rmi.internal.activation.ActivatableServer Ref.invoke(ActivatableServerRef.java:87)
    >>
    >> at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:313)
    >>
    >> at
    >>weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:821)
    >>
    >> at
    >>weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:308)
    >> at
    >>weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)
    >>
    >> at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:213)
    >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:189)
    >>
    >>Shiva.
    >>
    >>Tom Barnes wrote:
    >>
    >>
    >>>A JMS transacted session uses an internal
    >>>transaction that has nothing to do with the JDBC driver used
    >>>by the EJB or the JDBC driver used by a JMS JDBC persistent
    >>>store.
    >>>
    >>>Please make sure that your app is committing the JMS
    >>>transaction by calling "javax.jms.Session.commit()".
    >>>If this doesn't help, could you post the full stack trace,
    >>>version, and service-pack please?
    >>>
    >>>Tom
    >>>
    >>>Shiva P wrote:
    >>>
    >>>>Hi,
    >>>>I am on weblogic 7.0 sp2, jdk1.3.1, solaris 8. Once in a while we keep
    >>>>getting this exception
    >>>>
    >>>>weblogic.jms.common.TransactionRolledBackException : Attempt to resume an
    >>>>inactiv
    >>>>e transaction: 3:0962c50fde2214da:error resuming transacted session's
    >>>>internal t
    >>>>ransactionid
    >>>>
    >>>>This happens when an EJB tries to send a JMS message. My transactional
    >>>>driver is configured something like this:
    >>>>
    >>>> >>>>EnableTwoPhaseCommit="true" Name="gazooDataSource" PoolName="gazooPool"
    >>>>Targets="tcluster"/>
    >>>>
    >>>>Bouncing the whole application server takes away the problem and then
    >>>>after sometime it manifests again.
    >>>>
    >>>>Any help would be appreciated.
    >>>>
    >>>>Thanks,
    >>>>Shiva.
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>

    >



  6. Unhappy Re: Attempt to resume transactions???

    We are getting this issue very often, can i get help in resolving this issue ASAP.

    weblogic.jms.common.TransactionRolledBackException : Attempt to resume an inactive transaction: BEA1-6FB227147FD27D0750FD:error resuming transacted session's
    internal transaction
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:164)
    at weblogic.jms.dispatcher.DispatcherImpl_816_WLStub. dispatchSyncNoTranFuture(Unknown Source)
    at weblogic.jms.dispatcher.DispatcherWrapperState.dis patchSyncNoTran(DispatcherWrapperState.java:472)
    at weblogic.jms.client.JMSSession.receiveMessage(JMSS ession.java:463)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsume r.java:421)
    at oracle.tip.transport.basic.jms.JMSMonitor.processM essages(JMSMonitor.java:520)
    at oracle.tip.transport.basic.jms.JMSMonitor.run(JMSM onitor.java:239)
    Caused by: weblogic.jms.common.TransactionRolledBackException : Attempt to resume an inactive transaction: BEA1-6FB227147FD27D0750FD:error resuming transacted
    session's internal transaction
    at weblogic.jms.frontend.FESession.transactedExceptio n(FESession.java:1860)
    at weblogic.jms.frontend.FESession.throwTransactedExc eption(FESession.java:1871)
    at weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1971)
    at weblogic.jms.frontend.FEConsumer.receive(FEConsume r.java:676)
    at weblogic.jms.frontend.FEConsumer.invoke(FEConsumer .java:871)
    at weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:643)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.java:132)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cNoTranFuture(DispatcherImpl.java:262)
    at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invo ke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:491)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:434)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:429)
    at weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:183)
    Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-6FB227147FD27D0750FD
    at weblogic.transaction.internal.TransactionManagerIm pl.resume(TransactionManagerImpl.java:379)
    at weblogic.transaction.internal.ServerTransactionMan agerImpl.resume(ServerTransactionManagerImpl.java: 333)
    at weblogic.jms.frontend.FESession.transactedInfect(F ESession.java:1916)
    ... 14 more
    2010.09.20 at 13:55:05:424: Thread-17: (DEBUG) Transaction rollaback failed

+ Reply to Thread