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

8.0 #24818

Merged
merged 28 commits into from
Feb 21, 2024
Merged

8.0 #24818

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3a74752
Fixes issue #24762 Replaces 2 debug locations to use AMXLoggerInfo
escay Feb 7, 2024
d555f5e
Merge pull request #24800 from escay/issue_24762
arjantijms Feb 10, 2024
0fe8a50
Fixes issue #24746 replaces all http://www.oracle.com/technetwork links
escay Feb 11, 2024
1b3d946
Clean event processing code
avpinchuk Feb 11, 2024
c25592c
Clean event dispatching code
avpinchuk Feb 11, 2024
23dc34d
Merge pull request #24803 from escay/issue_24746
arjantijms Feb 12, 2024
73d5376
Refactor concurrent access
avpinchuk Feb 12, 2024
48e89d0
Remove obsoleted support references
avpinchuk Feb 12, 2024
63246da
Remove obsoleted support references from error messages reference
avpinchuk Feb 12, 2024
b515e00
Merge pull request #24804 from avpinchuk/refactor-events-processing
arjantijms Feb 13, 2024
6f6b961
GlassFishORBHelper changed to singleton, lifecycle
dmatej Feb 13, 2024
9fbe46d
Quick code cleanup
dmatej Feb 12, 2024
d0ba42d
Using the same orb instance outside the synchronized block, extracted…
dmatej Feb 13, 2024
8b009ae
Merge pull request #24807 from avpinchuk/fix-log-messages
dmatej Feb 13, 2024
34a3814
Simplified if in GlassFishORBHelper
dmatej Feb 13, 2024
6330096
Fixes contribution year
avpinchuk Feb 13, 2024
04292d5
Merge pull request #24806 from dmatej/orbinit
dmatej Feb 13, 2024
2cac164
Add event filtering test
avpinchuk Feb 13, 2024
cf1e533
Merge pull request #24809 from avpinchuk/fix-contribution-year
dmatej Feb 13, 2024
45d8995
Merge pull request #24810 from avpinchuk/event-filtering-test
dmatej Feb 14, 2024
9dde62a
Increase stop-domain command timeout in tests
avpinchuk Feb 14, 2024
3ff7794
Take into account JDK versions when patching
arjantijms Feb 15, 2024
ff7388f
Merge pull request #24812 from avpinchuk/increase-stop-timeout
arjantijms Feb 15, 2024
b389a64
Merge pull request #24813 from arjantijms/patching_versions
arjantijms Feb 15, 2024
ddb9c9d
Merge remote-tracking branch 'origin/master' into 8.0
arjantijms Feb 17, 2024
0503285
Store the DistinguishedPrincipalCredential in the Subject principals
arjantijms Feb 19, 2024
bb3e535
Merge pull request #24815 from arjantijms/sso_distinguished
arjantijms Feb 19, 2024
940e927
Merge remote-tracking branch 'origin/master' into 8.0
arjantijms Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h4><a id="sthref329" name="sthref329"></a><a id="sthref330" name="sthref330"></
</dd>
<dt>Debug</dt>
<dd>
<p>An indication of whether Java Platform Debugger Architecture (JPDA) (<code><a href="http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html/">http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html/</a></code>) debugging is enabled for the instance. This field is read only.</p>
<p>An indication of whether Java Platform Debugger Architecture (JPDA) (<code><a href="https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html/">https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html/</a></code>) debugging is enabled for the instance. This field is read only.</p>
<p>If an instance is started from the Administration Console, JPDA debugging is not enabled for the instance. To start an instance with JPDA debugging enabled, use the <a href="http://www.oracle.com/pls/topic/lookup?ctx=E26576_01&id=GSRFM00236"><code>start-instance</code>(1)</a> subcommand.</p>
</dd>
<dt>HTTP Ports</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h4>Predefined System Properties</h4>
</dd>
<dt><code>JAVA_DEBUGGER_PORT</code></dt>
<dd>
<p>This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (<code><a href="http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html/">http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html/</a></code>) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.</p>
<p>This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) (<code><a href="https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html/">https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/jpda.html/</a></code>) debugger. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges.</p>
</dd>
<dt><code>JMS_PROVIDER_PORT</code></dt>
<dd>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -143,7 +144,7 @@ private void registerIfBatchJobsDirExists(ApplicationInfo applicationInfo) {
}

