Skip to content

Commit

Permalink
Revert "Merge pull request payara#6007 from Pandrex247/FISH-6588-Paya…
Browse files Browse the repository at this point in the history
…raExecutorService-Fix-No-Revert"

This reverts commit 274da07, reversing
changes made to d2b7a54.
  • Loading branch information
Pandrex247 committed Dec 5, 2022
1 parent 365ae50 commit 8c51b3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
// Portions Copyright 2022 Payara Foundation and/or its affiliates.

package org.glassfish.api.event;

Expand All @@ -58,13 +57,11 @@ public final class EventTypes<T> {
private static final Map<String, EventTypes<?>> EVENTS = new ConcurrentHashMap<>();

// stock events.
public static final String POST_SERVER_INIT_NAME = "post_server_init";
public static final String SERVER_STARTUP_NAME = "server_startup";
public static final String SERVER_READY_NAME = "server_ready";
public static final String PREPARE_SHUTDOWN_NAME = "prepare_shutdown";
public static final String SERVER_SHUTDOWN_NAME = "server_shutdown";

public static final EventTypes<?> POST_SERVER_INIT = create(POST_SERVER_INIT_NAME);
public static final EventTypes<?> SERVER_STARTUP = create(SERVER_STARTUP_NAME);
public static final EventTypes<?> SERVER_READY = create(SERVER_READY_NAME);
public static final EventTypes<?> SERVER_SHUTDOWN = create(SERVER_SHUTDOWN_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ public boolean run() {
logger.log(level, "Init level done in " +
(initFinishTime - context.getCreationTime()) + " ms");
}
events.send(new Event(EventTypes.POST_SERVER_INIT), false);

appInstanceListener.startRecordingFutures();
if (!proceedTo(StartupRunLevel.VAL)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) [2017-2022] Payara Foundation and/or its affiliates. All rights reserved.
* Copyright (c) [2017-2019] Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -69,6 +69,7 @@
import org.glassfish.api.event.EventTypes;
import org.glassfish.api.event.Events;
import org.glassfish.internal.api.Globals;
import org.glassfish.internal.deployment.Deployment;
import org.jvnet.hk2.annotations.Optional;
import org.jvnet.hk2.annotations.Service;
import org.jvnet.hk2.config.ConfigBeanProxy;
Expand All @@ -80,8 +81,6 @@
import com.sun.enterprise.config.serverbeans.Config;

/**
* Service that provides a shared executor service for server internals rather than all services creating and using
* their own.
*
* @author Andrew Pielage
*/
Expand Down Expand Up @@ -131,7 +130,7 @@ public void postConstruct() {
*/
@Override
public void event(Event event) {
if (event.is(EventTypes.POST_SERVER_INIT)) {
if (event.is(Deployment.ALL_APPLICATIONS_LOADED)) {
// Embedded containers can be started and stopped multiple times.
// Thus we need to initialize anytime the server instance is started.
if (null == threadPoolExecutor) {
Expand Down

0 comments on commit 8c51b3d

Please sign in to comment.