[Bug 65262] Enable websocket endpoints to be IoC friendly (javaee integration at least)

2021-05-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65262

--- Comment #8 from Mark Thomas  ---
I've applied a fix for Endpoints to 10.0.x, 9.0.x and 8.5.x. I'll look at
Encoders and Decoders next so if there are any issues with the current approach
do let me know.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated (81e49ce -> 2fd7bcc)

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 81e49ce  Refactor passing of path parameters to POJO end points
 new 5092348  Refactor server end point creation to WsSession
 new 2fd7bcc  First part of fix for BZ 65262. Make WebSocket more IoC 
friendly

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...ssageHandler.java => ClientEndpointHolder.java} |  10 +-
 .../tomcat/websocket/EndpointClassHolder.java  |  56 ++
 .../apache/tomcat/websocket/EndpointHolder.java|  55 ++
 .../tomcat/websocket/LocalStrings.properties   |   5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|   1 -
 .../tomcat/websocket/LocalStrings_ja.properties|   1 -
 .../tomcat/websocket/LocalStrings_ko.properties|   1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |   1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   |  62 ++
 java/org/apache/tomcat/websocket/PojoHolder.java   |  59 ++
 java/org/apache/tomcat/websocket/WsSession.java| 216 -
 .../tomcat/websocket/WsWebSocketContainer.java |  92 -
 .../tomcat/websocket/pojo/LocalStrings.properties  |   2 -
 .../websocket/pojo/LocalStrings_de.properties  |   2 -
 .../websocket/pojo/LocalStrings_es.properties  |   2 -
 .../websocket/pojo/LocalStrings_fr.properties  |   2 -
 .../websocket/pojo/LocalStrings_ja.properties  |   2 -
 .../websocket/pojo/LocalStrings_ko.properties  |   2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |   2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  |  19 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 webapps/docs/changelog.xml |   5 +
 23 files changed, 506 insertions(+), 115 deletions(-)
 copy java/org/apache/tomcat/websocket/{WrappedMessageHandler.java => 
ClientEndpointHolder.java} (75%)
 create mode 100644 java/org/apache/tomcat/websocket/EndpointClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/EndpointHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoHolder.java

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



[tomcat] 02/02: First part of fix for BZ 65262. Make WebSocket more IoC friendly

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 2fd7bccf354c759d43898fc5ae65244864c43f1c
Author: Mark Thomas 
AuthorDate: Tue May 4 17:02:38 2021 +0100

First part of fix for BZ 65262. Make WebSocket more IoC friendly

This first part tackles the Endpoints. Endpoint instance creation has
been refactored and will now run through the InstanceManger for object
creation where possible. Where that isn't possible, the objects will
continue to be registered with the InstanceManager.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65262
---
 .../tomcat/websocket/ClientEndpointHolder.java | 27 +++
 .../tomcat/websocket/EndpointClassHolder.java  | 56 ++
 .../apache/tomcat/websocket/EndpointHolder.java| 55 +
 .../tomcat/websocket/LocalStrings.properties   |  5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|  1 -
 .../tomcat/websocket/LocalStrings_ja.properties|  1 -
 .../tomcat/websocket/LocalStrings_ko.properties|  1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |  1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   | 62 +++
 java/org/apache/tomcat/websocket/PojoHolder.java   | 59 ++
 java/org/apache/tomcat/websocket/WsSession.java| 83 +---
 .../tomcat/websocket/WsWebSocketContainer.java | 90 +-
 .../tomcat/websocket/pojo/LocalStrings.properties  |  2 -
 .../websocket/pojo/LocalStrings_de.properties  |  2 -
 .../websocket/pojo/LocalStrings_es.properties  |  2 -
 .../websocket/pojo/LocalStrings_fr.properties  |  2 -
 .../websocket/pojo/LocalStrings_ja.properties  |  2 -
 .../websocket/pojo/LocalStrings_ko.properties  |  2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |  2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  | 19 +
 webapps/docs/changelog.xml |  5 ++
 21 files changed, 363 insertions(+), 116 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/ClientEndpointHolder.java 
