activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jan Gerritsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections
Date Tue, 26 Jun 2012 11:50:43 GMT

     [ https://issues.apache.org/jira/browse/AMQ-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jan Gerritsen updated AMQ-3899:
--------------------------------------

    Description: 
The ActiveMQXAConnectionFactory has a method: QueueConnection createQueueConnection(). This
method returns an instance of ActiveMQXAConnection.

This connection cannot handle transacted sessions:
{code}
@Test
public void create_message_producer_and_send() throws Exception {
	QueueSession queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
	MessageProducer producer = queueSession.createProducer(queueSession.createQueue(queueName));
	BytesMessage jmsMessage = queueSession.createBytesMessage();
	jmsMessage.writeBytes("Hello world".getBytes());
	producer.send(jmsMessage);
	queueSession.commit(); // --> fail with TransactionInProgressException
}
{code}

  was:
The ActiveMQXAConnectionFactory has a method: QueueConnection createQueueConnection(). This
method returns an instance of ActiveMQXAConnection.

This connection cannot handle transacted sessions:
{code}
	@Test
	public void create_message_producer_and_send() throws Exception {
		QueueSession queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
		MessageProducer producer = queueSession.createProducer(queueSession.createQueue(queueName));
		BytesMessage jmsMessage = queueSession.createBytesMessage();
		jmsMessage.writeBytes("Hello world".getBytes());
		producer.send(jmsMessage);
		queueSession.commit(); // --> fail with TransactionInProgressException
	}
{code}

    
> XAQueueConnectionFactory is not able to create normal QueueConnections
> ----------------------------------------------------------------------
>
>                 Key: AMQ-3899
>                 URL: https://issues.apache.org/jira/browse/AMQ-3899
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.6.0
>            Reporter: Willem Jan Gerritsen
>
> The ActiveMQXAConnectionFactory has a method: QueueConnection createQueueConnection().
This method returns an instance of ActiveMQXAConnection.
> This connection cannot handle transacted sessions:
> {code}
> @Test
> public void create_message_producer_and_send() throws Exception {
> 	QueueSession queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
> 	MessageProducer producer = queueSession.createProducer(queueSession.createQueue(queueName));
> 	BytesMessage jmsMessage = queueSession.createBytesMessage();
> 	jmsMessage.writeBytes("Hello world".getBytes());
> 	producer.send(jmsMessage);
> 	queueSession.commit(); // --> fail with TransactionInProgressException
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message