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?


---

Reply via email to