@Override
public void event(Event event) {
public void event(Event<?> event) {
try {
if (event.is(EventTypes.SERVER_READY)) {
for (String appName : applicationRegistry.getAllApplicationNames()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 2006, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -61,10 +62,6 @@ public final class AMXJ2EEStartupService
org.glassfish.hk2.api.PreDestroy,
AMXLoader, ConfigListener {

private static void debug(final String s) {
System.out.println(s);
}

@Inject
private MBeanServer mMBeanServer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation.
* Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -55,6 +55,7 @@

import org.glassfish.api.admin.ProcessEnvironment;
import org.glassfish.api.admin.ProcessEnvironment.ProcessType;
import org.glassfish.api.deployment.DeploymentContext;
import org.glassfish.api.event.EventListener;
import org.glassfish.api.event.Events;
import org.glassfish.api.naming.GlassfishNamingManager;
Expand Down Expand Up @@ -117,17 +118,17 @@ public void postConstruct() {
}

@Override
public void event(Event event) {
public void event(Event<?> event) {
if (event.is(APPLICATION_LOADED)) {
ApplicationInfo info = APPLICATION_LOADED.getHook(event);

ApplicationInfo info = (ApplicationInfo) event.hook();
loadManagedBeans(info);
registerAppLevelDependencies(info);

} else if (event.is(APPLICATION_UNLOADED)) {
doCleanup(APPLICATION_UNLOADED.getHook(event).getMetaData(Application.class));
ApplicationInfo info = (ApplicationInfo) event.hook();
doCleanup(info.getMetaData(Application.class));
} else if (event.is(DEPLOYMENT_FAILURE)) {
doCleanup(DEPLOYMENT_FAILURE.getHook(event).getModuleMetaData(Application.class));
DeploymentContext context = (DeploymentContext) event.hook();
doCleanup(context.getModuleMetaData(Application.class));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -263,7 +263,7 @@ public String getApplicationName() {
* @param event Event
*/
@Override
public void event(Event event) {
public void event(Event<?> event) {
if (Deployment.UNDEPLOYMENT_VALIDATION.equals(event.type())) {
// this is an application undeploy event
DeploymentContext dc = (DeploymentContext) event.hook();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -594,7 +594,7 @@ private void unregisterBeanValidator(String rarName){
}

@Override
public void event(Event event) {
public void event(Event<?> event) {

// added this pre-check so as to validate whether connector-resources referring
// the application (that has rar or is an standalone rar) are present.
Expand Down
39 changes: 34 additions & 5 deletions appserver/distributions/glassfish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b2</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<executions>
<execution>
<id>do stuff</id>
Expand All @@ -90,26 +108,37 @@
<goal>run</goal>
</goals>
<configuration>
<target>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />

<if>
<bool>
<isgreaterthan arg1="${ant.java.version}" arg2="16"/>
</bool>
<then>
<property name="java17orGreater" value="true"/>
</then>
</if>

<macrodef name="jarupdate">
<attribute name="basedir"/>
<attribute name="includes"/>
<attribute name="destfile"/>
<sequential>
<echo>PATCHING</echo>
<zip destfile="@{destfile}.tmp">
<zipfileset src="@{destfile}" excludes="@{includes}"/>
</zip>
<move file="@{destfile}.tmp" tofile="@{destfile}" />
<zip update="true" basedir="@{basedir}" includes="@{includes}" destfile="@{destfile}" />
</sequential>
</macrodef>


<jarupdate

<jarupdate if:set="java17orGreater"
basedir="${patches}/microprofile-jwt-auth-api" includes="META-INF/MANIFEST.MF"
destfile="${glassfish.modules}/microprofile-jwt-auth-api.jar"
/>
<jarupdate
<jarupdate if:set="java17orGreater"
basedir="${patches}/microprofile-rest-client-api" includes="META-INF/MANIFEST.MF"
destfile="${glassfish.modules}/microprofile-rest-client-api.jar"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -415,7 +415,7 @@ protected void generateArtifacts(DeploymentContext dc) throws DeploymentExceptio
}

@Override
public void event(Event event) {
public void event(Event<?> event) {
if (event.is(Deployment.APPLICATION_PREPARED) && isDas()) {
ExtendedDeploymentContext context = (ExtendedDeploymentContext) event.hook();
OpsParams opsparams = context.getCommandParameters(OpsParams.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -68,14 +69,11 @@ public <K extends Serializable, V extends Serializable> BackingStore<K, V> creat
public void postConstruct() {
BackingStoreFactoryRegistry.register("replicated", this);
Logger.getLogger(ShoalBackingStoreProxy.class.getName()).log(Level.FINE, "Registered SHOAL BackingStore Proxy with persistence-type = replicated");
EventListener glassfishEventListener = new EventListener() {
@Override
public void event(Event event) {
if (event.is(EventTypes.SERVER_SHUTDOWN)) {
BackingStoreFactoryRegistry.unregister("replicated");
Logger.getLogger(ShoalBackingStoreProxy.class.getName()).log(Level.FINE, "Unregistered SHOAL BackingStore Proxy with persistence-type = replicated");
} // else if (event.is(EventTypes.SERVER_READY)) { }
}
EventListener glassfishEventListener = event -> {
if (event.is(EventTypes.SERVER_SHUTDOWN)) {
BackingStoreFactoryRegistry.unregister("replicated");
Logger.getLogger(ShoalBackingStoreProxy.class.getName()).log(Level.FINE, "Unregistered SHOAL BackingStore Proxy with persistence-type = replicated");
} // else if (event.is(EventTypes.SERVER_READY)) { }
};
events.register(glassfishEventListener);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Eclipse Foundation and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024 Eclipse Foundation and/or its affiliates.
*
* 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 @@ -72,7 +72,7 @@ public class GlassFishTestEnvironment {
LOG.log(Level.INFO, "Expected GlassFish directory: {0}", GF_ROOT);
changePassword();
Thread hook = new Thread(() -> {
getAsadmin().exec(10_000, "stop-domain", "--kill", "--force");
getAsadmin().exec(30_000, "stop-domain", "--kill", "--force");
});
Runtime.getRuntime().addShutdownHook(hook);
Asadmin asadmin = getAsadmin().withEnv(ADMIN_USER, ADMIN_PASSWORD);
Expand Down
Loading