Skip to content

Commit

Permalink
Prepare dependencies for Tyrus 2.2.0-M2
Browse files Browse the repository at this point in the history
Missing Servlet & JSP final

Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed May 30, 2024
1 parent a4756fd commit 353c975
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 20 deletions.
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The project maintains the following source code repositories:
## Third-party Content
This project leverages the following third party content:

jakarta.enterprise.cdi-api Version 4.1.0.RC1
jakarta.enterprise.cdi-api Version 4.1.0
* License: Apache License, 2.0
* Copyright 2010, Red Hat, Inc., and individual contributors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<java.version>11</java.version>
<tyrus.version>${project.version}</tyrus.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.plugin.version>3.11.0</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.war.plugin.version>3.4.0</maven.war.plugin.version>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -46,6 +46,15 @@
*/
public class TyrusHttpUpgradeHandler implements HttpUpgradeHandler, ReadListener {

/**
* <p>
* The size to precede OutOfMemory Exception and potentially DDoS attacks when buffering incoming WebSocket frames.
* </p>
* <p>
* The default value is 4194315 bytes, which correspond to 4M plus few bytes to frame headers.
* </p>
*
*/
public static final String FRAME_BUFFER_SIZE = "org.glassfish.tyrus.servlet.incoming-buffer-size";

private final CountDownLatch connectionLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -98,6 +107,12 @@ public void close(CloseReason reason) {
connectionLatch.countDown();
}

/**
* Sets the required information before {@link #init(WebConnection)} is invoked.
* @param upgradeInfo The WebSocket UpgradeInfo.
* @param writer The Tyrus SPI Writer.
* @param authenticated Whether the authentication has been used.
*/
public void preInit(WebSocketEngine.UpgradeInfo upgradeInfo, Writer writer, boolean authenticated) {
this.upgradeInfo = upgradeInfo;
this.writer = writer;
Expand Down Expand Up @@ -249,6 +264,10 @@ public String toString() {
return sb.toString();
}

/**
* Override the default {@link #FRAME_BUFFER_SIZE}.
* @param incomingBufferSize The new incoming frame buffer size value.
*/
public void setIncomingBufferSize(int incomingBufferSize) {
this.incomingBufferSize = incomingBufferSize;
}
Expand Down
34 changes: 17 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,24 @@
<websocket-api.version>2.2.0</websocket-api.version>
<annotation-api.version>3.0.0</annotation-api.version>
<activation.api.version>2.1.3</activation.api.version> <!-- inherited from JAX-B -->
<cdi-api.version>4.1.0.RC1</cdi-api.version>
<cdi-api.version>4.1.0</cdi-api.version>
<ejb-api.version>4.0.1</ejb-api.version>
<grizzly.version>4.0.2</grizzly.version>
<glassfish.version>8.0.0-M3</glassfish.version>
<glassfish.version>8.0.0-JDK17-M6</glassfish.version>
<inject.api.version>2.0.1</inject.api.version><!-- inherited from CDI, do not update unless inline with it -->
<jaxb.api.version>4.0.2</jaxb.api.version>
<jaxb.ri.version>4.0.5</jaxb.ri.version>
<jline.version>2.14.5</jline.version>
<json-api.version>2.1.3</json-api.version>
<json-impl.version>1.1.6</json-impl.version>
<servlet.api.version>6.1.0</servlet.api.version>
<servlet.api.version>6.1.0-M2</servlet.api.version>
<spring.boot.version>2.6.7</spring.boot.version>


<java.version>11</java.version>
<maven.compiler.plugin.version>3.11.0</maven.compiler.plugin.version>
<maven-javadoc-plugin.version>3.6.2</maven-javadoc-plugin.version>
<maven.surefire.plugin.version>3.2.1</maven.surefire.plugin.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>
<maven.war.plugin.version>3.4.0</maven.war.plugin.version>

<api_package>jakarta.websocket</api_package>
Expand Down Expand Up @@ -171,15 +171,15 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.6.0</version>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>${maven.compiler.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand All @@ -191,23 +191,23 @@
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.1</version>
<version>3.2.5</version>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.3</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<version>${maven.war.plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
Expand Down Expand Up @@ -237,7 +237,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
Expand All @@ -262,7 +262,7 @@
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>maven-istack-commons-plugin</artifactId>
<version>2.6.1</version>
<version>2.11</version>
<executions>
<execution>
<phase>generate-sources</phase>
Expand Down Expand Up @@ -314,7 +314,7 @@
<doctitle>Tyrus ${project.version} API Documentation</doctitle>
<windowtitle>Tyrus ${project.version} API</windowtitle>
<links>
<link>https://projects.eclipse.org/projects/ee4j.tyrus</link>
<link>https://eclipse-ee4j.github.io/tyrus-project.github.io/apidocs/latest/</link>
</links>
<excludePackageNames>
*.core.l10n.*:*.internal.*:org.glassfish.tyrus.core.wsadl.model
Expand Down Expand Up @@ -605,7 +605,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.2</version>
<version>3.0.5</version>
<reportSets>
<reportSet>
<configuration>
Expand Down
35 changes: 35 additions & 0 deletions tests/servlet/embedded-glassfish-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,39 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>staging</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus Staging</name>
<url>${sonatypeOssDistMgmtStagingUrl}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus Staging</name>
<url>${sonatypeOssDistMgmtStagingUrl}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

0 comments on commit 353c975

Please sign in to comment.