m***@gmail.com
2006-11-29 13:18:34 UTC
I am getting the following error when I try to access a message through JMS call, I am making this call from commerce command and not from MDB, I don't have any database operations in the method, that is I am not connecting to database. I am just getting the connection factory using JNDI and Queue.
When I invoke QueueReciver.receive() method I am getting this error. My Configuration to connection and Queue is not enabled with XA. Any hlep to fix this problem, really appreciated.
The Code Snippet is as follows
ic = new InitialContext();
QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup(jndiQMgr);
QueueConnection qc = qcf.createQueueConnection();
//qc.start();
QueueSession qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue)ic.lookup(jndiQName);
QueueReceiver queueReceiver = qs.createReceiver(q);
System.out.println( "QUEUE NAME "+q.getQueueName());
qc.start();
Message m = queueReceiver.receive();
This is the Error
WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
Thks
C
When I invoke QueueReciver.receive() method I am getting this error. My Configuration to connection and Queue is not enabled with XA. Any hlep to fix this problem, really appreciated.
The Code Snippet is as follows
ic = new InitialContext();
QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup(jndiQMgr);
QueueConnection qc = qcf.createQueueConnection();
//qc.start();
QueueSession qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue)ic.lookup(jndiQName);
QueueReceiver queueReceiver = qs.createReceiver(q);
System.out.println( "QUEUE NAME "+q.getQueueName());
qc.start();
Message m = queueReceiver.receive();
This is the Error
WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
Thks
C