We just upgraded from 3.2.3 to 3.2.4, and are now getting exceptions when trying to 
send JMS messages.

We're using file-based message persistence, and a point-to-point transacted session.

Here's a snippet of stack trace:

2004.06.29 12:47:55.812 GMT-05:00 DEBUG [org.jboss.mq.server.JMSDestinationManager] 
Exception occured, rolling back transaction:
javax.jms.JMSException: Transacation is not active.
        at org.jboss.mq.pm.Tx.addPostRollbackTask(Tx.java:228)
        at org.jboss.mq.pm.TxManager.addPostRollbackTask(TxManager.java:133)
        at org.jboss.mq.server.BasicQueue.addMessage(BasicQueue.java:344)
        at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:40)
        at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:131)
        at 
org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:402)
        at 
org.jboss.mq.server.JMSDestinationManager.transact(JMSDestinationManager.java:428)
        at 
org.jboss.mq.server.JMSServerInterceptorSupport.transact(JMSServerInterceptorSupport.java:186)
        at 
org.jboss.mq.security.ServerSecurityInterceptor.transact(ServerSecurityInterceptor.java:182)
        at org.jboss.mq.server.TracingInterceptor.transact(TracingInterceptor.java:447)
        at org.jboss.mq.server.JMSServerInvoker.transact(JMSServerInvoker.java:186)
        at 
org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:166)
        at 
org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
        at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
        at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
        at java.lang.Thread.run(Thread.java:534)


Client code runs within a POJO, and looks like:

      try {

         Context context  = ContextFactory.createContext();

         QueueConnectionFactory factory =
            (QueueConnectionFactory) context.lookup(ContextFactory.LMS_JMS);
         QueueConnection  conn = factory.createQueueConnection();
         // since transacted_session=true (transacted mode), the 2nd arg is ignored
         // and the session.commit() is required to delete the recieved message.
         QueueSession  session = conn.createQueueSession(true, 
Session.AUTO_ACKNOWLEDGE);
         Queue queue = (Queue) context.lookup(ContextFactory.EVENT_QUEUE_NAME);
         QueueSender sender = session.createSender(queue);
         conn.start();

         ObjectMessage objMsg = session.createObjectMessage();

         objMsg.setJMSDeliveryMode( deliveryMode );
         objMsg.setObject( this );
         log.debug("send(): Sending event " + getClass().getName() );
         sender.send( objMsg );
         session.commit();  // required to delete the message after recieved
         log.debug("send(): Sent & committed event " + this);

         conn.close();
      } catch ( Exception e ) {
         log.error("send(): Failed to send JMS Message", e);
         throw new RuntimeException("Failed to send JMS Message " + e.getMessage());
      }


Here's what the jbossmq trace looks like before the exception:
2004.06.29 12:47:55.718 GMT-05:00 TRACE [org.jboss.mq.SpyXAResourceManager] Starting 
tx with new xid=-9223372036854775806
2004.06.29 12:47:55.718 GMT-05:00 TRACE [org.jboss.mq.SpySession] New session [EMAIL 
PROTECTED] txid=-9223372036854775806 RUNNING [EMAIL 
PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]
2004.06.29 12:47:55.718 GMT-05:00 TRACE [org.jboss.mq.SpyMessageProducer] New message 
producer [EMAIL PROTECTED] dest=QUEUE.khubEventQueue delivery=persist priority=4 ttl=0 
disableMessageID=false disableTS=false [EMAIL PROTECTED] txid=-9223372036854775806 
RUNNING [EMAIL PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]]
2004.06.29 12:47:55.718 GMT-05:00 TRACE [org.jboss.mq.SpySession] Adding producer 
[EMAIL PROTECTED] dest=QUEUE.khubEventQueue delivery=persist priority=4 ttl=0 
disableMessageID=false disableTS=false [EMAIL PROTECTED] txid=-9223372036854775806 
RUNNING [EMAIL PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]]
2004.06.29 12:47:55.765 GMT-05:00 DEBUG [com.elementk.service.event.Event] send(): 
Sending event com.elementk.lms.khub.sys.email.GenerateEmailEvent
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpyMessageProducer] Sending 
message [EMAIL PROTECTED] dest=QUEUE.khubEventQueue delivery=persist priority=4 ttl=0 
disableMessageID=false disableTS=false [EMAIL PROTECTED] txid=-9223372036854775806 
RUNNING [EMAIL PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]] 
org.jboss.mq.SpyObjectMessage {
Header {
   jmsDestination  : QUEUE.khubEventQueue
   jmsDeliveryMode : 2
   jmsExpiration   : 0
   jmsPriority     : 4
   jmsMessageID    : ID:5-10885312757651
   jmsTimeStamp    : 1088531275765
   jmsCorrelationID: null
   jmsReplyTo      : null
   jmsType         : null
   jmsRedelivered  : false
   jmsProperties   : {}
   jmsPropReadWrite: true
   msgReadOnly     : false
   producerClientId: ID:5
}
}
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpySession] Adding message to 
transaction ID:5-10885312757651 [EMAIL PROTECTED] txid=-9223372036854775806 RUNNING 
[EMAIL PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpyXAResourceManager] Adding 
message xid=-9223372036854775806, message=ID:5-10885312757651
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpyXAResourceManager] 
TXState=TxState txState=0 sent=[] acks=[]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpySession] Committing 
transaction [EMAIL PROTECTED] txid=-9223372036854775806 RUNNING [EMAIL 
PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpyXAResourceManager] Ending 
xid=-9223372036854775806, success=true
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.SpyXAResourceManager] Commiting 
xid=-9223372036854775806, onePhase=true
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.Connection] Transact [EMAIL 
PROTECTED] [EMAIL PROTECTED]:ID:5/dda5f260f66ada4628aca68dbcac1da9 rcvstate=STARTED]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.il.uil2.SocketManager] Begin 
internalSendMessage, round-trip 
msg=org.jboss.mq.il.uil2.msgs.TransactMsg27787679[msgType: m_transact, msgID: 
-2147483588, error: null]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.il.uil2.SocketManager] Write 
msg: org.jboss.mq.il.uil2.msgs.TransactMsg27787679[msgType: m_transact, msgID: 
-2147483588, error: null]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.il.uil2.SocketManager] Read 
msgType: m_transact, msgID: -2147483588
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.il.uil2.SocketManager] Read new 
msg: org.jboss.mq.il.uil2.msgs.TransactMsg16938957[msgType: m_transact, msgID: 
-2147483588, error: null]
2004.06.29 12:47:55.765 GMT-05:00 TRACE 
[org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 17
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.server.TracingInterceptor] 
CALLED : transact
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.server.TracingInterceptor] ARG   
 : [EMAIL PROTECTED]
2004.06.29 12:47:55.765 GMT-05:00 TRACE [org.jboss.mq.security.SecurityManager] 
Checking authorize on subjectInfo: SubjectInfo {subject=Subject:
        Principal: guest
        Principal: Roles(members:guest)
;principal=null;roles=Roles(members:guest) for rolePrincipals [guest]                  
                                                                                       
                                           2004.06.29 12:47:55.812 GMT-05:00 TRACE 
[org.jboss.mq.server.BasicQueue] addMessage 1 msg=0 hard NOT_STORED PERSISTENT [EMAIL 
PROTECTED] queue=QUEUE.khubEventQueue priority=4 lateClone=false hashCode=1222210 
-9223372036854775806 [EMAIL PROTECTED]

Any ideas would be helpful.

Thanks,

James


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840333#3840333

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840333


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to