-
1. Re: Simple session bean - invalid transaction id
ttimm Jul 25, 2002 7:00 AM (in response to ttimm)Hi
I have found the answer to my own question.
Creating a message EJB does not cause JBoss to create the queue specified in the descriptor-file. However, it does create the JNDI name, which makes it possible to lookup the queue. The problems comes when the QueueSender try to send a message (Invalid transaction id).
Create the Queue in the JBoss descriptor files (JMS-service for 3.0)
Troels -
2. Re: Simple session bean - invalid transaction id
mathew Jul 29, 2002 1:06 AM (in response to ttimm)I am encountering a similar exception while trying to configure XA queue connections. I have already tried adding an mbean for my queue in the jbossmq-service.xml and jms-service.xml but without success.
May I know how you have setup the configurations?
This the the code I used to send my jms message within a stateless session bean.
XAQueueConnectionFactory queueFactory = (XAQueueConnectionFactory) ctx.lookup("java:comp/env/jms/qconn");
Queue que = (Queue) ctx.lookup("queue/q");
XAQueueConnection queueConn =
queueFactory.createXAQueueConnection("guest", "guest");
XAQueueSession session = (XAQueueSession)
queueConn.createXAQueueSession();
if (session.getTransacted()) {
QueueSender sender =
session.getQueueSession().createSender(que);
TextMessage msg = session.createTextMessage();
msg.clearBody();
msg.setText("update");
sender.send(msg);
sender.close();
}
Any help will be greatly appreciated. Thanks. -
3. Re: Simple session bean - invalid transaction id
philc Aug 2, 2002 5:49 PM (in response to ttimm)I have the same problem.
I get a javax.jms.JMSException: Invalid transaction id. when publishing a message to a XA message topic.
javax.jms.JMSException: Invalid transaction id.
at org.jboss.mq.SpyXAResourceManager.addMessage(SpyXAResourceManager.java:71)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:395)
at org.jboss.mq.SpyTopicPublisher.internalPublish(SpyTopicPublisher.java:120)
at org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:68)
at com.brockhousecooper.tw.ejb.beans.MessengerBean.broadcastBeanFieldChanged(MessengerBean.java:138) -
4. Re: Simple session bean - invalid transaction id
kennethc Aug 13, 2002 9:26 AM (in response to ttimm)Hello,
I am also encountering a similar problem. Could you be more specific and outline what changes you made.
Thanks,
Ken.