You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/07/22 11:55:07 UTC

[tomcat] branch master updated: Remove the javax.transaction.xa package. It is provided by the JRE.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 500d21d  Remove the javax.transaction.xa package. It is provided by the JRE.
500d21d is described below

commit 500d21d21bd52129d84839833f829ff16281472e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 22 12:53:42 2020 +0100

    Remove the javax.transaction.xa package. It is provided by the JRE.
    
    It is only used at compile time and should be present from Java 1.4
    onwards so removal is expected to be safe.
---
 java/javax/transaction/xa/XAException.java | 64 ------------------------------
 java/javax/transaction/xa/XAResource.java  | 52 ------------------------
 java/javax/transaction/xa/Xid.java         | 28 -------------
 webapps/docs/changelog.xml                 |  5 +++
 4 files changed, 5 insertions(+), 144 deletions(-)

diff --git a/java/javax/transaction/xa/XAException.java b/java/javax/transaction/xa/XAException.java
deleted file mode 100644
index 2519c4e..0000000
--- a/java/javax/transaction/xa/XAException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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 javax.transaction.xa;
-
-public class XAException extends java.lang.Exception {
-
-    private static final long serialVersionUID = -8647128647842792941L;
-
-    public int errorCode;
-
-    public XAException() {
-        super();
-    }
-
-    public XAException(String s) {
-        super(s);
-    }
-
-    public XAException(int errcode) {
-        super();
-        errorCode = errcode;
-    }
-
-    public static final int XA_RBBASE = 100;
-    public static final int XA_RBROLLBACK = XA_RBBASE;
-    public static final int XA_RBCOMMFAIL = XA_RBBASE + 1;
-    public static final int XA_RBDEADLOCK = XA_RBBASE + 2;
-    public static final int XA_RBINTEGRITY = XA_RBBASE + 3;
-    public static final int XA_RBOTHER = XA_RBBASE + 4;
-    public static final int XA_RBPROTO = XA_RBBASE + 5;
-    public static final int XA_RBTIMEOUT = XA_RBBASE + 6;
-    public static final int XA_RBTRANSIENT = XA_RBBASE + 7;
-    public static final int XA_RBEND = XA_RBTRANSIENT;
-    public static final int XA_NOMIGRATE = 9;
-    public static final int XA_HEURHAZ = 8;
-    public static final int XA_HEURCOM = 7;
-    public static final int XA_HEURRB = 6;
-    public static final int XA_HEURMIX = 5;
-    public static final int XA_RETRY = 4;
-    public static final int XA_RDONLY = 3;
-    public static final int XAER_ASYNC = -2;
-    public static final int XAER_RMERR = -3;
-    public static final int XAER_NOTA = -4;
-    public static final int XAER_INVAL = -5;
-    public static final int XAER_PROTO = -6;
-    public static final int XAER_RMFAIL = -7;
-    public static final int XAER_DUPID = -8;
-    public static final int XAER_OUTSIDE = -9;
-
-}
diff --git a/java/javax/transaction/xa/XAResource.java b/java/javax/transaction/xa/XAResource.java
deleted file mode 100644
index c7edd36..0000000
--- a/java/javax/transaction/xa/XAResource.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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 javax.transaction.xa;
-
-public interface XAResource {
-    void commit(Xid xid, boolean onePhase) throws XAException;
-
-    void end(Xid xid, int flags) throws XAException;
-
-    void forget(Xid xid) throws XAException;
-
-    int getTransactionTimeout() throws XAException;
-
-    boolean isSameRM(XAResource xares) throws XAException;
-
-    int prepare(Xid xid) throws XAException;
-
-    Xid[] recover(int flag) throws XAException;
-
-    void rollback(Xid xid) throws XAException;
-
-    boolean setTransactionTimeout(int seconds) throws XAException;
-
-    void start(Xid xid, int flags) throws XAException;
-
-    public static final int TMENDRSCAN = 0x00800000;
-    public static final int TMFAIL = 0x20000000;
-    public static final int TMJOIN = 0x00200000;
-    public static final int TMNOFLAGS = 0x00000000;
-    public static final int TMONEPHASE = 0x40000000;
-    public static final int TMRESUME = 0x08000000;
-    public static final int TMSTARTRSCAN = 0x01000000;
-    public static final int TMSUCCESS = 0x04000000;
-    public static final int TMSUSPEND = 0x02000000;
-    public static final int XA_RDONLY = 0x00000003;
-    public static final int XA_OK = 0;
-
-}
diff --git a/java/javax/transaction/xa/Xid.java b/java/javax/transaction/xa/Xid.java
deleted file mode 100644
index 054fd3e..0000000
--- a/java/javax/transaction/xa/Xid.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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 javax.transaction.xa;
-
-public interface Xid {
-    static final int MAXGTRIDSIZE = 64;
-    static final int MAXBQUALSIZE = 64;
-
-    int getFormatId();
-
-    byte[] getGlobalTransactionId();
-
-    byte[] getBranchQualifier();
-}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5af5215..1585d5a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -119,6 +119,11 @@
         <code>org.apache.tomcat.util.net.jsse</code> in the list of exported
         packages. (markt)
       </fix>
+      <fix>
+        Remove the local copy of <code>javax.transaction.xa</code> package which
+        is only used during compilation. The package is provided by the JRE from
+        Java 1.4 onwards so the local copy should be unnecessary. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org