b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
new file mode 100644
index 000..525e7f9
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
@@ -0,0 +1,27 @@
+/*
+ * 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.tomcat.websocket;
+
+import javax.websocket.DeploymentException;
+import javax.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+
+public interface ClientEndpointHolder {
+String getClassName();
+Endpoint getInstance(InstanceManager instanceManager) throws 
DeploymentException;
+}
diff --git a/java/org/apache/tomcat/websocket/EndpointClassHolder.java 
b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
new file mode 100644
index 000..2a8102a
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
@@ -0,0 +1,56 @@
+/*
+ * 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.tomcat.websocket;
+
+import javax.naming.NamingException;
+import javax.websocket.DeploymentException;
+import javax.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+import org.apache.tomcat.util.res.StringManager;
+
+public class EndpointClassHolder implements ClientEndpointHolder {
+
+private static final StringManager sm = 
StringManager.getManager

[tomcat] 01/02: Refactor server end point creation to WsSession

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 509234891c4399f2d27fe9448646ae175b34731f
Author: Mark Thomas 
AuthorDate: Fri Apr 30 14:36:52 2021 +0100

Refactor server end point creation to WsSession

The is an interim step towards the fix for BZ 65262
---
 java/org/apache/tomcat/websocket/WsSession.java| 185 +
 .../tomcat/websocket/WsWebSocketContainer.java |   6 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 4 files changed, 192 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsSession.java 
b/java/org/apache/tomcat/websocket/WsSession.java
index 1f85100..073a4d6 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 
+import javax.websocket.ClientEndpointConfig;
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCode;
 import javax.websocket.CloseReason.CloseCodes;
@@ -53,6 +54,7 @@ import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.InstanceManagerBindings;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.websocket.pojo.PojoEndpointServer;
 
 public class WsSession implements Session {
 
@@ -101,6 +103,186 @@ public class WsSession implements Session {
 private volatile long lastActiveWrite = System.currentTimeMillis();
 private Map futures = new 
ConcurrentHashMap<>();
 
+
+/**
+ * Creates a new WebSocket session for communication between the provided
+ * client and remote end points. The result of
+ * {@link Thread#getContextClassLoader()} at the time this constructor is
+ * called will be used when calling
+ * {@link Endpoint#onClose(Session, CloseReason)}.
+ *
+ * @param localEndpointThe end point managed by this code
+ * @param wsRemoteEndpoint The other / remote end point
+ * @param wsWebSocketContainer The container that created this session
+ * @param negotiatedExtensions The agreed extensions to use for this 
session
+ * @param subProtocol  The agreed sub-protocol to use for this
+ * session
+ * @param pathParameters   The path parameters associated with the
+ * request that initiated this session or
+ * null if this is a client 
session
+ * @param secure   Was this session initiated over a secure
+ * connection?
+ * @param clientEndpointConfig The configuration information for the client
+ * end point
+ * @throws DeploymentException if an invalid encode is specified
+ */
+public WsSession(Endpoint localEndpoint,
+WsRemoteEndpointImplBase wsRemoteEndpoint,
+WsWebSocketContainer wsWebSocketContainer,
+List negotiatedExtensions, String subProtocol, 
Map pathParameters,
+boolean secure, ClientEndpointConfig clientEndpointConfig) throws 
DeploymentException {
+this.localEndpoint = localEndpoint;
+this.wsRemoteEndpoint = wsRemoteEndpoint;
+this.wsRemoteEndpoint.setSession(this);
+this.remoteEndpointAsync = new WsRemoteEndpointAsync(wsRemoteEndpoint);
+this.remoteEndpointBasic = new WsRemoteEndpointBasic(wsRemoteEndpoint);
+this.webSocketContainer = wsWebSocketContainer;
+applicationClassLoader = 
Thread.currentThread().getContextClassLoader();
+
wsRemoteEndpoint.setSendTimeout(wsWebSocketContainer.getDefaultAsyncSendTimeout());
+this.maxBinaryMessageBufferSize = 
webSocketContainer.getDefaultMaxBinaryMessageBufferSize();
+this.maxTextMessageBufferSize = 
webSocketContainer.getDefaultMaxTextMessageBufferSize();
+this.maxIdleTimeout = 
webSocketContainer.getDefaultMaxSessionIdleTimeout();
+this.requestUri = null;
+this.requestParameterMap = Collections.emptyMap();
+this.queryString = null;
+this.userPrincipal = null;
+this.httpSessionId = null;
+this.negotiatedExtensions = negotiatedExtensions;
+if (subProtocol == null) {
+this.subProtocol = "";
+} else {
+this.subProtocol = subProtocol;
+}
+this.pathParameters = pathParameters;
+this.secure = secure;
+this.wsRemoteEndpoint.setEncoders(clientEndpointConfig);
+this.endpointConfig = clientEndpointConfig;
+
+this.userProperties.putAll(endpointConfig.getUserProperties());
+this.id = Long.toHexString(ids.getAndIncrement());
+
+ 

[tomcat] 02/02: First part of fix for BZ 65262. Make WebSocket more IoC friendly

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit eecdbcaef25e4dd1db2861a2bef212d62d5e3389
Author: Mark Thomas 
AuthorDate: Tue May 4 17:02:38 2021 +0100

First part of fix for BZ 65262. Make WebSocket more IoC friendly

This first part tackles the Endpoints. Endpoint instance creation has
been refactored and will now run through the InstanceManger for object
creation where possible. Where that isn't possible, the objects will
continue to be registered with the InstanceManager.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65262
---
 .../tomcat/websocket/ClientEndpointHolder.java | 27 +++
 .../tomcat/websocket/EndpointClassHolder.java  | 56 ++
 .../apache/tomcat/websocket/EndpointHolder.java| 55 +
 .../tomcat/websocket/LocalStrings.properties   |  5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|  1 -
 .../tomcat/websocket/LocalStrings_ja.properties|  1 -
 .../tomcat/websocket/LocalStrings_ko.properties|  1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |  1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   | 62 +++
 java/org/apache/tomcat/websocket/PojoHolder.java   | 59 ++
 java/org/apache/tomcat/websocket/WsSession.java| 83 +---
 .../tomcat/websocket/WsWebSocketContainer.java | 90 +-
 .../tomcat/websocket/pojo/LocalStrings.properties  |  2 -
 .../websocket/pojo/LocalStrings_cs.properties  |  2 -
 .../websocket/pojo/LocalStrings_de.properties  |  2 -
 .../websocket/pojo/LocalStrings_es.properties  |  2 -
 .../websocket/pojo/LocalStrings_fr.properties  |  2 -
 .../websocket/pojo/LocalStrings_ja.properties  |  2 -
 .../websocket/pojo/LocalStrings_ko.properties  |  2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |  2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  | 19 +
 webapps/docs/changelog.xml |  5 ++
 22 files changed, 363 insertions(+), 118 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/ClientEndpointHolder.java 
b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
new file mode 100644
index 000..525e7f9
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
@@ -0,0 +1,27 @@
+/*
+ * 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.tomcat.websocket;
+
+import javax.websocket.DeploymentException;
+import javax.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+
+public interface ClientEndpointHolder {
+String getClassName();
+Endpoint getInstance(InstanceManager instanceManager) throws 
DeploymentException;
+}
diff --git a/java/org/apache/tomcat/websocket/EndpointClassHolder.java 
b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
new file mode 100644
index 000..2a8102a
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
@@ -0,0 +1,56 @@
+/*
+ * 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.tomcat.websocket;
+
+import javax.naming.NamingException;
+import javax.websocket.DeploymentException;
+import javax.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+import org.apache.tomcat.util.res.StringManager;
+
+public class EndpointClassHolder implements ClientEndpointHolder {
+
+privat

[tomcat] 01/02: Refactor server end point creation to WsSession

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit c31f0df875cdae6fc9175ac7fd2f917019ea260a
Author: Mark Thomas 
AuthorDate: Fri Apr 30 14:36:52 2021 +0100

Refactor server end point creation to WsSession

The is an interim step towards the fix for BZ 65262
---
 java/org/apache/tomcat/websocket/WsSession.java| 185 +
 .../tomcat/websocket/WsWebSocketContainer.java |   6 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 4 files changed, 192 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsSession.java 
b/java/org/apache/tomcat/websocket/WsSession.java
index 1f85100..073a4d6 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 
+import javax.websocket.ClientEndpointConfig;
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCode;
 import javax.websocket.CloseReason.CloseCodes;
@@ -53,6 +54,7 @@ import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.InstanceManagerBindings;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.websocket.pojo.PojoEndpointServer;
 
 public class WsSession implements Session {
 
@@ -101,6 +103,186 @@ public class WsSession implements Session {
 private volatile long lastActiveWrite = System.currentTimeMillis();
 private Map futures = new 
ConcurrentHashMap<>();
 
+
+/**
+ * Creates a new WebSocket session for communication between the provided
+ * client and remote end points. The result of
+ * {@link Thread#getContextClassLoader()} at the time this constructor is
+ * called will be used when calling
+ * {@link Endpoint#onClose(Session, CloseReason)}.
+ *
+ * @param localEndpointThe end point managed by this code
+ * @param wsRemoteEndpoint The other / remote end point
+ * @param wsWebSocketContainer The container that created this session
+ * @param negotiatedExtensions The agreed extensions to use for this 
session
+ * @param subProtocol  The agreed sub-protocol to use for this
+ * session
+ * @param pathParameters   The path parameters associated with the
+ * request that initiated this session or
+ * null if this is a client 
session
+ * @param secure   Was this session initiated over a secure
+ * connection?
+ * @param clientEndpointConfig The configuration information for the client
+ * end point
+ * @throws DeploymentException if an invalid encode is specified
+ */
+public WsSession(Endpoint localEndpoint,
+WsRemoteEndpointImplBase wsRemoteEndpoint,
+WsWebSocketContainer wsWebSocketContainer,
+List negotiatedExtensions, String subProtocol, 
Map pathParameters,
+boolean secure, ClientEndpointConfig clientEndpointConfig) throws 
DeploymentException {
+this.localEndpoint = localEndpoint;
+this.wsRemoteEndpoint = wsRemoteEndpoint;
+this.wsRemoteEndpoint.setSession(this);
+this.remoteEndpointAsync = new WsRemoteEndpointAsync(wsRemoteEndpoint);
+this.remoteEndpointBasic = new WsRemoteEndpointBasic(wsRemoteEndpoint);
+this.webSocketContainer = wsWebSocketContainer;
+applicationClassLoader = 
Thread.currentThread().getContextClassLoader();
+
wsRemoteEndpoint.setSendTimeout(wsWebSocketContainer.getDefaultAsyncSendTimeout());
+this.maxBinaryMessageBufferSize = 
webSocketContainer.getDefaultMaxBinaryMessageBufferSize();
+this.maxTextMessageBufferSize = 
webSocketContainer.getDefaultMaxTextMessageBufferSize();
+this.maxIdleTimeout = 
webSocketContainer.getDefaultMaxSessionIdleTimeout();
+this.requestUri = null;
+this.requestParameterMap = Collections.emptyMap();
+this.queryString = null;
+this.userPrincipal = null;
+this.httpSessionId = null;
+this.negotiatedExtensions = negotiatedExtensions;
+if (subProtocol == null) {
+this.subProtocol = "";
+} else {
+this.subProtocol = subProtocol;
+}
+this.pathParameters = pathParameters;
+this.secure = secure;
+this.wsRemoteEndpoint.setEncoders(clientEndpointConfig);
+this.endpointConfig = clientEndpointConfig;
+
+this.userProperties.putAll(endpointConfig.getUserProperties());
+this.id = Long.toHexString(ids.getAndIncrement());
+
+ 

[tomcat] branch 9.0.x updated (73446fc -> eecdbca)

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 73446fc  Refactor passing of path parameters to POJO end points
 new c31f0df  Refactor server end point creation to WsSession
 new eecdbca  First part of fix for BZ 65262. Make WebSocket more IoC 
friendly

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...ssageHandler.java => ClientEndpointHolder.java} |  10 +-
 .../tomcat/websocket/EndpointClassHolder.java  |  56 ++
 .../apache/tomcat/websocket/EndpointHolder.java|  55 ++
 .../tomcat/websocket/LocalStrings.properties   |   5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|   1 -
 .../tomcat/websocket/LocalStrings_ja.properties|   1 -
 .../tomcat/websocket/LocalStrings_ko.properties|   1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |   1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   |  62 ++
 java/org/apache/tomcat/websocket/PojoHolder.java   |  59 ++
 java/org/apache/tomcat/websocket/WsSession.java| 216 -
 .../tomcat/websocket/WsWebSocketContainer.java |  92 -
 .../tomcat/websocket/pojo/LocalStrings.properties  |   2 -
 .../websocket/pojo/LocalStrings_cs.properties  |   2 -
 .../websocket/pojo/LocalStrings_de.properties  |   2 -
 .../websocket/pojo/LocalStrings_es.properties  |   2 -
 .../websocket/pojo/LocalStrings_fr.properties  |   2 -
 .../websocket/pojo/LocalStrings_ja.properties  |   2 -
 .../websocket/pojo/LocalStrings_ko.properties  |   2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |   2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  |  19 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 webapps/docs/changelog.xml |   5 +
 24 files changed, 506 insertions(+), 117 deletions(-)
 copy java/org/apache/tomcat/websocket/{WrappedMessageHandler.java => 
ClientEndpointHolder.java} (75%)
 create mode 100644 java/org/apache/tomcat/websocket/EndpointClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/EndpointHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoHolder.java

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



[tomcat] 02/02: First part of fix for BZ 65262. Make WebSocket more IoC friendly

2021-05-04 Thread markt
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

commit 4f90bff128c6cb39bd0ebb8cf1eb6565229dcf86
Author: Mark Thomas 
AuthorDate: Tue May 4 17:02:38 2021 +0100

First part of fix for BZ 65262. Make WebSocket more IoC friendly

This first part tackles the Endpoints. Endpoint instance creation has
been refactored and will now run through the InstanceManger for object
creation where possible. Where that isn't possible, the objects will
continue to be registered with the InstanceManager.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65262
---
 .../tomcat/websocket/ClientEndpointHolder.java | 27 +++
 .../tomcat/websocket/EndpointClassHolder.java  | 57 ++
 .../apache/tomcat/websocket/EndpointHolder.java| 56 ++
 .../tomcat/websocket/LocalStrings.properties   |  5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|  1 -
 .../tomcat/websocket/LocalStrings_ja.properties|  1 -
 .../tomcat/websocket/LocalStrings_ko.properties|  1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |  1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   | 63 +++
 java/org/apache/tomcat/websocket/PojoHolder.java   | 60 +++
 java/org/apache/tomcat/websocket/WsSession.java| 84 +---
 .../tomcat/websocket/WsWebSocketContainer.java | 90 +-
 .../tomcat/websocket/pojo/LocalStrings.properties  |  2 -
 .../websocket/pojo/LocalStrings_cs.properties  |  2 -
 .../websocket/pojo/LocalStrings_de.properties  |  2 -
 .../websocket/pojo/LocalStrings_es.properties  |  2 -
 .../websocket/pojo/LocalStrings_fr.properties  |  2 -
 .../websocket/pojo/LocalStrings_ja.properties  |  2 -
 .../websocket/pojo/LocalStrings_ko.properties  |  2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |  2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  | 19 +
 webapps/docs/changelog.xml |  5 ++
 22 files changed, 368 insertions(+), 118 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/ClientEndpointHolder.java 
b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
new file mode 100644
index 000..d3334d1
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/ClientEndpointHolder.java
@@ -0,0 +1,27 @@
+/*
+ * 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.tomcat.websocket;
+
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+
+public interface ClientEndpointHolder {
+String getClassName();
+Endpoint getInstance(InstanceManager instanceManager) throws 
DeploymentException;
+}
diff --git a/java/org/apache/tomcat/websocket/EndpointClassHolder.java 
b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
new file mode 100644
index 000..7a2cf21
--- /dev/null
+++ b/java/org/apache/tomcat/websocket/EndpointClassHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.tomcat.websocket;
+
+import javax.naming.NamingException;
+
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.Endpoint;
+
+import org.apache.tomcat.InstanceManager;
+import org.apache.tomcat.util.res.StringManager;
+
+public class EndpointClassHolder implements ClientEndpointHolder {

[tomcat] 01/02: Refactor server end point creation to WsSession

2021-05-04 Thread markt
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

commit 0e887b7729184fc65a71798175554f62dbcae876
Author: Mark Thomas 
AuthorDate: Fri Apr 30 14:36:52 2021 +0100

Refactor server end point creation to WsSession

The is an interim step towards the fix for BZ 65262
---
 java/org/apache/tomcat/websocket/WsSession.java| 185 +
 .../tomcat/websocket/WsWebSocketContainer.java |   6 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 4 files changed, 192 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsSession.java 
b/java/org/apache/tomcat/websocket/WsSession.java
index c185e8a..2085cb3 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 
+import jakarta.websocket.ClientEndpointConfig;
 import jakarta.websocket.CloseReason;
 import jakarta.websocket.CloseReason.CloseCode;
 import jakarta.websocket.CloseReason.CloseCodes;
@@ -53,6 +54,7 @@ import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.InstanceManagerBindings;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.websocket.pojo.PojoEndpointServer;
 
 public class WsSession implements Session {
 
@@ -101,6 +103,186 @@ public class WsSession implements Session {
 private volatile long lastActiveWrite = System.currentTimeMillis();
 private Map futures = new 
ConcurrentHashMap<>();
 
+
+/**
+ * Creates a new WebSocket session for communication between the provided
+ * client and remote end points. The result of
+ * {@link Thread#getContextClassLoader()} at the time this constructor is
+ * called will be used when calling
+ * {@link Endpoint#onClose(Session, CloseReason)}.
+ *
+ * @param localEndpointThe end point managed by this code
+ * @param wsRemoteEndpoint The other / remote end point
+ * @param wsWebSocketContainer The container that created this session
+ * @param negotiatedExtensions The agreed extensions to use for this 
session
+ * @param subProtocol  The agreed sub-protocol to use for this
+ * session
+ * @param pathParameters   The path parameters associated with the
+ * request that initiated this session or
+ * null if this is a client 
session
+ * @param secure   Was this session initiated over a secure
+ * connection?
+ * @param clientEndpointConfig The configuration information for the client
+ * end point
+ * @throws DeploymentException if an invalid encode is specified
+ */
+public WsSession(Endpoint localEndpoint,
+WsRemoteEndpointImplBase wsRemoteEndpoint,
+WsWebSocketContainer wsWebSocketContainer,
+List negotiatedExtensions, String subProtocol, 
Map pathParameters,
+boolean secure, ClientEndpointConfig clientEndpointConfig) throws 
DeploymentException {
+this.localEndpoint = localEndpoint;
+this.wsRemoteEndpoint = wsRemoteEndpoint;
+this.wsRemoteEndpoint.setSession(this);
+this.remoteEndpointAsync = new WsRemoteEndpointAsync(wsRemoteEndpoint);
+this.remoteEndpointBasic = new WsRemoteEndpointBasic(wsRemoteEndpoint);
+this.webSocketContainer = wsWebSocketContainer;
+applicationClassLoader = 
Thread.currentThread().getContextClassLoader();
+
wsRemoteEndpoint.setSendTimeout(wsWebSocketContainer.getDefaultAsyncSendTimeout());
+this.maxBinaryMessageBufferSize = 
webSocketContainer.getDefaultMaxBinaryMessageBufferSize();
+this.maxTextMessageBufferSize = 
webSocketContainer.getDefaultMaxTextMessageBufferSize();
+this.maxIdleTimeout = 
webSocketContainer.getDefaultMaxSessionIdleTimeout();
+this.requestUri = null;
+this.requestParameterMap = Collections.emptyMap();
+this.queryString = null;
+this.userPrincipal = null;
+this.httpSessionId = null;
+this.negotiatedExtensions = negotiatedExtensions;
+if (subProtocol == null) {
+this.subProtocol = "";
+} else {
+this.subProtocol = subProtocol;
+}
+this.pathParameters = pathParameters;
+this.secure = secure;
+this.wsRemoteEndpoint.setEncoders(clientEndpointConfig);
+this.endpointConfig = clientEndpointConfig;
+
+this.userProperties.putAll(endpointConfig.getUserProperties());
+this.id = Long.toHexString(ids.getAndIncrement

[tomcat] branch master updated (e498a7d -> 4f90bff)

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from e498a7d  Refactor passing of path parameters to POJO end points
 new 0e887b7  Refactor server end point creation to WsSession
 new 4f90bff  First part of fix for BZ 65262. Make WebSocket more IoC 
friendly

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...ssageHandler.java => ClientEndpointHolder.java} |  10 +-
 .../tomcat/websocket/EndpointClassHolder.java  |  57 ++
 .../apache/tomcat/websocket/EndpointHolder.java|  56 ++
 .../tomcat/websocket/LocalStrings.properties   |   5 +-
 .../tomcat/websocket/LocalStrings_fr.properties|   1 -
 .../tomcat/websocket/LocalStrings_ja.properties|   1 -
 .../tomcat/websocket/LocalStrings_ko.properties|   1 -
 .../tomcat/websocket/LocalStrings_zh_CN.properties |   1 -
 .../apache/tomcat/websocket/PojoClassHolder.java   |  63 ++
 java/org/apache/tomcat/websocket/PojoHolder.java   |  60 ++
 java/org/apache/tomcat/websocket/WsSession.java| 217 -
 .../tomcat/websocket/WsWebSocketContainer.java |  92 -
 .../tomcat/websocket/pojo/LocalStrings.properties  |   2 -
 .../websocket/pojo/LocalStrings_cs.properties  |   2 -
 .../websocket/pojo/LocalStrings_de.properties  |   2 -
 .../websocket/pojo/LocalStrings_es.properties  |   2 -
 .../websocket/pojo/LocalStrings_fr.properties  |   2 -
 .../websocket/pojo/LocalStrings_ja.properties  |   2 -
 .../websocket/pojo/LocalStrings_ko.properties  |   2 -
 .../websocket/pojo/LocalStrings_zh_CN.properties   |   2 -
 .../tomcat/websocket/pojo/PojoEndpointServer.java  |  19 +-
 .../tomcat/websocket/server/UpgradeUtil.java   |  16 +-
 .../websocket/server/WsHttpUpgradeHandler.java |   8 +-
 webapps/docs/changelog.xml |   5 +
 24 files changed, 511 insertions(+), 117 deletions(-)
 copy java/org/apache/tomcat/websocket/{WrappedMessageHandler.java => 
ClientEndpointHolder.java} (75%)
 create mode 100644 java/org/apache/tomcat/websocket/EndpointClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/EndpointHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoClassHolder.java
 create mode 100644 java/org/apache/tomcat/websocket/PojoHolder.java

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



Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.0

2021-05-04 Thread Romain Manni-Bucau
+1, xml fix is helping

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mar. 4 mai 2021 à 14:52, Rémy Maucherat  a écrit :

> On Tue, May 4, 2021 at 2:06 PM Mark Thomas  wrote:
>
> > The proposed Apache Tomcat migration tool for Jakarta EE 1.0.0 is now
> > available for voting.
> >
> > The significant changes since 0.2.0 are:
> >
> > - Further fixes to exclude javax.xml packages that are not part of
> >Java EE from the migration
> >
> > - The class transformer now validates that the target classes in the
> >Jakarta namespace exist in the runtime environment
> >
> >
> > It can be obtained from:
> >
> https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.0/
> >
> > The Maven staging repo is:
> > https://repository.apache.org/content/repositories/orgapachetomcat-1308/
> >
> > The tag is:
> > https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.0
> > 2a27b633f456710dc5d51680344ca7f047642a60
> >
> > The proposed 1.0.0 release is:
> >
> > [ ] -1: Broken. Do not release because...
> > [X] +1: Acceptable. Go ahead and release.
> >
> > Rémy
>


Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.0

2021-05-04 Thread Rémy Maucherat
On Tue, May 4, 2021 at 2:06 PM Mark Thomas  wrote:

> The proposed Apache Tomcat migration tool for Jakarta EE 1.0.0 is now
> available for voting.
>
> The significant changes since 0.2.0 are:
>
> - Further fixes to exclude javax.xml packages that are not part of
>Java EE from the migration
>
> - The class transformer now validates that the target classes in the
>Jakarta namespace exist in the runtime environment
>
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.0/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1308/
>
> The tag is:
> https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.0
> 2a27b633f456710dc5d51680344ca7f047642a60
>
> The proposed 1.0.0 release is:
>
> [ ] -1: Broken. Do not release because...
> [X] +1: Acceptable. Go ahead and release.
>
> Rémy


[VOTE] Apache Tomcat migration tool for Jakarta EE 1.0.0

2021-05-04 Thread Mark Thomas

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.0 is now
available for voting.

The significant changes since 0.2.0 are:

- Further fixes to exclude javax.xml packages that are not part of
  Java EE from the migration

- The class transformer now validates that the target classes in the
  Jakarta namespace exist in the runtime environment


It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.0/

The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1308/

The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.0
2a27b633f456710dc5d51680344ca7f047642a60

The proposed 1.0.0 release is:

[ ] -1: Broken. Do not release because...
[ ] +1: Acceptable. Go ahead and release.

Thanks,

Mark

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



svn commit: r47536 - in /dev/tomcat/jakartaee-migration/v1.0.0: ./ binaries/ source/

2021-05-04 Thread markt
Author: markt
Date: Tue May  4 12:04:03 2021
New Revision: 47536

Log:
Upload Tomcat Migration Tool for Jakarta EE v1.0.0 for voting

Added:
dev/tomcat/jakartaee-migration/v1.0.0/
dev/tomcat/jakartaee-migration/v1.0.0/binaries/

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz
   (with props)

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.asc

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.sha512

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip
   (with props)

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip.asc

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip.sha512

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-shaded.jar
   (with props)

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-shaded.jar.asc

dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-shaded.jar.sha512
dev/tomcat/jakartaee-migration/v1.0.0/source/

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.tar.gz
   (with props)

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.tar.gz.asc

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.tar.gz.sha512

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.zip  
 (with props)

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.zip.asc

dev/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.zip.sha512

Added: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz
==
Binary file - no diff available.

Propchange: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz
--
svn:mime-type = application/x-gzip

Added: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.asc
==
--- 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.asc
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.asc
 Tue May  4 12:04:03 2021
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - http://gpgtools.org
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmCROAgACgkQEMAcWi9g
+WednqhAAyUR2h/qHhtnlgoOpvrwWgvb1tJTofSyZihB79/aBLoFE2Tg+J/J6Ud38
+TUTlTKeVIBM+cLFsIlwxak2kxO03oj5BBn6690qw/J3rOyDNgZDn8npogXeOjAGi
+R5BRgY4HPPdrczVLib4Q5YN96oH8cCioXksHRYACn0fO1qXf9ARriyn7bCHricnK
+TF76Ngz8e+Wruqv2bqfGFpsb7WZgtbd0VbEeuA2JQT1wlEmx0TPcb0r8jh9jLPDD
+56hSuQJsLFAlN8JlbSalw9kV4Ase+lqQhsF/F6sgjnTabXA83UNJ6UttjDH3zzzO
+U08uUB7JdRVu4HECY8h+lAsJaaeFBbNwjPtduvIv66rJ00jVwng1GJ+p2yf0VN4t
+C/Bu5qedJMmzBFUvg7SyZRyGDhi9XE0MIWLFbOgm7pDccwic6i7PfzXDP6RzjU9G
+vp+rP3ZkxckxG0zGfSnXdp3QxYrf47ctGXuoBldI9y61dqgegpsfhgiRh9A8LVGL
+ITAwwtm9qqNKGiGZqN41hy+oh53zFL+V2xV1nz2BZrW7JX4UfOdnfcJkLQUeP+I6
+hTl8SSg41Z2EUmjoLv6hch01lwVTETHnqUMxoYr4B8H4euvNuaC8uj8VYZm6O9Sg
+PTNm789si77WX2WnigmB68pYncMYq/OOYdppvZT+8fG1humu/Zk=
+=hi5I
+-END PGP SIGNATURE-

Added: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.sha512
==
--- 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.sha512
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.tar.gz.sha512
 Tue May  4 12:04:03 2021
@@ -0,0 +1 @@
+20458248268e26b9e79bfa0d205712ca184c5ccf045c3a2087f56b8175aa121593d71a5f6b3e05becccecf1b530f7ff94255feadd7db46180ab067ccfde21e5c
 *jakartaee-migration-1.0.0-bin.tar.gz
\ No newline at end of file

Added: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip
==
Binary file - no diff available.

Propchange: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip
--
svn:mime-type = application/octet-stream

Added: 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip.asc
==
--- 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip.asc
 (added)
+++ 
dev/tomcat/jakartaee-migration/v1.0.0/binaries/jakartaee-migration-1.0.0-bin.zip.asc
 Tue May  4 12:04:03 2021
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - http://gpgtools.org
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1

[tomcat-jakartaee-migration] branch master updated: [maven-release-plugin] prepare for next development iteration

2021-05-04 Thread markt
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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 3eaae95  [maven-release-plugin] prepare for next development iteration
3eaae95 is described below

commit 3eaae95329d9862d166f9fa43335ae76eec86508
Author: Mark Thomas 
AuthorDate: Tue May 4 12:50:14 2021 +0100

[maven-release-plugin] prepare for next development iteration
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2100ca1..ba299fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
   org.apache.tomcat
   jakartaee-migration
   Apache Tomcat Migration Tool for Jakarta EE
-  1.0.0
+  1.0.1-SNAPSHOT
  
   
 This tool is a work in progress.
@@ -103,7 +103,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git
-1.0.0
+HEAD
   
 
   

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



[tomcat-jakartaee-migration] annotated tag 1.0.0 created (now c154bb2)

2021-05-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to annotated tag 1.0.0
in repository 
https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git.


  at c154bb2  (tag)
 tagging 2a27b633f456710dc5d51680344ca7f047642a60 (commit)
 replaces 0.2.0
  by Mark Thomas
  on Tue May 4 12:50:10 2021 +0100

- Log -
[maven-release-plugin] copy for tag 1.0.0
---

No new revisions were added by this update.

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



[tomcat-jakartaee-migration] branch master updated: [maven-release-plugin] prepare release 1.0.0

2021-05-04 Thread markt
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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 2a27b63  [maven-release-plugin] prepare release 1.0.0
2a27b63 is described below

commit 2a27b633f456710dc5d51680344ca7f047642a60
Author: Mark Thomas 
AuthorDate: Tue May 4 12:49:35 2021 +0100

[maven-release-plugin] prepare release 1.0.0
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index b35af77..2100ca1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
   org.apache.tomcat
   jakartaee-migration
   Apache Tomcat Migration Tool for Jakarta EE
-  1.0.0-SNAPSHOT
+  1.0.0
  
   
 This tool is a work in progress.
@@ -103,7 +103,7 @@
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
 
https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git
-HEAD
+1.0.0
   
 
   

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



[tomcat-jakartaee-migration] branch master updated: Update to latest parent POM

2021-05-04 Thread markt
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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new a31d503  Update to latest parent POM
a31d503 is described below

commit a31d503b0b8f7b184e185a285d882d04195c5932
Author: Mark Thomas 
AuthorDate: Tue May 4 12:43:51 2021 +0100

Update to latest parent POM
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e28c4a1..b35af77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   
 org.apache
 apache
-22
+23
   
 
   org.apache.tomcat

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



[tomcat-jakartaee-migration] branch master updated: Align pom with output of Maven release plugin

2021-05-04 Thread markt
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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new e3dd742  Align pom with output of Maven release plugin
e3dd742 is described below

commit e3dd742b4ac7edf31b1732d95fafc464ed74bf29
Author: Mark Thomas 
AuthorDate: Tue May 4 12:38:03 2021 +0100

Align pom with output of Maven release plugin
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 39ab0b5..e28c4a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -286,7 +286,7 @@
   
 
   
-
+
   
 
   

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



[tomcat-jakartaee-migration] branch master updated: Update next version to 1.0.0

2021-05-04 Thread markt
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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 77a563d  Update next version to 1.0.0
77a563d is described below

commit 77a563d7aabdf68e33c7e2ac18bf4b573297f049
Author: Mark Thomas 
AuthorDate: Tue May 4 12:24:21 2021 +0100

Update next version to 1.0.0
---
 CHANGES.md | 2 +-
 pom.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 15b96ab..b38a8df 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,6 @@
 # Tomcat Migration Tool for Jakarta EE - Changelog
 
-## 0.3.0 (in progress)
+## 1.0.0 (in progress)
 
 - Fix [#14](https://github.com/apache/tomcat-jakartaee-migration/issues/14). 
Do not migrate `javax.xml.(registry|rpc)` namespaces. (mgrigorov)
 - The class transformer will now validate that the target classes in the 
Jakarta namespace exist in the runtime environment (remm)
diff --git a/pom.xml b/pom.xml
index 31e8978..39ab0b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
   org.apache.tomcat
   jakartaee-migration
   Apache Tomcat Migration Tool for Jakarta EE
-  0.2.1-SNAPSHOT
+  1.0.0-SNAPSHOT
  
   
 This tool is a work in progress.

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



Re: Tagging May releases towards the end of this week

2021-05-04 Thread Mark Thomas

On 04/05/2021 08:43, Rémy Maucherat wrote:

On Tue, May 4, 2021 at 9:36 AM Mark Thomas  wrote:


On 04/05/2021 08:29, Rémy Maucherat wrote:

On Tue, May 4, 2021 at 9:26 AM Mark Thomas  wrote:


Hi all,

It is the start of a new month so time to tag and release. I have a few
things I'd like to get fixed first:

1. BZ 65272 (allow CR as HTTP line separator).
  I'm planning on applying PR 417 to address this before I tag unless
  there are objections.

2. BZ 65262 (WebSocket & InstanceManager)
  I have a patch for this about 80% complete. I intend to complete

and

  apply it before tagging.

Given these (and no more issues raised this week) I'm currently
expecting the tags to be towards the end of the week.



Can we release a stable Jakarta migration tool before that release ?

There

are a couple changes that could be picked up and since it's a

subcomponent

it would need to be declared stable anyway.


Sure. 0.3.0 or 1.0.0 ?



I think it should move to stable 1.0, unless there's some mandatory feature
that got forgotten.


I can't think of anything. Folks are starting to use it (and Tomcat 10) 
and the biggest problem seems to be that users aren't aware of the Java 
EE -> Jakarta EE changes.


Is there merit in attempting to detect an application trying to load a 
Java EE 9 class (maybe limit it to Servlet, JSP, EL & WebSocket) and 
fail the deployment (assuming we catch the problem early enough) with a 
clear error message? Maybe pointing to a (maybe expanded) section in the 
migration guide?


Mark

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



[GitHub] [tomcat] rmaucher commented on pull request #417: Fix BZ 65272. Restore the use of LF as an HTTP line terminator

2021-05-04 Thread GitBox


rmaucher commented on pull request #417:
URL: https://github.com/apache/tomcat/pull/417#issuecomment-831755178


   +1 looking good.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



Re: Tagging May releases towards the end of this week

2021-05-04 Thread Rémy Maucherat
On Tue, May 4, 2021 at 9:36 AM Mark Thomas  wrote:

> On 04/05/2021 08:29, Rémy Maucherat wrote:
> > On Tue, May 4, 2021 at 9:26 AM Mark Thomas  wrote:
> >
> >> Hi all,
> >>
> >> It is the start of a new month so time to tag and release. I have a few
> >> things I'd like to get fixed first:
> >>
> >> 1. BZ 65272 (allow CR as HTTP line separator).
> >>  I'm planning on applying PR 417 to address this before I tag unless
> >>  there are objections.
> >>
> >> 2. BZ 65262 (WebSocket & InstanceManager)
> >>  I have a patch for this about 80% complete. I intend to complete
> and
> >>  apply it before tagging.
> >>
> >> Given these (and no more issues raised this week) I'm currently
> >> expecting the tags to be towards the end of the week.
> >>
> >
> > Can we release a stable Jakarta migration tool before that release ?
> There
> > are a couple changes that could be picked up and since it's a
> subcomponent
> > it would need to be declared stable anyway.
>
> Sure. 0.3.0 or 1.0.0 ?
>

I think it should move to stable 1.0, unless there's some mandatory feature
that got forgotten.

Rémy


>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Tagging May releases towards the end of this week

2021-05-04 Thread Mark Thomas

On 04/05/2021 08:29, Rémy Maucherat wrote:

On Tue, May 4, 2021 at 9:26 AM Mark Thomas  wrote:


Hi all,

It is the start of a new month so time to tag and release. I have a few
things I'd like to get fixed first:

1. BZ 65272 (allow CR as HTTP line separator).
 I'm planning on applying PR 417 to address this before I tag unless
 there are objections.

2. BZ 65262 (WebSocket & InstanceManager)
 I have a patch for this about 80% complete. I intend to complete and
 apply it before tagging.

Given these (and no more issues raised this week) I'm currently
expecting the tags to be towards the end of the week.



Can we release a stable Jakarta migration tool before that release ? There
are a couple changes that could be picked up and since it's a subcomponent
it would need to be declared stable anyway.


Sure. 0.3.0 or 1.0.0 ?

Mark

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



Re: Tagging May releases towards the end of this week

2021-05-04 Thread Rémy Maucherat
On Tue, May 4, 2021 at 9:26 AM Mark Thomas  wrote:

> Hi all,
>
> It is the start of a new month so time to tag and release. I have a few
> things I'd like to get fixed first:
>
> 1. BZ 65272 (allow CR as HTTP line separator).
> I'm planning on applying PR 417 to address this before I tag unless
> there are objections.
>
> 2. BZ 65262 (WebSocket & InstanceManager)
> I have a patch for this about 80% complete. I intend to complete and
> apply it before tagging.
>
> Given these (and no more issues raised this week) I'm currently
> expecting the tags to be towards the end of the week.
>

Can we release a stable Jakarta migration tool before that release ? There
are a couple changes that could be picked up and since it's a subcomponent
it would need to be declared stable anyway.

Rémy


>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Tagging May releases towards the end of this week

2021-05-04 Thread Mark Thomas

Hi all,

It is the start of a new month so time to tag and release. I have a few 
things I'd like to get fixed first:


1. BZ 65272 (allow CR as HTTP line separator).
   I'm planning on applying PR 417 to address this before I tag unless
   there are objections.

2. BZ 65262 (WebSocket & InstanceManager)
   I have a patch for this about 80% complete. I intend to complete and
   apply it before tagging.

Given these (and no more issues raised this week) I'm currently 
expecting the tags to be towards the end of the week.


Mark

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



[GitHub] [tomcat] markt-asf commented on a change in pull request #417: Fix BZ 65272. Restore the use of LF as an HTTP line terminator

2021-05-04 Thread GitBox


markt-asf commented on a change in pull request #417:
URL: https://github.com/apache/tomcat/pull/417#discussion_r625561783



##
File path: test/org/apache/coyote/http11/TestHttp11InputBuffer.java
##
@@ -687,24 +691,6 @@ public void testInvalidEndOfRequestLine01() {
 }
 
 
-@Test

Review comment:
   Yes, the correct test is below.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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