Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the last resort fallback needs to end up in the current runtime #657

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target/
*.ipr
*.iws
.idea
.DS_Store

*.log
*.tlog
Expand Down
25 changes: 25 additions & 0 deletions jaxws-ri/boms/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,31 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
Expand Down
10 changes: 10 additions & 0 deletions jaxws-ri/docs/release-documentation/src/main/docbook/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
<title>Changelog</title>

<itemizedlist>
<listitem>
<para>4.0.2</para>

<itemizedlist>
<listitem>
<para>Replaces the last resort fallback to Java SE provided runtime by the fallback to the current WS runtime</para>
</listitem>
</itemizedlist>
</listitem>

<listitem>
<para>4.0.1</para>

Expand Down
36 changes: 23 additions & 13 deletions jaxws-ri/extras/jaxws-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.8.5</version>
<version>3.9.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.5</version>
<version>3.9.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.4.1</version>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.4</version>
<version>3.9.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -98,17 +98,17 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.5</version>
<version>3.9.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>1.8.0</version>
<version>1.9.15</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>1.8.0</version>
<version>1.9.15</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -171,7 +171,7 @@
<spotbugs.exclude/>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>Normal</spotbugs.threshold>
<spotbugs.version>4.7.3.4</spotbugs.version>
<spotbugs.version>4.7.3.5</spotbugs.version>
<findsecbugs.version>1.11.0</findsecbugs.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
Expand All @@ -194,7 +194,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -254,7 +259,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.2.1</version>
<version>8.4.0</version>
<configuration>
<failBuildOnCVSS>7</failBuildOnCVSS>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
Expand Down Expand Up @@ -283,7 +288,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>4.0.0-M8</version>
<version>4.0.0-M9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -403,7 +413,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.5.1</version>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -565,7 +575,7 @@
</property>
</activation>
<properties>
<jacoco.version>0.8.8</jacoco.version>
<jacoco.version>0.8.10</jacoco.version>
<jacoco.skip>false</jacoco.skip>
<jacoco.includes>org.jvnet.jax_ws_commons.jaxws.*,com.sun.xml.*</jacoco.includes>
</properties>
Expand Down
13 changes: 9 additions & 4 deletions jaxws-ri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<spotbugs.exclude/>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>Normal</spotbugs.threshold>
<spotbugs.version>4.7.3.4</spotbugs.version>
<spotbugs.version>4.7.3.5</spotbugs.version>
<findsecbugs.version>1.11.0</findsecbugs.version>

<maven.compiler.release>11</maven.compiler.release>
Expand Down Expand Up @@ -203,7 +203,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -224,7 +224,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.glassfish.hk2</groupId>
Expand Down Expand Up @@ -389,6 +389,11 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
Expand All @@ -411,7 +416,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.2.1</version>
<version>8.4.0</version>
<configuration>
<failBuildOnCVSS>7</failBuildOnCVSS>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
Expand Down
11 changes: 8 additions & 3 deletions jaxws-ri/runtime/policy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<spotbugs.exclude>${project.basedir}/exclude.xml</spotbugs.exclude>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>Low</spotbugs.threshold>
<spotbugs.version>4.7.3.4</spotbugs.version>
<spotbugs.version>4.7.3.5</spotbugs.version>
<findsecbugs.version>1.11.0</findsecbugs.version>

<maven.compiler.release>11</maven.compiler.release>
Expand Down Expand Up @@ -188,6 +188,11 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -196,7 +201,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -384,7 +389,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.2.1</version>
<version>8.4.0</version>
<configuration>
<failBuildOnCVSS>7</failBuildOnCVSS>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -28,13 +28,10 @@
import jakarta.xml.ws.WebServiceException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.util.logging.Level;

