You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Willem Jan Gerritsen (JIRA)" <ji...@apache.org> on 2012/06/26 13:50:43 UTC

[jira] [Created] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Willem Jan Gerritsen created AMQ-3899:
-----------------------------------------

             Summary: 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

        

[jira] [Closed] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQ-3899.
-----------------------------

    Resolution: Won't Fix

The factory is working as designed, you need to use a non-XA factory to make use of local transactions. 
                
> 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 {
> 	XAQueueConnectionFactory xaqueueConnectionFactory = (XAQueueConnectionFactory) jmsContext.lookup(JMSProvider.XA_QUEUE_CONNECTION_FACTORY);
> 	queueConnection = queueConnectionFactory.createQueueConnection();
> 	queueConnection.start();
> 	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}
> Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

--
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

        

[jira] [Updated] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Posted by "Willem Jan Gerritsen (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Commented] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402229#comment-13402229 ] 

Timothy Bish commented on AMQ-3899:
-----------------------------------

The XA variants create XA aware Connections, for local transactions you need to use the Non-XA versions of ConnectionFactory. 
                
> 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 {
> 	XAQueueConnectionFactory xaqueueConnectionFactory = (XAQueueConnectionFactory) jmsContext.lookup(JMSProvider.XA_QUEUE_CONNECTION_FACTORY);
> 	queueConnection = queueConnectionFactory.createQueueConnection();
> 	queueConnection.start();
> 	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}
> Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

--
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

        

[jira] [Updated] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Posted by "Willem Jan Gerritsen (JIRA)" <ji...@apache.org>.
     [ 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}

Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

  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}
> Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

--
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

        

[jira] [Updated] (AMQ-3899) XAQueueConnectionFactory is not able to create normal QueueConnections

Posted by "Willem Jan Gerritsen (JIRA)" <ji...@apache.org>.
     [ 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 {
	XAQueueConnectionFactory xaqueueConnectionFactory = (XAQueueConnectionFactory) jmsContext.lookup(JMSProvider.XA_QUEUE_CONNECTION_FACTORY);

	queueConnection = queueConnectionFactory.createQueueConnection();
	queueConnection.start();

	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}

Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

  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}

Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

    
> 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 {
> 	XAQueueConnectionFactory xaqueueConnectionFactory = (XAQueueConnectionFactory) jmsContext.lookup(JMSProvider.XA_QUEUE_CONNECTION_FACTORY);
> 	queueConnection = queueConnectionFactory.createQueueConnection();
> 	queueConnection.start();
> 	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}
> Our use-case is to instantiate a single queueconnectionfactory, which would be able to provide both normal (transacted) and XA connections. So that when we are sure that when we have only messaging in our transaction, that then we don't need to bother about initiating an XA transaction.

--
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