[
https://issues.apache.org/jira/browse/ARTEMIS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407899#comment-16407899
]
ASF GitHub Bot commented on ARTEMIS-406:
----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1960#discussion_r176080680
--- Diff:
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompTransaction.java
---
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.protocol.stomp;
+
+import org.apache.activemq.artemis.api.core.Message;
+import org.apache.activemq.artemis.core.server.ServerSession;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Control's stomp transaction processing
+ * it goes with stomp connections.
+ * it stores acks, sends, nacks
+ * during commit it applies those to core sessions.
+ * because each stomp connection uses only one session
+ * we can't rely on core session to manage multiple
+ * tx's.
+ */
+public class StompTransaction {
+
+ private List<StompAck> acks = new ArrayList<>();
--- End diff --
Instead of storing these here.. Can't you do like XA is doing? Recover the
transaction... and do the proper Transaction object?
Do you really need a StompTransaction? can't you reuse the actual
Transaction we already have?
> STOMP acknowledgements should support transactions
> --------------------------------------------------
>
> Key: ARTEMIS-406
> URL: https://issues.apache.org/jira/browse/ARTEMIS-406
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: STOMP
> Reporter: Lionel Cons
> Assignee: Howard Gao
> Priority: Major
>
> Artemis currently does not support transactional acknowledgements:
> {quote}
> Message acknowledgements are not transactional. The ACK frame can not be part
> of a transaction (it will be ignored if its transaction header is set).
> {quote}
> The STOMP 1.2 specification contains:
> {quote}
> Optionally, a transaction header MAY be specified, indicating that the
> message acknowledgment SHOULD be part of the named transaction.
> {quote}
> And other brokers (such as ActiveMQ 5.x) do support transactional
> acknowledgements.
> Artemis should support them too.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)