Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions appserver/admingui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,12 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>
</profile>
</profiles>
</project>
1 change: 0 additions & 1 deletion appserver/admingui/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@
</properties>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
<sun:textField id="nameText" text="#{pageSession.valueMap['name']}" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.common.Name']}" styleClass="required" required="#{true}" />
</sun:property>

<sun:property id="classname" rendered="#{edit}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.threadPool.classname}" helpText="$resource{i18n_web.threadPool.classnameHelp}">
<sun:textField id="classname" styleClass="required" columns="$int{50}" maxLength="#{sessionScope.fieldLengths['maxLength.threadPool.classname']}" text="#{pageSession.valueMap['classname']}" />
<sun:property id="classname" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.threadPool.classname}" helpText="$resource{i18n_web.threadPool.classnameHelp}">
<sun:textField id="classname" columns="$int{50}" maxLength="#{sessionScope.fieldLengths['maxLength.threadPool.classname']}" text="#{pageSession.valueMap['classname']}" />
</sun:property>

<sun:property id="virtual" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.threadPool.virtual}" helpText="$resource{i18n_web.threadPool.virtualHelp}">
<sun:checkbox id="virtual" selected="#{pageSession.valueMap['virtual']}" selectedValue="true" />
</sun:property>

<sun:property id="max" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.threadPool.maxQueue}" helpText="$resource{i18n_web.threadPool.maxQueueHelp}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}/#{pageSession.encodedName}");
setPageSessionAttribute(key="rest-api" value="true");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json", valueMap="#{pageSession.valueMap}");
setPageSessionAttribute(key="convertToFalseList" value={"virtual"});
//set the following for including buttons.inc
setPageSessionAttribute(key="edit" value="#{true}" );
setPageSessionAttribute(key="showDefaultButton" value="#{true}" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
setPageSessionAttribute(key="rest-api" value="true");
gf.getDefaultValues(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}");
mapPut(map="#{pageSession.valueMap}" key="target" value="#{pageSession.configName}");
setPageSessionAttribute(key="skipAttrsList" value={"classname"});
setPageSessionAttribute(key="skipAttrsList" value={});
setPageSessionAttribute(key="convertToFalseList" value={"virtual"});
setPageSessionAttribute(key="convertToFalseList" value={"virtual"});
//set the following for including buttons.inc
setPageSessionAttribute(key="edit" value="#{false}" );
setPageSessionAttribute(key="showDefaultButton" value="#{true}" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ threadPool.threadPoolIdCol=Thread Pool ID
threadPool.nameHelp=Name of the thread pool
threadPool.classname=Class Name:
threadPool.classnameHelp=The name of the class that implements the thread pool
threadPool.virtual=Use Virtual Threads:
threadPool.virtualHelp=Enable virtual threads for this thread pool. When enabled, the thread pool will use virtual threads if no custom class name is specified.
threadPool.virtual=Use Virtual Threads:
threadPool.virtualHelp=Enable virtual threads for this thread pool. When enabled, the thread pool will use virtual threads if no custom class name is specified.
threadPool.timeoutCol=Idle Thread Timeout
threadPool.timeout=Idle Thread Timeout:
threadPool.timeoutHelp=The maximum amount of time that a thread can remain idle in the pool. After this time expires, the thread is removed from the pool.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
* Copyright (c) 2018, 2025 Eclipse Krazo committers and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,14 +16,12 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.eclipse.krazo.cdi.types;

import org.eclipse.krazo.binding.validate.ValidationInterceptorBinding;
import org.eclipse.krazo.cdi.AroundController;
import org.eclipse.krazo.util.ControllerUtils;
package org.eclipse.krazo.cdi.types;

import jakarta.enterprise.inject.spi.AnnotatedMethod;
import jakarta.enterprise.inject.spi.AnnotatedType;

import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.LinkedHashSet;
Expand All @@ -31,6 +30,10 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import org.eclipse.krazo.binding.validate.ValidationInterceptorBinding;
import org.eclipse.krazo.cdi.AroundController;
import org.eclipse.krazo.util.ControllerUtils;

/**
* This class can create a modified version of a AnnotatedType to inject custom behavior
* into controllers.
Expand Down Expand Up @@ -110,4 +113,4 @@ private static <T> boolean isOneOf(T object, T... objects) {
return false;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
import com.sun.ejb.containers.EJBTimerService;
import com.sun.ejb.containers.EjbContainerUtil;
import com.sun.ejb.containers.EjbContainerUtilImpl;
import com.sun.enterprise.ee.cms.core.CallBack;
import com.sun.enterprise.ee.cms.core.GMSConstants;
import com.sun.enterprise.ee.cms.core.PlannedShutdownSignal;
import com.sun.enterprise.ee.cms.core.Signal;
import com.sun.enterprise.transaction.api.RecoveryResourceRegistry;
import com.sun.enterprise.transaction.spi.RecoveryEventListener;

Expand All @@ -35,6 +31,10 @@
import org.glassfish.gms.bootstrap.GMSAdapter;
import org.glassfish.gms.bootstrap.GMSAdapterService;
import org.glassfish.hk2.api.PostConstruct;
import org.glassfish.shoal.gms.api.core.CallBack;
import org.glassfish.shoal.gms.api.core.GMSConstants;
import org.glassfish.shoal.gms.api.core.PlannedShutdownSignal;
import org.glassfish.shoal.gms.api.core.Signal;
import org.jvnet.hk2.annotations.Service;

@Service
Expand Down
1 change: 0 additions & 1 deletion appserver/grizzly/glassfish-grizzly-extra-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</parent>

<artifactId>glassfish-grizzly-extra-all</artifactId>
<packaging>jar</packaging>

<name>Glassfish Grizzly extra jars Combining</name>
<description>combining of all glassfish grizzly extra jars</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2026 Contributors to the Eclipse Foundation.
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -14,12 +15,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package org.shoal.ha.store;
package org.glassfish.main.shoal.ha.store;

import org.glassfish.ha.common.GlassFishHAReplicaPredictor;
import org.glassfish.ha.common.HACookieInfo;
import org.glassfish.ha.common.HACookieManager;
import org.shoal.ha.mapper.DefaultKeyMapper;
import org.glassfish.shoal.ha.cache.mapper.DefaultKeyMapper;

/**
* @author Mahesh Kannan
Expand All @@ -29,18 +30,18 @@ public class GlassFishKeyMapper
extends DefaultKeyMapper
implements GlassFishHAReplicaPredictor {

private static final String[] _EMPTY_TARGETS = new String[] {null, null};

public GlassFishKeyMapper(String instanceName, String groupName) {
super(instanceName, groupName);
public GlassFishKeyMapper(String instanceName) {
super(instanceName);
}


@Override
public HACookieInfo makeCookie(String groupName, Object key, String oldReplicaCookie) {
String cookieStr = null;

if (key != null) {
cookieStr = super.getMappedInstance(groupName, key);// super.getReplicaChoices(groupName, key);
final String cookieStr;
if (key == null) {
cookieStr = null;
} else {
cookieStr = super.getMappedInstance(groupName, key);
}
HACookieInfo ha = new HACookieInfo(cookieStr, oldReplicaCookie);
return ha;
Expand All @@ -49,22 +50,9 @@ public HACookieInfo makeCookie(String groupName, Object key, String oldReplicaCo
@Override
public String getMappedInstance(String groupName, Object key1) {
HACookieInfo cookieInfo = HACookieManager.getCurrent();
if (cookieInfo.getNewReplicaCookie() != null) {
return cookieInfo.getNewReplicaCookie();
} else {
if (cookieInfo.getNewReplicaCookie() == null) {
return super.getMappedInstance(groupName, key1);
}
return cookieInfo.getNewReplicaCookie();
}

/*
@Override
public String getReplicaChoices(String groupName, Object key) {
HACookieInfo cookieInfo = HACookieManager.getCurrent();
if (cookieInfo.getOldReplicaCookie() != null) {
return cookieInfo.getOldReplicaCookie();
} else {
return super.getReplicaChoices(groupName, key);
}
}
*/
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2026 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 All @@ -14,7 +15,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package org.shoal.ha.store;
package org.glassfish.main.shoal.ha.store;


import java.io.Serializable;
Expand All @@ -26,17 +27,16 @@
import org.glassfish.ha.store.api.BackingStoreFactory;
import org.glassfish.ha.store.api.BackingStoreTransaction;
import org.glassfish.ha.store.api.Storeable;
import org.glassfish.shoal.ha.cache.mapper.KeyMapper;
import org.glassfish.shoal.ha.cache.store.backing.ReplicatedBackingStore;
import org.glassfish.shoal.ha.cache.store.backing.StoreableReplicatedBackingStore;
import org.jvnet.hk2.annotations.Service;
import org.shoal.adapter.store.ReplicatedBackingStore;
import org.shoal.adapter.store.StoreableReplicatedBackingStore;
import org.shoal.ha.mapper.KeyMapper;

/**
* @author Mahesh Kannan
*/
@Service(name="shoal-backing-store-factory")
public class ReplicatedBackingStoreFactory
implements BackingStoreFactory {
public class ReplicatedBackingStoreFactory implements BackingStoreFactory {

public ReplicatedBackingStoreFactory() {
}
Expand All @@ -48,20 +48,19 @@ public ReplicatedBackingStoreFactory(Properties p) {
public <K extends Serializable, V extends Serializable> BackingStore<K, V> createBackingStore(BackingStoreConfiguration<K, V> conf)
throws BackingStoreException {

KeyMapper keyMapper = new GlassFishKeyMapper(conf.getInstanceName(), conf.getClusterName());
KeyMapper keyMapper = new GlassFishKeyMapper(conf.getInstanceName());
conf.getVendorSpecificSettings().put("key.mapper", keyMapper);

Class<V> vClazz = conf.getValueClazz();
if (Storeable.class.isAssignableFrom(vClazz)) {
StoreableReplicatedBackingStore srbs = new StoreableReplicatedBackingStore();
StoreableReplicatedBackingStore<K, V> srbs = new StoreableReplicatedBackingStore<>();
srbs.initialize(conf);
return srbs;
} else {
ReplicatedBackingStore<K, V> bStore = new ReplicatedBackingStore<K, V>();
bStore.initialize(conf);
System.out.println("GlassFish2ShoalBackingStoreFactory:: CREATED an instance of: " + bStore.getClass().getName());
return bStore;
}
ReplicatedBackingStore<K, V> bStore = new ReplicatedBackingStore<K, V>();
bStore.initialize(conf);
System.out.println("GlassFish2ShoalBackingStoreFactory:: CREATED an instance of: " + bStore.getClass().getName());
return bStore;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
import com.sun.enterprise.config.serverbeans.Nodes;
import com.sun.enterprise.config.serverbeans.Server;
import com.sun.enterprise.config.serverbeans.Servers;
import com.sun.enterprise.ee.cms.core.CallBack;
import com.sun.enterprise.ee.cms.core.FailureNotificationSignal;
import com.sun.enterprise.ee.cms.core.JoinedAndReadyNotificationSignal;
import com.sun.enterprise.ee.cms.core.PlannedShutdownSignal;
import com.sun.enterprise.ee.cms.core.Signal;
import com.sun.enterprise.ee.cms.core.SignalAcquireException;
import com.sun.enterprise.ee.cms.core.SignalReleaseException;
import com.sun.logging.LogDomains;

import java.net.InetAddress;
Expand All @@ -57,6 +50,13 @@
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.orb.admin.config.IiopListener;
import org.glassfish.orb.admin.config.IiopService;
import org.glassfish.shoal.gms.api.core.CallBack;
import org.glassfish.shoal.gms.api.core.FailureNotificationSignal;
import org.glassfish.shoal.gms.api.core.JoinedAndReadyNotificationSignal;
import org.glassfish.shoal.gms.api.core.PlannedShutdownSignal;
import org.glassfish.shoal.gms.api.core.Signal;
import org.glassfish.shoal.gms.api.core.SignalAcquireException;
import org.glassfish.shoal.gms.api.core.SignalReleaseException;
import org.omg.CORBA.ORBPackage.InvalidName;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
package org.glassfish.persistence.ejb.entitybean.container.distributed;

import com.sun.ejb.containers.EjbContainerUtil;
import com.sun.enterprise.ee.cms.core.CallBack;
import com.sun.enterprise.ee.cms.core.GroupManagementService;
import com.sun.enterprise.ee.cms.core.MessageSignal;
import com.sun.enterprise.ee.cms.core.Signal;
import com.sun.logging.LogDomains;

import jakarta.inject.Inject;
Expand All @@ -30,6 +26,10 @@

import org.glassfish.gms.bootstrap.GMSAdapter;
import org.glassfish.gms.bootstrap.GMSAdapterService;
import org.glassfish.shoal.gms.api.core.CallBack;
import org.glassfish.shoal.gms.api.core.GroupManagementService;
import org.glassfish.shoal.gms.api.core.MessageSignal;
import org.glassfish.shoal.gms.api.core.Signal;
import org.jvnet.hk2.annotations.Service;

@Service
Expand Down
2 changes: 1 addition & 1 deletion appserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

<!-- Jakarta WebSocket -->
<jakarta.websocket-api.version>2.2.0</jakarta.websocket-api.version>
<tyrus.version>2.2.1</tyrus.version>
<tyrus.version>2.2.2</tyrus.version>

<!-- Jakarta Concurrency -->
<jakarta.concurrent-api.version>3.1.1</jakarta.concurrent-api.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,30 @@

import java.io.IOException;
import java.io.PrintWriter;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;

@WebServlet("/lock")
public class LockServlet extends HttpServlet {

private static final ConcurrentHashMap<String, AtomicBoolean> LOCKS = new ConcurrentHashMap<>();
private static final ConcurrentHashMap<String, CompletableFuture<Void>> LOCKS = new ConcurrentHashMap<>();

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String action = req.getParameter("action");
String idLock = req.getParameter("idLock");
if ("lock".equals(action)) {
AtomicBoolean lock = new AtomicBoolean(true);
CompletableFuture<Void> lock = new CompletableFuture<>();
LOCKS.put(idLock, lock);
while (lock.get() && !Thread.currentThread().isInterrupted()) {
Thread.onSpinWait();
}
lock.join();
sendResponse("Unlocked " + idLock + ". Still locked around " + LOCKS.size() + " requests.", resp);
} else if ("unlock".equals(action)) {
AtomicBoolean lock = LOCKS.remove(idLock);
CompletableFuture<Void> lock = LOCKS.remove(idLock);
if (lock == null) {
throw new ServletException("Unknown lock: " + lock);
}
// Release another thread trapped in the loop
lock.set(false);
lock.complete(null);
sendResponse("Unlocking " + idLock + ".", resp);
} else if ("count".equals(action)) {
sendResponse(LOCKS.size(), resp);
Expand Down
Loading