/**
Expand All @@ -51,7 +48,7 @@
// TODO Move the logic of this class directly into MetroConfig class.
class MetroConfigLoader {

private static final String JAXWS_TUBES_JDK_XML_RESOURCE = "jaxws-tubes-default.xml";
private static final String JAXWS_TUBES_DEFAULT_XML_RESOURCE = "jaxws-tubes-default.xml";
private static final Logger LOGGER = Logger.getLogger(MetroConfigLoader.class);

private MetroConfigName defaultTubesConfigNames;
Expand Down Expand Up @@ -244,12 +241,18 @@ private static InputStream getConfigInputStream(URL resourceUrl) throws IOExcept
if (resourceUrl != null) {
is = resourceUrl.openStream();
} else {
is = MetroConfigLoader.class.getResourceAsStream(JAXWS_TUBES_JDK_XML_RESOURCE);
//the only case this can happen is when some extension does not provide
//a resource which it also defines; in pre-SE11 env, this would fallback
//to the runtime included in the JDK, in SE11+, we must be the fallback
URL resUrl = MetroConfigLoader.class.getResource(JAXWS_TUBES_DEFAULT_XML_RESOURCE);
LOGGER.config(TubelineassemblyMessages.MASM_0021_BUILTIN_CFG_FILE(JAXWS_TUBES_DEFAULT_XML_RESOURCE, resUrl));

if (is == null)
if (resUrl == null) {
throw LOGGER.logSevereException(
new IllegalStateException(
TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(JAXWS_TUBES_JDK_XML_RESOURCE)));
TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(JAXWS_TUBES_DEFAULT_XML_RESOURCE)));
}
is = resUrl.openStream();
}

return is;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,6 +15,9 @@
Document : jaxws-tubes-default.xml
Author : Marek Potociar
Description: The default JAX-WS tubes configuration file.

see also com.sun.xml.ws.assembler.MetroConfigLoader
and com/sun/xml/ws/assembler/jaxws-tubes-default.xml
-->

<metro xmlns='http://java.sun.com/xml/ns/metro/config' version="1.0">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
http://www.eclipse.org/org/documents/edl-v10.php.

SPDX-License-Identifier: BSD-3-Clause

-->

<!--
A copy of /META-INF/jaxws-tubes-default.xml serving as a hard fallback
as it used to be when this was included in SE (up to SE 10)
-->

<metro xmlns='http://java.sun.com/xml/ns/metro/config' version="1.0">
<tubelines default="#default-metro-tubeline">
<tubeline name="default-metro-tubeline">
<client-side>
<!--<tube-factory className="com.sun.xml.ws.assembler.jaxws.TerminalTubeFactory" />-->
<tube-factory className="com.sun.xml.ws.assembler.jaxws.HandlerTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.ValidationTubeFactory" />
<!--<tube-factory className="com.sun.xml.ws.assembler.jaxws.MonitoringTubeFactory" />-->
<tube-factory className="com.sun.xml.ws.assembler.jaxws.MustUnderstandTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.AddressingTubeFactory" />
<tube-factory className="com.sun.xml.ws.dump.MessageDumpingTubeFactory" />
<!-- TODO: secrity tube(?) -->
<tube-factory className="com.sun.xml.ws.assembler.jaxws.BasicTransportTubeFactory" />
</client-side>
<endpoint-side>
<!-- TODO: secrity tube(?) -->
<tube-factory className="com.sun.xml.ws.dump.MessageDumpingTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.AddressingTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.MustUnderstandTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.MonitoringTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.HandlerTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.ValidationTubeFactory" />
<tube-factory className="com.sun.xml.ws.assembler.jaxws.TerminalTubeFactory" />
</endpoint-side>
</tubeline>
</tubelines>
</metro>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -31,7 +31,7 @@ MASM0009_CANNOT_FORM_VALID_URL = MASM0009: Cannot form a valid URL from the reso

MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION = MASM0010: Unable to unmarshall metro config file from location [ {0} ]

MASM0011_LOADING_RESOURCE = MASM0011: Trying to load [ {0} ] via parent resouce loader [ {1} ]
MASM0011_LOADING_RESOURCE = MASM0011: Trying to load [ {0} ] via parent resource loader [ {1} ]

MASM0012_LOADING_VIA_SERVLET_CONTEXT = MASM0012: Trying to load [ {0} ] via servlet context [ {1} ]

Expand All @@ -52,4 +52,6 @@ MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE = MASM0019: Illegal logging l

MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING = MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ]

MASM0021_BUILTIN_CFG_FILE = MASM0021: Built-in [ {0} ] configuration file located at [ {1} ]

MASM0050_DEPRECATED_TUBE = MASM0050: {0} factory has been deprecated, use {1} instead.