From e6815c055a42a9eca40449b0697220e9555fa7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Tue, 31 Mar 2026 21:29:36 +0200 Subject: [PATCH 01/35] Removed magical OrderedSet replacements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- .../enterprise/deployment/AdminObject.java | 8 ++-- .../enterprise/deployment/Application.java | 33 +++++++------ .../ApplicationClientDescriptor.java | 37 ++++++--------- .../deployment/BundleDescriptor.java | 6 +-- .../deployment/ConnectionDefDescriptor.java | 8 ++-- .../deployment/ConnectorDescriptor.java | 26 +++++------ .../deployment/EjbBeanDescriptor.java | 6 +-- .../deployment/EjbBundleDescriptor.java | 4 +- .../deployment/InboundResourceAdapter.java | 8 ++-- .../JndiEnvironmentRefsGroupDescriptor.java | 32 ++++++------- .../JspConfigDefinitionDescriptor.java | 14 ++---- .../deployment/MessageListener.java | 12 ++--- .../deployment/OutboundResourceAdapter.java | 16 +++---- .../deployment/WebBundleDescriptor.java | 46 +++++++++---------- .../ActivationConfigDescriptor.java | 15 +++--- .../descriptor/JspGroupDescriptor.java | 16 +++---- .../descriptor/WebBundleDescriptorImpl.java | 6 +-- .../WebComponentDescriptorImpl.java | 14 +++--- 18 files changed, 138 insertions(+), 169 deletions(-) diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java index 2faf1d45866..f89547d8edc 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -17,8 +17,6 @@ package com.sun.enterprise.deployment; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; /** @@ -32,7 +30,7 @@ public class AdminObject extends Descriptor { private static final long serialVersionUID = 1L; private String theInterface; private String theClass; - private final Set configProperties; + private final OrderedSet configProperties; public AdminObject() { this.configProperties = new OrderedSet<>(); @@ -69,7 +67,7 @@ public void setAdminObjectClass(String cl) { /** * @return Set of EnvironmentProperty */ - public Set getConfigProperties() { + public OrderedSet getConfigProperties() { return configProperties; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java index d81775a134e..6ef7f95af81 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/Application.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2025 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2026 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 @@ -40,7 +40,6 @@ import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; @@ -95,7 +94,7 @@ public class Application extends CommonResourceBundleDescriptor private String generatedXMLDir; // Set of modules in this application - private final Set> modules = new OrderedSet<>(); + private final OrderedSet> modules = new OrderedSet<>(); // True if unique id has been set. Allows callers to avoid // applying unique ids to subcomponents multiple times. @@ -168,7 +167,7 @@ public class Application extends CommonResourceBundleDescriptor private final Set entityManagerFactoryReferences = new HashSet<>(); private final Set entityManagerReferences = new HashSet<>(); - private Set appRoles; + private OrderedSet appRoles; private String libraryDirectory; @@ -774,8 +773,8 @@ public Set getEntityManagerFactories() { * @return the Set of roles in the application. */ @Override - public Set getRoles() { - Set roles = new HashSet<>(); + public OrderedSet getRoles() { + OrderedSet roles = new OrderedSet<>(); for (BundleDescriptor bd : getBundleDescriptors()) { if (bd != null) { roles.addAll(bd.getRoles()); @@ -785,12 +784,12 @@ public Set getRoles() { } /** - * Return the set of org.glassfish.security.common.Role objects + * @return the set of org.glassfish.security.common.Role objects * I have (the ones defined in application xml). */ - public Set getAppRoles() { + public OrderedSet getAppRoles() { if (this.appRoles == null) { - this.appRoles = new HashSet<>(); + this.appRoles = new OrderedSet<>(); } return this.appRoles; } @@ -889,7 +888,7 @@ public void addModule(ModuleDescriptor descriptor) { * * @return the set of bundle descriptors */ - public Set> getModules() { + public OrderedSet> getModules() { return modules; } @@ -1118,11 +1117,11 @@ public BundleDescriptor getStandaloneBundleDescriptor() { * @param type the bundle descriptor type requested * @return the set of bundle descriptors */ - public Set getBundleDescriptors(Class type) { + public OrderedSet getBundleDescriptors(Class type) { if (type == null) { return null; } - Set bundleSet = new OrderedSet<>(); + OrderedSet bundleSet = new OrderedSet<>(); for (ModuleDescriptor aModule : getModules()) { try { T descriptor = type.cast(aModule.getDescriptor()); @@ -1145,11 +1144,11 @@ public Set getBundleDescriptors(Class type) { * @param bundleType the bundle descriptor type requested * @return the set of bundle descriptors */ - public Set getBundleDescriptorsOfType(ArchiveType bundleType) { + public OrderedSet getBundleDescriptorsOfType(ArchiveType bundleType) { if (bundleType == null) { - return Collections.emptySet(); + return new OrderedSet<>(); } - Set bundleSet = new OrderedSet<>(); + final OrderedSet bundleSet = new OrderedSet<>(); for (ModuleDescriptor aModule : getModules()) { if (Objects.equals(aModule.getDescriptor().getModuleType(), bundleType)) { bundleSet.add(aModule.getDescriptor()); @@ -1172,8 +1171,8 @@ public Set getBundleDescriptorsOfType(ArchiveType bundleType) * * @return the set of bundle descriptors */ - public Set getBundleDescriptors() { - Set bundleSet = new OrderedSet<>(); + public OrderedSet getBundleDescriptors() { + OrderedSet bundleSet = new OrderedSet<>(); for (ModuleDescriptor aModule : getModules()) { BundleDescriptor bundleDesc = aModule.getDescriptor(); if (bundleDesc == null) { diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ApplicationClientDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ApplicationClientDescriptor.java index 481a8977d93..63cfb8a44a5 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ApplicationClientDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ApplicationClientDescriptor.java @@ -56,16 +56,18 @@ public class ApplicationClientDescriptor extends CommonResourceBundleDescriptor private static final long serialVersionUID = 1L; private static final LocalStringManagerImpl localStrings = new LocalStringManagerImpl(ApplicationClientDescriptor.class); - private Set environmentProperties; - private Set ejbReferences; - private Set resourceEnvReferences; - private Set messageDestReferences; - private Set resourceReferences; - private Set serviceReferences; private final Set entityManagerFactoryReferences = new HashSet<>(); private final Set entityManagerReferences = new HashSet<>(); private final Set postConstructDescs = new HashSet<>(); private final Set preDestroyDescs = new HashSet<>(); + + private OrderedSet environmentProperties; + private OrderedSet ejbReferences; + private OrderedSet resourceEnvReferences; + private OrderedSet messageDestReferences; + private OrderedSet resourceReferences; + private OrderedSet serviceReferences; + private String mainClassName; private String callbackHandler; private JavaWebStartAccessDescriptor jwsAccessDescriptor; @@ -150,12 +152,10 @@ public Vector getNamedReferencePairs() { * Returns the set of environment properties of this app client. */ @Override - public Set getEnvironmentProperties() { + public OrderedSet getEnvironmentProperties() { if (environmentProperties == null) { environmentProperties = new OrderedSet<>(); } - - environmentProperties = new OrderedSet<>(environmentProperties); return environmentProperties; } @@ -198,12 +198,10 @@ public void removeEnvironmentProperty(EnvironmentProperty environmentProperty) { * Return the set of references to ejbs that I have. */ @Override - public Set getEjbReferenceDescriptors() { + public OrderedSet getEjbReferenceDescriptors() { if (ejbReferences == null) { ejbReferences = new OrderedSet<>(); } - - ejbReferences = new OrderedSet<>(ejbReferences); return ejbReferences; } @@ -281,11 +279,10 @@ public InjectionInfo getInjectionInfoByClass(Class clazz) { } @Override - public Set getServiceReferenceDescriptors() { + public OrderedSet getServiceReferenceDescriptors() { if (this.serviceReferences == null) { this.serviceReferences = new OrderedSet<>(); } - this.serviceReferences = new OrderedSet<>(this.serviceReferences); return this.serviceReferences; } @@ -322,12 +319,10 @@ public ServiceReferenceDescriptor getServiceReferenceByName(String name) { @Override - public Set getMessageDestinationReferenceDescriptors() { + public OrderedSet getMessageDestinationReferenceDescriptors() { if (messageDestReferences == null) { messageDestReferences = new OrderedSet<>(); } - - messageDestReferences = new OrderedSet<>(messageDestReferences); return messageDestReferences; } @@ -366,12 +361,11 @@ public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByNam * Return the set of resource environment references this ejb declares. */ @Override - public Set getResourceEnvReferenceDescriptors() { + public OrderedSet getResourceEnvReferenceDescriptors() { if (resourceEnvReferences == null) { resourceEnvReferences = new OrderedSet<>(); } - - return resourceEnvReferences = new OrderedSet<>(resourceEnvReferences); + return resourceEnvReferences; } @Override @@ -489,11 +483,10 @@ public ResourceEnvReferenceDescriptor getResourceEnvReferenceByName(String name) } @Override - public Set getResourceReferenceDescriptors() { + public OrderedSet getResourceReferenceDescriptors() { if (this.resourceReferences == null) { this.resourceReferences = new OrderedSet<>(); } - this.resourceReferences = new OrderedSet<>(this.resourceReferences); return this.resourceReferences; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java index 11394abc2e5..a92f3b369b2 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2026 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 @@ -74,7 +74,7 @@ public abstract class BundleDescriptor extends RootDeploymentDescriptor implemen private boolean fullAttribute; private Application application; - private Set roles; + private OrderedSet roles; private Set messageDestinations = new HashSet<>(); private final WebServicesDescriptor webServices = new WebServicesDescriptor(); @@ -310,7 +310,7 @@ public void removeMessageDestination(MessageDestinationDescriptor messageDestina * Return the set of com.sun.enterprise.deployment.Role objects I have plus the ones from application */ @Override - public Set getRoles() { + public OrderedSet getRoles() { if (roles == null) { roles = new OrderedSet<>(); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java index e98a73321c8..50fc743a9fa 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -17,8 +17,6 @@ package com.sun.enterprise.deployment; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; /** @@ -34,7 +32,7 @@ public class ConnectionDefDescriptor extends Descriptor { private static final long serialVersionUID = 1L; - private final Set configProperties = new OrderedSet<>(); + private final OrderedSet configProperties = new OrderedSet<>(); private String managedConnectionFactoryImpl = ""; private String connectionIntf = ""; private String connectionImpl = ""; @@ -60,7 +58,7 @@ public void setManagedConnectionFactoryImpl(String managedConnectionFactoryImpl) /** * Set of ConnectorConfigProperty */ - public Set getConfigProperties() { + public OrderedSet getConfigProperties() { return configProperties; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java index 2c8d5147c23..650d849e748 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -58,31 +58,31 @@ public class ConnectorDescriptor extends CommonResourceBundleDescriptor { private LicenseDescriptor licenseDescriptor; // connector1.0 old stuff, need clean up - private final Set configProperties; - private Set securityPermissions; + private final OrderedSet configProperties; + private OrderedSet securityPermissions; // connector1.5 begin private String resourceAdapterClass = ""; private OutboundResourceAdapter outboundRA; private InboundResourceAdapter inboundRA; - private final Set adminObjects; + private final OrderedSet adminObjects; private SunConnector sunConnector; // following are all the get and set methods for the // various variables listed above - private final Set requiredWorkContexts; + private final OrderedSet requiredWorkContexts; // book keeping annotations that cannot be processed up-front. These will be processed // during validation phase of the descriptor - private transient Set connectorAnnotations; + private transient OrderedSet connectorAnnotations; private boolean validConnectorAnnotationProcessed; private transient Map> configPropertyAnnotations; // default resource names for this resource-adpater - private final Set defaultResourceNames; + private final OrderedSet defaultResourceNames; private transient Set configPropertyProcessedClasses; @@ -98,7 +98,7 @@ public ConnectorDescriptor() { } - public Set getRequiredWorkContexts() { + public OrderedSet getRequiredWorkContexts() { return this.requiredWorkContexts; } @@ -122,7 +122,7 @@ public String getDefaultSpecVersion() { /** * Set of SecurityPermission objects */ - public Set getSecurityPermissions() { + public OrderedSet getSecurityPermissions() { if (securityPermissions == null) { securityPermissions = new OrderedSet<>(); } @@ -162,7 +162,7 @@ public void setResourceAdapterClass (String raClass) { /** * Set of ConnectorConfigProperty */ - public Set getConfigProperties() { + public OrderedSet getConfigProperties() { return configProperties; } @@ -207,7 +207,7 @@ public void setInboundResourceAdapter(InboundResourceAdapter inboundRA) { /** * @return admin objects */ - public Set getAdminObjects() { + public OrderedSet getAdminObjects() { return adminObjects; } @@ -620,7 +620,7 @@ public void addConnectorAnnotation(AnnotationInfo c){ connectorAnnotations.add(c); } - public Set getConnectorAnnotations(){ + public OrderedSet getConnectorAnnotations(){ return connectorAnnotations; } @@ -663,7 +663,7 @@ public void addConfigPropertyProcessedClass(String className){ * Used while detecting RARs referred by deployed applications * @return default resources' names */ - public Collection getDefaultResourcesNames(){ + public OrderedSet getDefaultResourcesNames(){ return defaultResourceNames; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBeanDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBeanDescriptor.java index cc3e11010f2..3c85f987447 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBeanDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBeanDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation. + * Copyright (c) 2022, 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 @@ -109,7 +109,7 @@ public abstract class EjbBeanDescriptor extends CommonResourceDescriptor impleme */ private final Map> methodInterceptorsMap = new HashMap<>(); - private final Set iorConfigDescriptors = new OrderedSet<>(); + private final OrderedSet iorConfigDescriptors = new OrderedSet<>(); private final Set messageDestReferences = new HashSet<>(); private final HashMap> methodPermissionsFromDD = new HashMap<>(); private final Map> permissionedMethodsByPermission = new Hashtable<>(); @@ -625,7 +625,7 @@ protected void setMethodInterceptorsMap(Map getIORConfigurationDescriptors() { + public OrderedSet getIORConfigurationDescriptors() { return iorConfigDescriptors; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBundleDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBundleDescriptor.java index 70a6c4307d2..786412c149e 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBundleDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBundleDescriptor.java @@ -226,8 +226,8 @@ public EjbDescriptor[] getEjbBySEIName(String className) { * @return set of service-ref from ejbs contained in this bundle this bundle or empty set * if none */ - public Set getEjbServiceReferenceDescriptors() { - Set serviceRefs = new OrderedSet<>(); + public OrderedSet getEjbServiceReferenceDescriptors() { + OrderedSet serviceRefs = new OrderedSet<>(); for (EjbDescriptor ejb : ejbs) { serviceRefs.addAll(ejb.getServiceReferenceDescriptors()); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/InboundResourceAdapter.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/InboundResourceAdapter.java index c7cde74bb32..cd17deaee2f 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/InboundResourceAdapter.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/InboundResourceAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -17,8 +17,6 @@ package com.sun.enterprise.deployment; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; /** @@ -35,14 +33,14 @@ public class InboundResourceAdapter extends Descriptor { private static final long serialVersionUID = 1L; - private final Set messageListeners; + private final OrderedSet messageListeners; public InboundResourceAdapter() { messageListeners = new OrderedSet<>(); } - public Set getMessageListeners() { + public OrderedSet getMessageListeners() { return messageListeners; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JndiEnvironmentRefsGroupDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JndiEnvironmentRefsGroupDescriptor.java index ea843f0a859..75957d4de03 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JndiEnvironmentRefsGroupDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JndiEnvironmentRefsGroupDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -45,12 +45,12 @@ public abstract class JndiEnvironmentRefsGroupDescriptor extends CommonResourceD private BundleDescriptor bundleDescriptor; - private Set environmentProperties; - private Set ejbReferences; - private Set resourceEnvReferences; - private Set messageDestReferences; - private Set resourceReferences; - private Set serviceReferences; + private OrderedSet environmentProperties; + private OrderedSet ejbReferences; + private OrderedSet resourceEnvReferences; + private OrderedSet messageDestReferences; + private OrderedSet resourceReferences; + private OrderedSet serviceReferences; private Set entityManagerFactoryReferences; private Set entityManagerReferences; @@ -159,11 +159,10 @@ public EjbReferenceDescriptor getEjbReference(String name) { @Override - public Set getEjbReferenceDescriptors() { + public OrderedSet getEjbReferenceDescriptors() { if (this.ejbReferences == null) { this.ejbReferences = new OrderedSet<>(); } - this.ejbReferences = new OrderedSet<>(this.ejbReferences); return this.ejbReferences; } @@ -200,11 +199,10 @@ public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByNam @Override - public Set getMessageDestinationReferenceDescriptors() { + public OrderedSet getMessageDestinationReferenceDescriptors() { if (this.messageDestReferences == null) { this.messageDestReferences = new OrderedSet<>(); } - this.messageDestReferences = new OrderedSet<>(this.messageDestReferences); return this.messageDestReferences; } @@ -223,11 +221,10 @@ public void addEnvironmentProperty(EnvironmentProperty environmentProperty) { @Override - public Set getEnvironmentProperties() { + public OrderedSet getEnvironmentProperties() { if (this.environmentProperties == null) { this.environmentProperties = new OrderedSet<>(); } - this.environmentProperties = new OrderedSet<>(this.environmentProperties); return this.environmentProperties; } @@ -262,11 +259,10 @@ public void addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRefe @Override - public Set getServiceReferenceDescriptors() { + public OrderedSet getServiceReferenceDescriptors() { if (this.serviceReferences == null) { this.serviceReferences = new OrderedSet<>(); } - this.serviceReferences = new OrderedSet<>(this.serviceReferences); return this.serviceReferences; } @@ -299,11 +295,10 @@ public void addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceR @Override - public Set getResourceReferenceDescriptors() { + public OrderedSet getResourceReferenceDescriptors() { if (this.resourceReferences == null) { this.resourceReferences = new OrderedSet<>(); } - this.resourceReferences = new OrderedSet<>(this.resourceReferences); return this.resourceReferences; } @@ -336,11 +331,10 @@ public void addResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor res @Override - public Set getResourceEnvReferenceDescriptors() { + public OrderedSet getResourceEnvReferenceDescriptors() { if (this.resourceEnvReferences == null) { this.resourceEnvReferences = new OrderedSet<>(); } - this.resourceEnvReferences = new OrderedSet<>(this.resourceEnvReferences); return this.resourceEnvReferences; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JspConfigDefinitionDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JspConfigDefinitionDescriptor.java index b2af1c03f6e..dd29eb69fbb 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JspConfigDefinitionDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/JspConfigDefinitionDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Eclipse Foundation and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2026 Contributors to the Eclipse Foundation. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,10 +20,6 @@ import jakarta.servlet.descriptor.JspPropertyGroupDescriptor; import jakarta.servlet.descriptor.TaglibDescriptor; -import java.util.Collection; -import java.util.List; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; @@ -32,17 +28,17 @@ */ public class JspConfigDefinitionDescriptor extends Descriptor implements JspConfigDescriptor { - private final Set taglibs = new OrderedSet<>(); - private final List jspGroups = new OrderedSet<>(); + private final OrderedSet taglibs = new OrderedSet<>(); + private final OrderedSet jspGroups = new OrderedSet<>(); @Override - public Collection getTaglibs() { + public OrderedSet getTaglibs() { return taglibs; } @Override - public Collection getJspPropertyGroups() { + public OrderedSet getJspPropertyGroups() { return jspGroups; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java index 8a2deaa61a6..9ed874f2b25 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -17,8 +17,6 @@ package com.sun.enterprise.deployment; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; /** @@ -32,8 +30,8 @@ public class MessageListener extends Descriptor { private static final long serialVersionUID = 1L; private String msgListenerType; private String activationSpecClass; - private final Set configProperties; - private final Set requiredConfigProperties; + private final OrderedSet configProperties; + private final OrderedSet requiredConfigProperties; // default constructor public MessageListener() { @@ -81,7 +79,7 @@ public void removeConfigProperty(ConnectorConfigProperty configProperty) { /** * @return Set of ConnectorConfigProperty */ - public Set getConfigProperties() { + public OrderedSet getConfigProperties() { return configProperties; } @@ -105,7 +103,7 @@ public void removeRequiredConfigProperty(EnvironmentProperty configProperty) { /** * @return Set of EnvironmentProperty */ - public Set getRequiredConfigProperties() { + public OrderedSet getRequiredConfigProperties() { return requiredConfigProperties; } } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java index b8aa3358a35..9f075e31707 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -44,10 +44,11 @@ public class OutboundResourceAdapter extends Descriptor { private static final long serialVersionUID = 1L; + private final OrderedSet authMechanisms; + private final OrderedSet connectionDefs; + private TransactionSupportLevel transactionSupport = LocalTransaction; - private Set authMechanisms; private boolean reauthenticationSupport; - private final Set connectionDefs; /*Set variables indicates that a particular attribute is set by DD processing so that annotation processing need not (must not) set the values from annotation */ @@ -123,12 +124,9 @@ public void setTransactionSupport(String support) { /** - * Set of AuthMechanism objects + * @return Set of AuthMechanism objects */ - public Set getAuthMechanisms() { - if (authMechanisms == null) { - authMechanisms = new OrderedSet<>(); - } + public OrderedSet getAuthMechanisms() { return authMechanisms; } @@ -223,7 +221,7 @@ public void removeConnectionDefDescriptor(ConnectionDefDescriptor conDefDesc) { /** * @return the set of connection definitions */ - public Set getConnectionDefs() { + public OrderedSet getConnectionDefs() { return connectionDefs; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebBundleDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebBundleDescriptor.java index 53148cc4c16..ab70e1ce13b 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebBundleDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebBundleDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -91,26 +91,26 @@ public abstract class WebBundleDescriptor extends CommonResourceBundleDescriptor private final Map extensionProperty = new HashMap<>(4); private final List appListenerDescriptors = new ArrayList<>(); - private final Set contextParameters = new OrderedSet<>(); - private final Set ejbReferences = new OrderedSet<>(); + private final OrderedSet contextParameters = new OrderedSet<>(); + private final OrderedSet ejbReferences = new OrderedSet<>(); private final Set entityManagerFactoryReferences = new HashSet<>(); private final Set entityManagerReferences = new HashSet<>(); - private final Set environmentEntries = new OrderedSet<>(); + private final OrderedSet environmentEntries = new OrderedSet<>(); private final Set errorPageDescriptors = new HashSet<>(); private final Map jarName2WebFragNameMap = new HashMap<>(); - private final Set messageDestReferences = new OrderedSet<>(); - private final Set mimeMappings = new OrderedSet<>(); + private final OrderedSet messageDestReferences = new OrderedSet<>(); + private final OrderedSet mimeMappings = new OrderedSet<>(); private final List orderedLibs = new ArrayList<>(); private final Set postConstructDescs = new HashSet<>(); private final Set preDestroyDescs = new HashSet<>(); - private final Set resourceEnvRefReferences = new OrderedSet<>(); - private final Set resourceReferences = new OrderedSet<>(); + private final OrderedSet resourceEnvRefReferences = new OrderedSet<>(); + private final OrderedSet resourceReferences = new OrderedSet<>(); private final Set securityConstraints = new HashSet<>(); - private final Set serviceReferences = new OrderedSet<>(); + private final OrderedSet serviceReferences = new OrderedSet<>(); private final List servletFilters = new ArrayList<>(); private final List servletFilterMappings = new ArrayList<>(); - private final Set webComponentDescriptors = new OrderedSet<>(); - private final Set welcomeFiles = new OrderedSet<>(); + private final OrderedSet webComponentDescriptors = new OrderedSet<>(); + private final OrderedSet welcomeFiles = new OrderedSet<>(); /** this is for checking whether there are more than one servlets for a given url-pattern */ @@ -180,7 +180,7 @@ public final ArchiveType getModuleType() { @Override public boolean isEmpty() { - return webComponentDescriptors == null || webComponentDescriptors.isEmpty(); + return webComponentDescriptors.isEmpty(); } @@ -486,7 +486,7 @@ public void addAppListenerDescriptorToFirst(AppListenerDescriptor descriptor) { /** * @return the Set of my Context Parameters. */ - public Set getContextParameters() { + public OrderedSet getContextParameters() { return contextParameters; } @@ -523,7 +523,7 @@ public void removeContextParameter(ContextParameter contextParameter) { @Override - public Set getEjbReferenceDescriptors() { + public OrderedSet getEjbReferenceDescriptors() { return ejbReferences; } @@ -650,7 +650,7 @@ public void addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor @Override - public Set getEnvironmentProperties() { + public OrderedSet getEnvironmentProperties() { return getEnvironmentEntries(); } @@ -658,7 +658,7 @@ public Set getEnvironmentProperties() { /** * @return {@link Set} of {@link EnvironmentProperty}, never null but may be empty. */ - public Set getEnvironmentEntries() { + public OrderedSet getEnvironmentEntries() { return environmentEntries; } @@ -793,7 +793,7 @@ public void putJarNameWebFragmentNamePair(String jarName, String webFragmentName @Override - public Set getMessageDestinationReferenceDescriptors() { + public OrderedSet getMessageDestinationReferenceDescriptors() { return messageDestReferences; } @@ -841,7 +841,7 @@ public void removeMessageDestinationReferenceDescriptor(MessageDestinationRefere /** * @return a set of mime mappings. */ - public Set getMimeMappings() { + public OrderedSet getMimeMappings() { return mimeMappings; } @@ -952,7 +952,7 @@ public void addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc) @Override - public Set getResourceEnvReferenceDescriptors() { + public OrderedSet getResourceEnvReferenceDescriptors() { return resourceEnvRefReferences; } @@ -997,7 +997,7 @@ public void removeResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor @Override - public Set getResourceReferenceDescriptors() { + public OrderedSet getResourceReferenceDescriptors() { return resourceReferences; } @@ -1117,7 +1117,7 @@ public boolean hasServiceReferenceDescriptors() { @Override - public Set getServiceReferenceDescriptors() { + public OrderedSet getServiceReferenceDescriptors() { return serviceReferences; } @@ -1224,7 +1224,7 @@ public void addServletFilterMapping(ServletFilterMapping filter) { /** * @return the Set of Web COmponent Descriptors (JSP or JavaServlets) in me. */ - public Set getWebComponentDescriptors() { + public OrderedSet getWebComponentDescriptors() { return webComponentDescriptors; } @@ -1303,7 +1303,7 @@ public Map getUrlPatternToServletNameMap(boolean initializeIfNul /** * @return set of the welcome files I have.. */ - public Set getWelcomeFiles() { + public OrderedSet getWelcomeFiles() { return welcomeFiles; } diff --git a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java index d3de1a167f5..3a0b02f17cc 100644 --- a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java +++ b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java @@ -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 @@ -31,21 +32,19 @@ public final class ActivationConfigDescriptor extends Descriptor { - // Set of EnvironmentProperty entries - private Set activationConfig; + private final OrderedSet activationConfig; - public ActivationConfigDescriptor() - { - activationConfig = new OrderedSet(); + public ActivationConfigDescriptor() { + activationConfig = new OrderedSet<>(); } public ActivationConfigDescriptor(ActivationConfigDescriptor other) { - activationConfig = new OrderedSet(other.activationConfig); - } + activationConfig = new OrderedSet<>(other.activationConfig); + } @Override public void print(StringBuffer toStringBuffer) { - toStringBuffer.append("Activation Config : ").append(activationConfig); + toStringBuffer.append("Activation Config: ").append(activationConfig); } public Set getActivationConfig() { diff --git a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/JspGroupDescriptor.java b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/JspGroupDescriptor.java index 24fd9d11ebc..8cdbd25dbf1 100644 --- a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/JspGroupDescriptor.java +++ b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/JspGroupDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2023, 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 @@ -21,8 +21,6 @@ import jakarta.servlet.descriptor.JspPropertyGroupDescriptor; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; public class JspGroupDescriptor extends Descriptor implements JspPropertyGroupDescriptor { @@ -32,9 +30,9 @@ public class JspGroupDescriptor extends Descriptor implements JspPropertyGroupDe private String isXml; private String deferredSyntaxAllowedAsLiteral; private String trimDirectiveWhitespaces; - private Set urlPatterns; - private Set includePreludes; - private Set includeCodas; + private OrderedSet urlPatterns; + private OrderedSet includePreludes; + private OrderedSet includeCodas; private String pageEncoding; private String defaultContentType; private String buffer; @@ -44,7 +42,7 @@ public class JspGroupDescriptor extends Descriptor implements JspPropertyGroupDe * Return the set of URL pattern aliases for this group. */ @Override - public Set getUrlPatterns() { + public OrderedSet getUrlPatterns() { if (this.urlPatterns == null) { this.urlPatterns = new OrderedSet<>(); } @@ -71,7 +69,7 @@ public void removeUrlPattern(String urlPattern) { * Return an Iterable over the include prelude elements for this group. */ @Override - public Set getIncludePreludes() { + public OrderedSet getIncludePreludes() { if (this.includePreludes == null) { this.includePreludes = new OrderedSet<>(); } @@ -98,7 +96,7 @@ public void removeIncludePrelude(String prelude) { * Return an Iterable over include coda elements for this group. */ @Override - public Set getIncludeCodas() { + public OrderedSet getIncludeCodas() { if (this.includeCodas == null) { this.includeCodas = new OrderedSet<>(); } diff --git a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebBundleDescriptorImpl.java b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebBundleDescriptorImpl.java index fcfd64c710c..e2e58c64f77 100644 --- a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebBundleDescriptorImpl.java +++ b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebBundleDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -79,7 +79,7 @@ public class WebBundleDescriptorImpl extends WebBundleDescriptor { private AbsoluteOrderingDescriptor absOrdering; private SunWebApp sunWebApp; - private final Set conflictedMimeMappingExtensions = new OrderedSet<>(); + private final OrderedSet conflictedMimeMappingExtensions = new OrderedSet<>(); /** * Construct an empty web app [{0}]. @@ -265,7 +265,7 @@ protected void combineMimeMappings(Set mimeMappings) { } - public Set getConflictedMimeMappingExtensions() { + public OrderedSet getConflictedMimeMappingExtensions() { return conflictedMimeMappingExtensions; } diff --git a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebComponentDescriptorImpl.java b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebComponentDescriptorImpl.java index be3fd2e967f..30ee738ab53 100644 --- a/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebComponentDescriptorImpl.java +++ b/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/descriptor/WebComponentDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -81,11 +81,11 @@ public class WebComponentDescriptorImpl extends WebComponentDescriptor { */ public static final String DELETE = "DELETE"; - private Set initializationParameters; - private final Set urlPatterns = new UrlPatternsSet(); + private OrderedSet initializationParameters; + private final UrlPatternsSet urlPatterns = new UrlPatternsSet(); private String canonicalName; private Integer loadOnStartUp; - private Set securityRoleReferences; + private OrderedSet securityRoleReferences; private RunAsIdentityDescriptor runAs; private WebBundleDescriptor webBundleDescriptor; @@ -128,7 +128,7 @@ public WebComponentDescriptorImpl(WebComponentDescriptor other) { @Override - public Set getInitializationParameterSet() { + public OrderedSet getInitializationParameterSet() { if (this.initializationParameters == null) { this.initializationParameters = new OrderedSet<>(); } @@ -184,7 +184,7 @@ public Set getConflictedInitParameterNames() { * @return the set of URL pattern aliases for this component. */ @Override - public Set getUrlPatternsSet() { + public OrderedSet getUrlPatternsSet() { return urlPatterns; } @@ -269,7 +269,7 @@ public void setLoadOnStartUp(String loadOnStartUp) throws NumberFormatException } @Override - public Set getSecurityRoleReferenceSet() { + public OrderedSet getSecurityRoleReferenceSet() { if (this.securityRoleReferences == null) { this.securityRoleReferences = new OrderedSet<>(); } From c27d7e84e83406c977e15fe08c796f3e36cd0c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Wed, 1 Apr 2026 00:25:06 +0200 Subject: [PATCH 02/35] Added ConnectorConfigPropertySetDescriptor interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- .../ActiveOutboundResourceAdapter.java | 28 ++++----- .../handlers/ConfigPropertyHandler.java | 60 +++++++++---------- .../deployment/util/ConnectorValidator.java | 21 ++++--- .../ResourceAdapterAdminServiceImpl.java | 20 ++----- .../util/AdminObjectConfigParserImpl.java | 21 +++---- .../util/ConnectorDDTransformUtils.java | 6 +- .../connectors/util/MCFConfigParserImpl.java | 50 +++++++--------- .../util/ResourceAdapterConfigParserImpl.java | 21 +++---- .../ConnectorConnectionPoolDeployer.java | 3 +- .../ConnectorsRecoveryResourceHandler.java | 4 +- .../enterprise/deployment/AdminObject.java | 7 ++- .../deployment/ConnectionDefDescriptor.java | 16 ++--- .../ConnectorConfigPropertySetDescriptor.java | 41 +++++++++++++ .../deployment/ConnectorDescriptor.java | 21 ++++--- .../deployment/MessageListener.java | 16 ++--- .../sun/enterprise/deployment/OrderedSet.java | 4 +- .../deployment/OutboundResourceAdapter.java | 8 +-- .../node/connector/ConfigPropertyNode.java | 25 +------- .../jms/system/ActiveJmsResourceAdapter.java | 19 +++--- 19 files changed, 179 insertions(+), 212 deletions(-) create mode 100644 appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorConfigPropertySetDescriptor.java diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ActiveOutboundResourceAdapter.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ActiveOutboundResourceAdapter.java index 8233f85580e..4524229cbd1 100755 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ActiveOutboundResourceAdapter.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ActiveOutboundResourceAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2026 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 @@ -333,24 +333,19 @@ protected void loadRAConfiguration() throws ConnectorRuntimeException { * @return merged set of config properties */ protected Set mergeRAConfiguration(ResourceAdapterConfig raConfig, List raConfigProps) { - Set mergedProps; if (raConfig != null) { raConfigProps = raConfig.getProperty(); } - mergedProps = ConnectorDDTransformUtils.mergeProps(raConfigProps, getDescriptor().getConfigProperties()); - return mergedProps; + return ConnectorDDTransformUtils.mergeProps(raConfigProps, getDescriptor()); } private void logMergedProperties(Set mergedProps) { if (_logger.isLoggable(Level.FINE)) { - _logger.fine("Passing in the following properties " + - "before calling RA.start of " + this.moduleName_); StringBuilder b = new StringBuilder(); for (ConnectorConfigProperty element : mergedProps) { - b.append("\nName: " + element.getName() - + " Value: " + element.getValue()); + b.append("\nName: " + element.getName() + " Value: " + element.getValue()); } - _logger.fine(b.toString()); + _logger.fine("Passing in the following properties before calling RA.start of " + this.moduleName_ + b); } } @@ -410,15 +405,13 @@ public void addAdminObject( throw new ConnectorRuntimeException(msg); } - AdministeredObjectResource aor = new AdministeredObjectResource(resourceInfo); + final AdministeredObjectResource aor = new AdministeredObjectResource(resourceInfo); aor.initialize(adminObject); aor.setResourceAdapter(connectorName); - ConnectorConfigProperty[] envProps = adminObject.getConfigProperties().toArray(ConnectorConfigProperty[]::new); - - //Add default config properties to aor + // Add default config properties to aor // Override them if same config properties are provided by the user - for (ConnectorConfigProperty envProp : envProps) { + for (ConnectorConfigProperty envProp : adminObject.getConfigProperties()) { String name = envProp.getName(); String userValue = (String) props.remove(name); if (userValue == null) { @@ -428,10 +421,9 @@ public void addAdminObject( } } - //Add non-default config properties provided by the user to aor - Iterator iter = props.keySet().iterator(); - while (iter.hasNext()) { - String name = (String) iter.next(); + // Add non-default config properties provided by the user to aor + final Set keys = props.stringPropertyNames(); + for (String name : keys) { String userValue = props.getProperty(name); if (userValue != null) { aor.addConfigProperty(new ConnectorConfigProperty(name, userValue, userValue)); diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/annotation/handlers/ConfigPropertyHandler.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/annotation/handlers/ConfigPropertyHandler.java index d87f0c789cd..28a1c3ac750 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/annotation/handlers/ConfigPropertyHandler.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/annotation/handlers/ConfigPropertyHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2026 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 @@ -20,6 +20,7 @@ import com.sun.enterprise.deployment.AdminObject; import com.sun.enterprise.deployment.ConnectionDefDescriptor; import com.sun.enterprise.deployment.ConnectorConfigProperty; +import com.sun.enterprise.deployment.ConnectorConfigPropertySetDescriptor; import com.sun.enterprise.deployment.ConnectorDescriptor; import com.sun.enterprise.deployment.InboundResourceAdapter; import com.sun.enterprise.deployment.MessageListener; @@ -304,12 +305,12 @@ private void processAdministeredObject(AnnotationInfo element, ConnectorDescript while (adminObjectItr.hasNext()) { AdminObject adminObject = adminObjectItr.next(); if (adminObject.getAdminObjectClass().equals(declaringClass.getName())) { - if (!(isConfigDefined(adminObject.getConfigProperties(), ep))) { + if (!(isConfigDefined(adminObject, ep))) { adminObject.addConfigProperty(ep); } String uniqueName = adminObject.getAdminObjectInterface() + "_" + adminObject.getAdminObjectClass(); if (!desc.getConfigPropertyProcessedClasses().contains(uniqueName)) { - processParent(declaringClass.getSuperclass(), adminObject.getConfigProperties()); + processParent(declaringClass.getSuperclass(), adminObject); desc.addConfigPropertyProcessedClass(declaringClass.getName()); } } @@ -322,11 +323,11 @@ private void handleAdministeredObject(AnnotationInfo element, ConnectorDescripto Class adminObjectClass, Class adminObjectIntf) { AdminObject adminObject = desc.getAdminObject(adminObjectIntf.getName(), adminObjectClass.getName()); if (adminObject != null) { - if (!(isConfigDefined(adminObject.getConfigProperties(), ep))) { + if (!(isConfigDefined(adminObject, ep))) { adminObject.addConfigProperty(ep); } if (!desc.getConfigPropertyProcessedClasses().contains(adminObjectClass.getName())) { - processParent(adminObjectClass.getSuperclass(), adminObject.getConfigProperties()); + processParent(adminObjectClass.getSuperclass(), adminObject); desc.addConfigPropertyProcessedClass(adminObjectClass.getName()); } } else { @@ -359,11 +360,11 @@ private void processActivation(AnnotationInfo element, ConnectorDescriptor desc, // this particular message-listener-type. If so, we should not add config-property as they // belong to a particular activation-spec class. if (ml.getActivationSpecClass().equals(declaringClass.getName())) { - if (!(isConfigDefined(ml.getConfigProperties(), ep))) { + if (!(isConfigDefined(ml, ep))) { ml.addConfigProperty(ep); } if (!desc.getConfigPropertyProcessedClasses().contains(declaringClass.getName())) { - processParent(declaringClass.getSuperclass(), ml.getConfigProperties()); + processParent(declaringClass.getSuperclass(), ml); desc.addConfigPropertyProcessedClass(declaringClass.getName()); } } @@ -377,11 +378,11 @@ private void processActivation(AnnotationInfo element, ConnectorDescriptor desc, while (mlItr.hasNext()) { MessageListener ml = mlItr.next(); if (ml.getActivationSpecClass().equals(declaringClass.getName())) { - if (!(isConfigDefined(ml.getConfigProperties(), ep))) { + if (!(isConfigDefined(ml, ep))) { ml.addConfigProperty(ep); } if (!desc.getConfigPropertyProcessedClasses().contains(declaringClass.getName())) { - processParent(declaringClass.getSuperclass(), ml.getConfigProperties()); + processParent(declaringClass.getSuperclass(), ml); desc.addConfigPropertyProcessedClass(declaringClass.getName()); } } @@ -398,14 +399,14 @@ private void processConnectionDefinition(AnnotationInfo element, ConnectorDescri Set connectionDefinitions = ora.getConnectionDefs(); for (ConnectionDefDescriptor cd : connectionDefinitions) { if (cd.getManagedConnectionFactoryImpl().equals(declaringClass.getName())) { - if (!(isConfigDefined(cd.getConfigProperties(), ep))) { + if (!(isConfigDefined(cd, ep))) { cd.addConfigProperty(ep); } // As same MCF class can be used for multiple connection-definitions // store it based on connection-factory-interface class which is the unique // identifier for a connection-definition if (!desc.getConfigPropertyProcessedClasses().contains(cd.getConnectionFactoryIntf())) { - processParent(declaringClass.getSuperclass(), cd.getConfigProperties()); + processParent(declaringClass.getSuperclass(), cd); desc.addConfigPropertyProcessedClass(cd.getConnectionFactoryIntf()); } } @@ -441,11 +442,11 @@ public static boolean processConnector(ConnectorDescriptor desc, ConnectorConfig return false; } - if (!(isConfigDefined(desc.getConfigProperties(), ep))) { + if (!(isConfigDefined(desc, ep))) { desc.addConfigProperty(ep); } if (!desc.getConfigPropertyProcessedClasses().contains(declaringClass.getName())) { - processParent(declaringClass.getSuperclass(), desc.getConfigProperties()); + processParent(declaringClass.getSuperclass(), desc); desc.addConfigPropertyProcessedClass(declaringClass.getName()); } // indicate that the config-property is processed @@ -521,8 +522,7 @@ private static String validateField(Field f, ConfigProperty property){ return SUCCESS; } - - public static void processParent(Class claz, Set configProperties) { + public static void processParent(Class claz, ConnectorConfigPropertySetDescriptor descriptor) { if (claz == null) { return; } @@ -537,7 +537,7 @@ public static void processParent(Class claz, Set con } String defaultValue = property.defaultValue(); Class type = getType(property, m.getParameterTypes()[0]); - processConfigProperty(configProperties, m.getName().substring(3), property, defaultValue, type); + processConfigProperty(descriptor, m.getName().substring(3), property, defaultValue, type); } } @@ -554,40 +554,40 @@ public static void processParent(Class claz, Set con if (defaultValue == null || defaultValue.isEmpty()) { defaultValue = deriveDefaultValueOfField(f); } - processConfigProperty(configProperties, f.getName(), property, defaultValue, f.getType()); + processConfigProperty(descriptor, f.getName(), property, defaultValue, f.getType()); } } // process its super-class if (claz.getSuperclass() != null) { - processParent(claz.getSuperclass(), configProperties); + processParent(claz.getSuperclass(), descriptor); } } - private static void processConfigProperty(Set configProperties, String propertyName, + private static void processConfigProperty(ConnectorConfigPropertySetDescriptor descriptor, String propertyName, ConfigProperty property, String defaultValue, Class declaredEntityType) { - String description = ""; - if (property.description() != null && property.description().length > 0) { + String description; + if (property.description() == null || property.description().length == 0) { + description = ""; + } else { description = property.description()[0]; } Class type = getType(property, declaredEntityType); ConnectorConfigProperty ccp = getConfigProperty(defaultValue, description, property.ignore(), property.supportsDynamicUpdates(), property.confidential(), type, propertyName); - if (!isConfigDefined(configProperties, ccp)) { - configProperties.add(ccp); + if (!isConfigDefined(descriptor, ccp)) { + descriptor.addConfigProperty(ccp); } } - private static boolean isConfigDefined(Set configProperties, ConnectorConfigProperty ep) { - boolean result = false; - for (ConnectorConfigProperty ddEnvProperty : configProperties) { - if (ddEnvProperty.getName().equals(ep.getName())) { - result = true; - break; + private static boolean isConfigDefined(ConnectorConfigPropertySetDescriptor descriptor, ConnectorConfigProperty ep) { + for (ConnectorConfigProperty property : descriptor.getConfigProperties()) { + if (property.getName().equals(ep.getName())) { + return true; } } - return result; + return false; } diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/util/ConnectorValidator.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/util/ConnectorValidator.java index 3325a1efab4..21cdfa2ad3e 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/util/ConnectorValidator.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/deployment/util/ConnectorValidator.java @@ -25,6 +25,7 @@ import com.sun.enterprise.deployment.ConnectorDescriptor; import com.sun.enterprise.deployment.InboundResourceAdapter; import com.sun.enterprise.deployment.MessageListener; +import com.sun.enterprise.deployment.OrderedSet; import com.sun.enterprise.deployment.OutboundResourceAdapter; import com.sun.enterprise.deployment.util.ConnectorVisitor; import com.sun.enterprise.deployment.util.DefaultDOLVisitor; @@ -170,7 +171,7 @@ private void processConfigProperties(ConnectorDescriptor desc) { if (raClass != null && !raClass.isEmpty()) { if (!desc.getConfigPropertyProcessedClasses().contains(raClass)) { Class claz = getClass(desc, raClass); - ConfigPropertyHandler.processParent(claz, desc.getConfigProperties()); + ConfigPropertyHandler.processParent(claz, desc); } } if (desc.getOutBoundDefined()) { @@ -184,7 +185,7 @@ private void processConfigProperties(ConnectorDescriptor desc) { if (connectionFactoryClass != null && !connectionFactoryClass.isEmpty()) { if (!desc.getConfigPropertyProcessedClasses().contains(connectionFactoryClass)) { Class claz = getClass(desc, connectionDef.getManagedConnectionFactoryImpl()); - ConfigPropertyHandler.processParent(claz, connectionDef.getConfigProperties()); + ConfigPropertyHandler.processParent(claz, connectionDef); } } } @@ -192,7 +193,7 @@ private void processConfigProperties(ConnectorDescriptor desc) { if (desc.getInBoundDefined()) { InboundResourceAdapter ira = desc.getInboundResourceAdapter(); - Set messageListeners = ira.getMessageListeners(); + OrderedSet messageListeners = ira.getMessageListeners(); Iterator it = messageListeners.iterator(); while (it.hasNext()) { MessageListener ml = it.next(); @@ -200,20 +201,18 @@ private void processConfigProperties(ConnectorDescriptor desc) { if (activationSpecClass != null && !activationSpecClass.equals("")) { if (!desc.getConfigPropertyProcessedClasses().contains(activationSpecClass)) { Class claz = getClass(desc, activationSpecClass); - ConfigPropertyHandler.processParent(claz, ml.getConfigProperties()); + ConfigPropertyHandler.processParent(claz, ml); } } } } - Set adminObjects = desc.getAdminObjects(); - Iterator it = adminObjects.iterator(); - while (it.hasNext()) { - AdminObject ao = it.next(); - String uniqueName = ao.getAdminObjectInterface() + "_" + ao.getAdminObjectClass(); + OrderedSet adminObjects = desc.getAdminObjects(); + for (AdminObject adminObject : adminObjects) { + String uniqueName = adminObject.getAdminObjectInterface() + "_" + adminObject.getAdminObjectClass(); if (!desc.getConfigPropertyProcessedClasses().contains(uniqueName)) { - Class claz = getClass(desc, ao.getAdminObjectClass()); - ConfigPropertyHandler.processParent(claz, ao.getConfigProperties()); + Class claz = getClass(desc, adminObject.getAdminObjectClass()); + ConfigPropertyHandler.processParent(claz, adminObject); } } } diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ResourceAdapterAdminServiceImpl.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ResourceAdapterAdminServiceImpl.java index 116c9f32723..90ec897ca5e 100755 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ResourceAdapterAdminServiceImpl.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ResourceAdapterAdminServiceImpl.java @@ -261,29 +261,21 @@ public void createActiveResourceAdapter(ConnectorDescriptor connectorDescriptor, * is in use is not transmitted to the client dynamically. All such changes * would be visible on ACC client restart. */ - - private void updateRAConfigInDescriptor(ConnectorDescriptor connectorDescriptor, - String moduleName) { - - ResourceAdapterConfig raConfig = - ConnectorRegistry.getInstance().getResourceAdapterConfig(moduleName); - + private void updateRAConfigInDescriptor(ConnectorDescriptor connectorDescriptor, String moduleName) { + ResourceAdapterConfig raConfig = ConnectorRegistry.getInstance().getResourceAdapterConfig(moduleName); List raConfigProps = null; if (raConfig != null) { raConfigProps = raConfig.getProperty(); } - if(_logger.isLoggable(Level.FINE)) { + if (_logger.isLoggable(Level.FINE)) { _logger.fine("current RAConfig In Descriptor " + connectorDescriptor.getConfigProperties()); } if (raConfigProps != null) { - Set mergedProps = ConnectorDDTransformUtils.mergeProps( - raConfigProps, connectorDescriptor.getConfigProperties()); - Set actualProps = connectorDescriptor.getConfigProperties(); - actualProps.clear(); - actualProps.addAll(mergedProps); - if(_logger.isLoggable(Level.FINE)) { + connectorDescriptor + .setConfigProperties(ConnectorDDTransformUtils.mergeProps(raConfigProps, connectorDescriptor)); + if (_logger.isLoggable(Level.FINE)) { _logger.fine("updated RAConfig In Descriptor " + connectorDescriptor.getConfigProperties()); } } diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/AdminObjectConfigParserImpl.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/AdminObjectConfigParserImpl.java index 3b0370721de..ab10272a1d2 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/AdminObjectConfigParserImpl.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/AdminObjectConfigParserImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to Eclipse Foundation. All rights reserved. + * Copyright (c) 2022, 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 @@ -21,6 +21,7 @@ import com.sun.enterprise.deployment.AdminObject; import com.sun.enterprise.deployment.ConnectorConfigProperty; import com.sun.enterprise.deployment.ConnectorDescriptor; +import com.sun.enterprise.deployment.OrderedSet; import com.sun.enterprise.util.i18n.StringManager; import com.sun.logging.LogDomains; @@ -168,12 +169,11 @@ private Properties getMergedValues(AdminObject adminObject, String raName) throw * mergedVals -> merged props of raConfigPros and * allraConfigPropsWithDefVals */ - Set ddVals = adminObject.getConfigProperties(); + OrderedSet ddVals = adminObject.getConfigProperties(); String className = adminObject.getAdminObjectClass(); Properties mergedVals = null; if (className != null && className.length() != 0) { - Properties introspectedVals = - configParserUtil.introspectJavaBean(className, ddVals, false, raName); + Properties introspectedVals = configParserUtil.introspectJavaBean(className, ddVals, false, raName); mergedVals = configParserUtil.mergeProps(ddVals, introspectedVals); } return mergedVals; @@ -287,15 +287,10 @@ public List getConfidentialProperties(ConnectorDescriptor desc, String r AdminObject adminObject = getAdminObject(desc, interfaceName, className ); List confidentialProperties = new ArrayList<>(); - if(adminObject != null){ - Set configProperties = adminObject.getConfigProperties(); - if(configProperties != null){ - Iterator iterator = configProperties.iterator(); - while(iterator.hasNext()){ - ConnectorConfigProperty ccp = (ConnectorConfigProperty)iterator.next(); - if(ccp.isConfidential()){ - confidentialProperties.add(ccp.getName()); - } + if (adminObject != null) { + for (ConnectorConfigProperty ccp : adminObject.getConfigProperties()) { + if (ccp.isConfidential()) { + confidentialProperties.add(ccp.getName()); } } } diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java index a62fb3e61db..a7dff07b639 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorDDTransformUtils.java @@ -162,10 +162,8 @@ public static Set mergeProps( * takes precedence over values present in deployment descriptors. * @return Set of merged properties. */ - public static Set mergeProps( - List props, - Set defaultMCFProps) { - return mergeProps(props, defaultMCFProps, new Properties()); + public static Set mergeProps(List props, ConnectorDescriptor descriptor) { + return mergeProps(props, descriptor.getConfigProperties(), new Properties()); } /** diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/MCFConfigParserImpl.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/MCFConfigParserImpl.java index 14490754793..e73b6d793d8 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/MCFConfigParserImpl.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/MCFConfigParserImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -21,6 +21,7 @@ import com.sun.enterprise.deployment.ConnectionDefDescriptor; import com.sun.enterprise.deployment.ConnectorConfigProperty; import com.sun.enterprise.deployment.ConnectorDescriptor; +import com.sun.enterprise.deployment.OrderedSet; import com.sun.enterprise.deployment.OutboundResourceAdapter; import com.sun.logging.LogDomains; @@ -33,14 +34,12 @@ import java.util.logging.Logger; /** - * This is managed connection factory configuration parser. It parses the - * ra.xml file for the managed connection factory specific configurations - * like managed connection factory javabean properties . - * - * @author Srikanth P + * This is managed connection factory configuration parser. It parses the + * ra.xml file for the managed connection factory specific configurations + * like managed connection factory javabean properties . * + * @author Srikanth P */ - public class MCFConfigParserImpl implements MCFConfigParser { private final static Logger _logger = LogDomains.getLogger(MCFConfigParserImpl.class, LogDomains.RSR_LOGGER); @@ -67,15 +66,12 @@ public MCFConfigParserImpl() { */ @Override - public String[] getConnectionDefinitionNames(ConnectorDescriptor desc) - throws ConnectorRuntimeException - { - - if(desc == null) { + public String[] getConnectionDefinitionNames(ConnectorDescriptor desc) throws ConnectorRuntimeException { + if (desc == null) { throw new ConnectorRuntimeException("Invalid arguments"); } - ConnectionDefDescriptor cdd[] = ConnectorDDTransformUtils.getConnectionDefs(desc); + ConnectionDefDescriptor[] cdd = ConnectorDDTransformUtils.getConnectionDefs(desc); String[] connDefNames = new String[cdd.length]; for(int i=0;i ddVals = cdd.getConfigProperties(); String className = cdd.getManagedConnectionFactoryImpl(); - if(className != null && className.length() != 0) { - Properties introspectedVals = configParserUtil.introspectJavaBean( - className,ddVals, true, rarName); + if (className != null && className.length() != 0) { + Properties introspectedVals = configParserUtil.introspectJavaBean(className, ddVals, true, rarName); mergedVals = configParserUtil.mergeProps(ddVals,introspectedVals); } return mergedVals; } + private ConnectionDefDescriptor getConnectionDefinition(ConnectorDescriptor desc, String connectionDefName) - throws ConnectorRuntimeException { + throws ConnectorRuntimeException { if(desc == null || connectionDefName == null) { throw new ConnectorRuntimeException("Invalid arguments"); } - OutboundResourceAdapter ora = - desc.getOutboundResourceAdapter(); + OutboundResourceAdapter ora = desc.getOutboundResourceAdapter(); if(ora == null || ora.getConnectionDefs().size() == 0) { return null; } @@ -186,17 +181,12 @@ public List getConfidentialProperties(ConnectorDescriptor desc, String r if(keyFields == null || keyFields.length == 0 || keyFields[0] == null){ throw new ConnectorRuntimeException("ConnectionDefinitionName must be specified"); } - ConnectionDefDescriptor cdd = getConnectionDefinition(desc, keyFields[0]); + ConnectionDefDescriptor connectorDefinition = getConnectionDefinition(desc, keyFields[0]); List confidentialProperties = new ArrayList<>(); - if(cdd != null){ - Set configProperties = cdd.getConfigProperties(); - if(configProperties != null){ - Iterator iterator = configProperties.iterator(); - while(iterator.hasNext()){ - ConnectorConfigProperty ccp = (ConnectorConfigProperty)iterator.next(); - if(ccp.isConfidential()){ - confidentialProperties.add(ccp.getName()); - } + if (connectorDefinition != null) { + for (ConnectorConfigProperty ccp : connectorDefinition.getConfigProperties()) { + if (ccp.isConfidential()) { + confidentialProperties.add(ccp.getName()); } } } diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourceAdapterConfigParserImpl.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourceAdapterConfigParserImpl.java index 8c9e92a9c35..50a6b50288c 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourceAdapterConfigParserImpl.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourceAdapterConfigParserImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -20,12 +20,11 @@ import com.sun.appserv.connectors.internal.api.ConnectorRuntimeException; import com.sun.enterprise.deployment.ConnectorConfigProperty; import com.sun.enterprise.deployment.ConnectorDescriptor; +import com.sun.enterprise.deployment.OrderedSet; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.Properties; -import java.util.Set; /** * This is Resource Adapter configuration parser. It parses the @@ -78,13 +77,12 @@ public Properties getJavaBeanProps(ConnectorDescriptor desc, * allraConfigPropsWithDefVals */ - Set ddVals = desc.getConfigProperties(); + OrderedSet ddVals = desc.getConfigProperties(); Properties mergedVals = null; String className = desc.getResourceAdapterClass(); Properties introspectedVals = null; if (className != null && className.length() != 0) { - introspectedVals = configParserUtil.introspectJavaBean( - className, ddVals, false, rarName); + introspectedVals = configParserUtil.introspectJavaBean(className, ddVals, false, rarName); mergedVals = configParserUtil.mergeProps(ddVals, introspectedVals); } return mergedVals; @@ -99,14 +97,9 @@ public List getConfidentialProperties(ConnectorDescriptor desc, String r } List confidentialProperties = new ArrayList<>(); - Set configProperties = desc.getConfigProperties(); - if(configProperties != null){ - Iterator iterator = configProperties.iterator(); - while(iterator.hasNext()){ - ConnectorConfigProperty ccp = (ConnectorConfigProperty)iterator.next(); - if(ccp.isConfidential()){ - confidentialProperties.add(ccp.getName()); - } + for (ConnectorConfigProperty ccp : desc.getConfigProperties()) { + if (ccp.isConfidential()) { + confidentialProperties.add(ccp.getName()); } } return confidentialProperties; diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorConnectionPoolDeployer.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorConnectionPoolDeployer.java index ae31d28353d..d6b3040d05c 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorConnectionPoolDeployer.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorConnectionPoolDeployer.java @@ -373,8 +373,7 @@ private void populateConnectorConnectionPool(ConnectorConnectionPool ccp, if(rarName.trim().equals(ConnectorConstants.DEFAULT_JMS_ADAPTER)){ properties.put("AddressList","localhost"); } - Set mergedProps = ConnectorDDTransformUtils.mergeProps(props, cdd.getConfigProperties(),properties); - cdi.setMCFConfigProperties(mergedProps); + cdi.setMCFConfigProperties(ConnectorDDTransformUtils.mergeProps(props, cdd.getConfigProperties(), properties)); cdi.setResourceAdapterConfigProperties(connectorDescriptor.getConfigProperties()); ccp.setConnectorDescriptorInfo(cdi); ccp.setSecurityMaps(SecurityMapUtils.getConnectorSecurityMaps(securityMaps)); diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java index 7c076c0a0a7..c7c2e18d504 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java @@ -53,7 +53,6 @@ import java.util.Collection; import java.util.List; import java.util.Locale; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -377,8 +376,7 @@ private String[] getdbUserPasswordOfConnectorConnectionPool(ConnectorConnectionP ConnectorRegistry connectorRegistry = ConnectorRegistry.getInstance(); ConnectorDescriptor connectorDescriptor = connectorRegistry.getDescriptor(rarName); ConnectionDefDescriptor cdd = connectorDescriptor.getConnectionDefinitionByCFType(connectionDefName); - Set configProps = cdd.getConfigProperties(); - for (ConnectorConfigProperty envProp : configProps) { + for (ConnectorConfigProperty envProp : cdd.getConfigProperties()) { String prop = envProp.getName().toUpperCase(locale); if ("USER".equals(prop) || "USERNAME".equals(prop)) { userPassword[0] = envProp.getValue(); diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java index f89547d8edc..a739a33c670 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/AdminObject.java @@ -25,9 +25,9 @@ * @author Qingqing Ouyang * @author Sheetal Vartak */ -public class AdminObject extends Descriptor { +public class AdminObject extends Descriptor implements ConnectorConfigPropertySetDescriptor { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 2L; private String theInterface; private String theClass; private final OrderedSet configProperties; @@ -67,6 +67,7 @@ public void setAdminObjectClass(String cl) { /** * @return Set of EnvironmentProperty */ + @Override public OrderedSet getConfigProperties() { return configProperties; } @@ -75,6 +76,7 @@ public OrderedSet getConfigProperties() { /** * Add a configProperty to the set */ + @Override public void addConfigProperty(ConnectorConfigProperty configProperty) { configProperties.add(configProperty); } @@ -83,6 +85,7 @@ public void addConfigProperty(ConnectorConfigProperty configProperty) { /** * Add a configProperty to the set */ + @Override public void removeConfigProperty(ConnectorConfigProperty configProperty) { configProperties.remove(configProperty); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java index 50fc743a9fa..5faea267f9e 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectionDefDescriptor.java @@ -29,9 +29,9 @@ * * @author Sheetal Vartak */ -public class ConnectionDefDescriptor extends Descriptor { +public class ConnectionDefDescriptor extends Descriptor implements ConnectorConfigPropertySetDescriptor { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 2L; private final OrderedSet configProperties = new OrderedSet<>(); private String managedConnectionFactoryImpl = ""; private String connectionIntf = ""; @@ -55,25 +55,19 @@ public void setManagedConnectionFactoryImpl(String managedConnectionFactoryImpl) } - /** - * Set of ConnectorConfigProperty - */ + @Override public OrderedSet getConfigProperties() { return configProperties; } - /** - * Add a configProperty to the set - */ + @Override public void addConfigProperty(ConnectorConfigProperty configProperty) { configProperties.add(configProperty); } - /** - * Add a configProperty to the set - */ + @Override public void removeConfigProperty(ConnectorConfigProperty configProperty) { configProperties.remove(configProperty); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorConfigPropertySetDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorConfigPropertySetDescriptor.java new file mode 100644 index 00000000000..eefca677b79 --- /dev/null +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorConfigPropertySetDescriptor.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2026 Contributors to the Eclipse Foundation. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.enterprise.deployment; + + +/** + * Interface for descriptors managing collections of {@link ConnectorConfigProperty}. + */ +public interface ConnectorConfigPropertySetDescriptor { + + /** + * @return Set of {@link ConnectorConfigProperty} elements + */ + OrderedSet getConfigProperties(); + + + /** + * @param configProperty to add + */ + void addConfigProperty(ConnectorConfigProperty configProperty); + + + /** + * @param configProperty to remove + */ + void removeConfigProperty(ConnectorConfigProperty configProperty); +} diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java index 650d849e748..788adbeff08 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/ConnectorDescriptor.java @@ -47,9 +47,9 @@ * @author Tony Ng * @author Qingqing Ouyang */ -public class ConnectorDescriptor extends CommonResourceBundleDescriptor { +public class ConnectorDescriptor extends CommonResourceBundleDescriptor implements ConnectorConfigPropertySetDescriptor { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 2L; private String connectorDescription = ""; private String vendorName = ""; private String eisType = ""; @@ -159,23 +159,22 @@ public void setResourceAdapterClass (String raClass) { resourceAdapterClass = raClass; } - /** - * Set of ConnectorConfigProperty - */ + public void setConfigProperties(Set newProperties) { + configProperties.clear(); + configProperties.addAll(newProperties); + } + + @Override public OrderedSet getConfigProperties() { return configProperties; } - /** - * add a configProperty to the set - */ + @Override public void addConfigProperty(ConnectorConfigProperty configProperty) { this.configProperties.add(configProperty); } - /** - * remove a configProperty from the set - */ + @Override public void removeConfigProperty(ConnectorConfigProperty configProperty) { configProperties.remove(configProperty); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java index 9ed874f2b25..ffee4ea32f5 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/MessageListener.java @@ -25,9 +25,9 @@ * * @author Sheetal Vartak */ -public class MessageListener extends Descriptor { +public class MessageListener extends Descriptor implements ConnectorConfigPropertySetDescriptor { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 2L; private String msgListenerType; private String activationSpecClass; private final OrderedSet configProperties; @@ -60,25 +60,19 @@ public void setActivationSpecClass(String activationSpecClass) { } - /** - * add a connector-configProperty to the set - */ + @Override public void addConfigProperty(ConnectorConfigProperty configProperty) { this.configProperties.add(configProperty); } - /** - * remove a connector-configProperty from the set - */ + @Override public void removeConfigProperty(ConnectorConfigProperty configProperty) { this.configProperties.remove(configProperty); } - /** - * @return Set of ConnectorConfigProperty - */ + @Override public OrderedSet getConfigProperties() { return configProperties; } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OrderedSet.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OrderedSet.java index 57ea7d66a36..8d9aebe1732 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OrderedSet.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OrderedSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -39,7 +39,7 @@ public OrderedSet() { } /** - * Construct an ordered set from the given collection. + * Construct an ordered set from elements of the given collection. */ public OrderedSet(Collection collection) { this.addAll(collection); diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java index 9f075e31707..eae8786d63a 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/OutboundResourceAdapter.java @@ -264,18 +264,18 @@ public Set getConfigProperties() { /** - * Add a configProperty to the set + * @param configProperty a configProperty to add to the set */ public void addConfigProperty(ConnectorConfigProperty configProperty) { - getConnectionDef().getConfigProperties().add(configProperty); + getConnectionDef().addConfigProperty(configProperty); } /** - * Add a configProperty to the set + * @param configProperty to remove */ public void removeConfigProperty(ConnectorConfigProperty configProperty) { - getConnectionDef().getConfigProperties().remove(configProperty); + getConnectionDef().removeConfigProperty(configProperty); } diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/node/connector/ConfigPropertyNode.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/node/connector/ConfigPropertyNode.java index 4fad8a8f054..a006eca0b9a 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/node/connector/ConfigPropertyNode.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/node/connector/ConfigPropertyNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 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 @@ -17,11 +17,8 @@ package com.sun.enterprise.deployment.node.connector; -import com.sun.enterprise.deployment.AdminObject; -import com.sun.enterprise.deployment.ConnectionDefDescriptor; import com.sun.enterprise.deployment.ConnectorConfigProperty; -import com.sun.enterprise.deployment.ConnectorDescriptor; -import com.sun.enterprise.deployment.MessageListener; +import com.sun.enterprise.deployment.ConnectorConfigPropertySetDescriptor; import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; import com.sun.enterprise.deployment.node.DescriptorFactory; import com.sun.enterprise.deployment.xml.ConnectorTagNames; @@ -47,26 +44,10 @@ public class ConfigPropertyNode extends DeploymentDescriptorNode raConfigProps) { - // private void hackMergedProps(Set mergedProps) { - if (!(connectorRuntime.isServer())) { - return super.mergeRAConfiguration(raConfig, raConfigProps); - } + protected Set mergeRAConfiguration(ResourceAdapterConfig raConfig, + List raConfigProps) { Set mergedProps = super.mergeRAConfiguration(raConfig, raConfigProps); - String brokerType = null; + if (!connectorRuntime.isServer()) { + return mergedProps; + } + String brokerType = null; for (ConnectorConfigProperty element : mergedProps) { if (element.getName().equals(ActiveJmsResourceAdapter.BROKERTYPE)) { brokerType = element.getValue(); @@ -446,7 +447,7 @@ protected Set mergeRAConfiguration(ResourceAdapterConfig raConfig, List Date: Wed, 1 Apr 2026 00:50:59 +0200 Subject: [PATCH 03/35] Removed duplicit getMergedActivationConfigProperties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- .../inbound/ConnectorMessageBeanClient.java | 3 +- .../inbound/InboundRecoveryHandler.java | 4 +- .../internal/api/ConnectorsUtil.java | 22 ++++------ .../enterprise/connectors/util/RARUtils.java | 44 +------------------ .../deployment/EjbMessageBeanDescriptor.java | 5 ++- .../ActivationConfigDescriptor.java | 4 +- .../descriptor/EjbMessageBeanDescriptor.java | 3 -- 7 files changed, 18 insertions(+), 67 deletions(-) diff --git a/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/ConnectorMessageBeanClient.java b/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/ConnectorMessageBeanClient.java index 678ec8727cf..893b90e8b2f 100755 --- a/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/ConnectorMessageBeanClient.java +++ b/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/ConnectorMessageBeanClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation. + * Copyright (c) 2022, 2026 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 @@ -233,7 +233,6 @@ private ActivationSpec getActivationSpec(ActiveInboundResourceAdapter activeInbo ActivationSpec activationSpec = (ActivationSpec) aClass.getDeclaredConstructor().newInstance(); Set props = ConnectorsUtil.getMergedActivationConfigProperties(getDescriptor()); - SetMethodAction action = new SetMethodAction<>(activationSpec, props); action.run(); diff --git a/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/InboundRecoveryHandler.java b/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/InboundRecoveryHandler.java index 9d4993f0904..bc83ee84f31 100644 --- a/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/InboundRecoveryHandler.java +++ b/appserver/connectors/connectors-inbound-runtime/src/main/java/com/sun/enterprise/connectors/inbound/InboundRecoveryHandler.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2026 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 @@ -25,7 +26,6 @@ import com.sun.enterprise.config.serverbeans.ConfigBeansUtilities; import com.sun.enterprise.connectors.ConnectorRegistry; import com.sun.enterprise.connectors.service.ConnectorAdminServiceUtils; -import com.sun.enterprise.connectors.util.RARUtils; import com.sun.enterprise.connectors.util.ResourcesUtil; import com.sun.enterprise.connectors.util.SetMethodAction; import com.sun.enterprise.deployment.BundleDescriptor; @@ -183,7 +183,7 @@ private void recoverInboundTransactions(List xaresList) { } // Get the ActivationConfig Properties from the MDB Descriptor - Set activationConfigProps = RARUtils + Set activationConfigProps = ConnectorsUtil .getMergedActivationConfigProperties(descriptor); // get message listener type String msgListenerType = descriptor.getMessageListenerType(); diff --git a/appserver/connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorsUtil.java b/appserver/connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorsUtil.java index 80425c3548a..b40c067472c 100644 --- a/appserver/connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorsUtil.java +++ b/appserver/connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorsUtil.java @@ -459,23 +459,19 @@ public static Set getMergedActivationConfigProperties(EjbMe Set mergedProps = new HashSet<>(); Set runtimePropNames = new HashSet<>(); Set runtimeProps = msgDesc.getRuntimeActivationConfigProperties(); - if (runtimeProps != null) { - for (EnvironmentProperty entry : runtimeProps) { - mergedProps.add(entry); - String propName = entry.getName(); - runtimePropNames.add(propName); - } + for (EnvironmentProperty entry : runtimeProps) { + mergedProps.add(entry); + String propName = entry.getName(); + runtimePropNames.add(propName); } Set standardProps = msgDesc.getActivationConfigProperties(); - if (standardProps != null) { - for (EnvironmentProperty entry : standardProps) { - String propName = entry.getName(); - if (runtimePropNames.contains(propName)) { - continue; - } - mergedProps.add(entry); + for (EnvironmentProperty entry : standardProps) { + String propName = entry.getName(); + if (runtimePropNames.contains(propName)) { + continue; } + mergedProps.add(entry); } return mergedProps; diff --git a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java index b435ccff557..af03b397791 100644 --- a/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java +++ b/appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2025 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 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 @@ -20,8 +20,6 @@ import com.sun.appserv.connectors.internal.api.ConnectorRuntimeException; import com.sun.appserv.connectors.internal.api.ConnectorsUtil; import com.sun.enterprise.connectors.ConnectorRuntime; -import com.sun.enterprise.deployment.EjbMessageBeanDescriptor; -import com.sun.enterprise.deployment.EnvironmentProperty; import com.sun.enterprise.util.i18n.StringManager; import com.sun.logging.LogDomains; @@ -30,10 +28,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; import java.util.Locale; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -73,44 +69,6 @@ private static boolean isPrimitiveWrapper(Class clz) { || clz.equals(Float.class) || clz.equals(Double.class)); } - /** - * Prepares the name/value pairs for ActivationSpec.

- * Rule:

- * 1. The name/value pairs are the union of activation-config on - * standard DD (message-driven) and runtime DD (mdb-resource-adapter) - * 2. If there are duplicate property settings, the value in runtime - * activation-config will overwrite the one in the standard - * activation-config. - */ - public static Set getMergedActivationConfigProperties(EjbMessageBeanDescriptor msgDesc) { - - Set mergedProps = new HashSet<>(); - Set runtimePropNames = new HashSet<>(); - - Set runtimeProps = msgDesc.getRuntimeActivationConfigProperties(); - if(runtimeProps != null){ - for (EnvironmentProperty entry : runtimeProps) { - mergedProps.add(entry); - String propName = entry.getName(); - runtimePropNames.add(propName); - } - } - - Set standardProps = msgDesc.getActivationConfigProperties(); - if(standardProps != null){ - for (EnvironmentProperty entry : standardProps) { - String propName = entry.getName(); - if (runtimePropNames.contains(propName)) { - continue; - } - mergedProps.add(entry); - } - } - - return mergedProps; - - } - public static Class loadClassFromRar(String rarName, String beanClassName) throws ConnectorRuntimeException{ String rarLocation = getRarLocation(rarName); return loadClass(rarLocation, beanClassName); diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbMessageBeanDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbMessageBeanDescriptor.java index 86273158341..1e536fba409 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbMessageBeanDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbMessageBeanDescriptor.java @@ -45,12 +45,15 @@ public interface EjbMessageBeanDescriptor extends EjbDescriptor, MessageDestinat // Reflection in EjbNode void setResourceAdapterMid(String resourceAdapterMid); + /** + * @return never null, Set of {@link EnvironmentProperty} elements. + */ Set getActivationConfigProperties(); String getActivationConfigValue(String name); /** - * @return Set of {@link EnvironmentProperty} elements. + * @return never null, Set of {@link EnvironmentProperty} elements. */ Set getRuntimeActivationConfigProperties(); diff --git a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java index 3a0b02f17cc..d4f371c36fa 100644 --- a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java +++ b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/ActivationConfigDescriptor.java @@ -20,8 +20,6 @@ import com.sun.enterprise.deployment.EnvironmentProperty; import com.sun.enterprise.deployment.OrderedSet; -import java.util.Set; - import org.glassfish.deployment.common.Descriptor; /** @@ -47,7 +45,7 @@ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("Activation Config: ").append(activationConfig); } - public Set getActivationConfig() { + public OrderedSet getActivationConfig() { return activationConfig; } } diff --git a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java index 0ff1fd1320b..5b190f5fcc4 100644 --- a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java +++ b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java @@ -298,9 +298,6 @@ public void setMessageDestination(MessageDestinationDescriptor newMsgDest) { // - /** - * @return Set of EnvironmentProperty elements. - */ @Override public Set getActivationConfigProperties() { return activationConfig.getActivationConfig(); From 4042bcb30e6e323789776f82db70d6d8c0f65d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondro=20Mih=C3=A1lyi?= Date: Sat, 4 Apr 2026 16:05:25 +0200 Subject: [PATCH 04/35] Update docs and web to clarify that Embedded GlassFish is for production (#25969) - Update Embedded GlassFish documentation to clarify that it's for production. Remove claims that it's only for testing, make running from command line the recommended option. - Promote Embedded GlassFish as production-ready; rename server guides - Remove outdated warnings about Embedded GlassFish not being a priority - Reframe it as fully supported since 7.1.0, suitable for cloud/production - Remove stale "docs being revised" NOTE from all guide prefaces - Update website to highlight Embedded GlassFish as a cloud-native option - Fix MicroProfile section: all variants supported since 7.1.0 - Rename Quick Start, Troubleshooting, and Security guides to "Server ..." to make it clear that they are specific to Server and not to Embedded - Split documentation set table into Common, Server, and Embedded groups - Restructure the GlassFish Documentation Set table in all 15 guide prefaces to match the grouping on the documentation website. - Add missing "Running from Command Line" entry to the TOC - Reorder sections to prioritize command-line and Maven usage over API/EJB - Rename Maven section from "Testing Applications" to "Using the Maven Plug-in" --- .../src/main/asciidoc/preface.adoc | 97 +- .../src/main/asciidoc/domains.adoc | 4 +- .../main/asciidoc/general-administration.adoc | 4 +- .../src/main/asciidoc/overview.adoc | 12 +- .../src/main/asciidoc/preface.adoc | 96 +- .../src/main/asciidoc/preface.adoc | 112 +- .../src/main/asciidoc/java-clients.adoc | 2 +- .../src/main/asciidoc/preface.adoc | 110 +- .../src/main/asciidoc/securing-apps.adoc | 12 +- .../src/main/asciidoc/preface.adoc | 111 +- .../main/asciidoc/embedded-server-guide.adoc | 2689 +++++++++-------- .../src/main/asciidoc/preface.adoc | 115 +- .../src/main/asciidoc/title.adoc | 12 +- .../src/main/asciidoc/error-messages.adoc | 2 +- .../src/main/asciidoc/preface.adoc | 106 +- .../src/main/asciidoc/preface.adoc | 169 +- .../src/main/asciidoc/installing.adoc | 4 +- .../src/main/asciidoc/preface.adoc | 109 +- .../src/main/asciidoc/overview.adoc | 4 +- .../src/main/asciidoc/preface.adoc | 168 +- .../src/main/asciidoc/tuning-apps.adoc | 2 +- .../src/main/asciidoc/preface.adoc | 172 +- .../src/main/asciidoc/title.adoc | 12 +- .../src/main/asciidoc/create-auth-realm.adoc | 2 +- .../src/main/asciidoc/preface.adoc | 12 - .../src/main/asciidoc/preface.adoc | 95 +- .../src/main/asciidoc/preface.adoc | 113 +- .../src/main/asciidoc/title.adoc | 10 +- .../src/main/asciidoc/preface.adoc | 109 +- .../src/main/asciidoc/title.adoc | 10 +- .../src/main/asciidoc/appendix.adoc | 96 +- docs/website/src/main/resources/README.md | 9 +- .../src/main/resources/documentation.md | 46 +- docs/website/src/main/resources/download.md | 8 +- .../src/main/resources/download_gf8.md | 4 +- docs/website/src/main/resources/faq.md | 14 + 36 files changed, 2459 insertions(+), 2193 deletions(-) diff --git a/docs/add-on-component-development-guide/src/main/asciidoc/preface.adoc b/docs/add-on-component-development-guide/src/main/asciidoc/preface.adoc index 4c2c5b70ebf..caef7e06b00 100644 --- a/docs/add-on-component-development-guide/src/main/asciidoc/preface.adoc +++ b/docs/add-on-component-development-guide/src/main/asciidoc/preface.adoc @@ -46,20 +46,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -75,50 +103,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -144,10 +172,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -317,4 +341,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/administration-guide/src/main/asciidoc/domains.adoc b/docs/administration-guide/src/main/asciidoc/domains.adoc index 515e08bba67..2e9d4719222 100644 --- a/docs/administration-guide/src/main/asciidoc/domains.adoc +++ b/docs/administration-guide/src/main/asciidoc/domains.adoc @@ -98,7 +98,7 @@ as necessary. When a domain is created, you are prompted for the administration user name and password. If you accept the default, the user `admin` is created without password. To reset the administration password, see -"xref:security-guide.adoc#to-change-an-administration-password[To Change an Administration Password]" in {productName} Security Guide. +"xref:security-guide.adoc#to-change-an-administration-password[To Change an Administration Password]" in {productName} Server Security Guide. [[domain-administration-server-das]] @@ -480,7 +480,7 @@ See Also You can also view the full syntax and options of the subcommand by typing `asadmin help login` at the command line. For additional information about passwords, see "xref:security-guide.adoc#administering-passwords[Administering -Passwords]" in {productName} Security Guide. +Passwords]" in {productName} Server Security Guide. [[to-delete-a-domain]] diff --git a/docs/administration-guide/src/main/asciidoc/general-administration.adoc b/docs/administration-guide/src/main/asciidoc/general-administration.adoc index f24b32a1c87..60da11bb762 100644 --- a/docs/administration-guide/src/main/asciidoc/general-administration.adoc +++ b/docs/administration-guide/src/main/asciidoc/general-administration.adoc @@ -1855,8 +1855,8 @@ tasks: For information about how to perform these tasks from the command line, see the following documentation: -* "xref:security-guide.adoc#to-create-an-authentication-realm[To Create an Authentication Realm]" in {productName} Security Guide -* "xref:security-guide.adoc#to-create-a-file-user[To Create a File User]" in {productName} Security Guide +* "xref:security-guide.adoc#to-create-an-authentication-realm[To Create an Authentication Realm]" in {productName} Server Security Guide +* "xref:security-guide.adoc#to-create-a-file-user[To Create a File User]" in {productName} Server Security Guide * xref:http_https.adoc#to-configure-an-http-listener-for-ssl[To Configure an HTTP Listener for SSL] For information about how to perform these tasks by using the diff --git a/docs/administration-guide/src/main/asciidoc/overview.adoc b/docs/administration-guide/src/main/asciidoc/overview.adoc index f4af91d3102..12af229cfc2 100644 --- a/docs/administration-guide/src/main/asciidoc/overview.adoc +++ b/docs/administration-guide/src/main/asciidoc/overview.adoc @@ -153,15 +153,15 @@ Life Cycle Modules:: Security:: * System Security. Initial configuration tasks might include setting up passwords, audit modules, and certificates. See - "xref:security-guide.adoc#administering-system-security[Administering System Security]" in {productName} Security Guide. + "xref:security-guide.adoc#administering-system-security[Administering System Security]" in {productName} Server Security Guide. * User Security. Initial configuration tasks might include creating authentication realms and file users. See - "xref:security-guide.adoc#administering-user-security[Administering User Security]" in {productName} Security Guide. + "xref:security-guide.adoc#administering-user-security[Administering User Security]" in {productName} Server Security Guide. * Message Security. Initial configuration tasks might include configuring a Java Cryptography Extension (JCE) provider, enabling default and non-default security providers, and configuring message protection policies. See "xref:security-guide.adoc#administering-message-security[Administering Message - Security]" in {productName} Security Guide. + Security]" in {productName} Server Security Guide. Database Connectivity:: The initial tasks involved in configuring {productName} to connect to the Apache Derby database include creating a Java Database @@ -491,7 +491,7 @@ require restart. * Configuring certificates * Managing HTTP, JMS, IIOP, JNDI services * Enabling or disabling secure administration as explained in -"xref:security-guide.adoc#running-secure-admin[Running Secure Admin]" in {productName} Security Guide +"xref:security-guide.adoc#running-secure-admin[Running Secure Admin]" in {productName} Server Security Guide [[dynamic-configuration-changes]] @@ -640,7 +640,7 @@ To avoid this situation, do one of the following: remote request is accepted as such. To enable secure admin, see "xref:security-guide.adoc#managing-administrative-security[Managing Administrative -Security]" in {productName} Security Guide. +Security]" in {productName} Server Security Guide. ==== @@ -1135,7 +1135,7 @@ The user name and password of this user are both preset to `admin`. The `keytool` utility is used to set up and work with Java Security Socket Extension (JSSE) digital certificates. See "xref:security-guide.adoc#administering-jsse-certificates[Administering JSSE Certificates]" -in {productName} Security Guide for instructions on using `keytool`. +in {productName} Server Security Guide for instructions on using `keytool`. [[java-monitoring-and-management-console-jconsole]] diff --git a/docs/administration-guide/src/main/asciidoc/preface.adoc b/docs/administration-guide/src/main/asciidoc/preface.adoc index 5c02c90c3ce..747c079d7b7 100644 --- a/docs/administration-guide/src/main/asciidoc/preface.adoc +++ b/docs/administration-guide/src/main/asciidoc/preface.adoc @@ -35,20 +35,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -64,50 +92,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -133,9 +161,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - [[related-documentation]] === Related Documentation @@ -305,4 +330,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/application-deployment-guide/src/main/asciidoc/preface.adoc b/docs/application-deployment-guide/src/main/asciidoc/preface.adoc index 3a1141dc1ec..abdf609072e 100644 --- a/docs/application-deployment-guide/src/main/asciidoc/preface.adoc +++ b/docs/application-deployment-guide/src/main/asciidoc/preface.adoc @@ -10,20 +10,7 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== - -This Application Deployment Guide describes deployment of applications + and application components to {productName}, and includes information about deployment descriptors. @@ -51,20 +38,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -80,50 +95,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -149,10 +164,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -322,4 +333,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/application-development-guide/src/main/asciidoc/java-clients.adoc b/docs/application-development-guide/src/main/asciidoc/java-clients.adoc index 4aff0254362..33b2029eaa2 100644 --- a/docs/application-development-guide/src/main/asciidoc/java-clients.adoc +++ b/docs/application-development-guide/src/main/asciidoc/java-clients.adoc @@ -577,7 +577,7 @@ recommended). For legacy compatibility, JKS format keystores + For more information about importing a trusted certificate into the domain keystore, see "xref:security-guide.adoc#administering-jsse-certificates[Administering JSSE Certificates]" -in {productName} Security Guide. +in {productName} Server Security Guide. 4. Delete any signed JARs already generated by {productName}: .. At the command prompt, type: + diff --git a/docs/application-development-guide/src/main/asciidoc/preface.adoc b/docs/application-development-guide/src/main/asciidoc/preface.adoc index ba490c4c482..18dd3730577 100644 --- a/docs/application-development-guide/src/main/asciidoc/preface.adoc +++ b/docs/application-development-guide/src/main/asciidoc/preface.adoc @@ -10,19 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== - This Application Development Guide describes how to create and run Java Platform, Enterprise Edition (Jakarta EE platform) applications that follow the open Java standards model for Jakarta EE components and APIs in the @@ -54,20 +41,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -83,50 +98,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -152,10 +167,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -325,4 +336,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/application-development-guide/src/main/asciidoc/securing-apps.adoc b/docs/application-development-guide/src/main/asciidoc/securing-apps.adoc index c7749c45a8c..0832d669b94 100644 --- a/docs/application-development-guide/src/main/asciidoc/securing-apps.adoc +++ b/docs/application-development-guide/src/main/asciidoc/securing-apps.adoc @@ -15,7 +15,7 @@ contain components that perform user authentication and access authorization for the business logic of Jakarta EE components. For information about administrative security for the {productName}, see the xref:security-guide.adoc#GSSCG[{productName} -Security Guide]. +Server Security Guide]. For general information about Jakarta EE security, see https://jakarta.ee/learn/docs/jakartaee-tutorial/current/security/security.html[Security] @@ -1092,7 +1092,7 @@ For more information about message security, see the following: * "https://jakarta.ee/learn/docs/jakartaee-tutorial/current/security/security.html[Introduction to Security in the Jakarta EE Platform]" in The Jakarta EE Tutorial -* xref:security-guide.adoc#GSSCG[{productName} Security Guide] +* xref:security-guide.adoc#GSSCG[{productName} Server Security Guide] * http://www.jcp.org/en/jsr/detail?id=196[JSR 196] (`http://www.jcp.org/en/jsr/detail?id=196`), Java Authentication Service Provider Interface for Containers @@ -1172,7 +1172,7 @@ files, see the xref:application-deployment-guide.adoc#GSDPG[{productName} Application Deployment Guide]. For information about configuring these providers in the {productName}, see the xref:security-guide.adoc#GSSCG[{productName} -Security Guide]. For additional information about overriding provider +Server Security Guide]. For additional information about overriding provider settings, see xref:#application-specific-message-protection[Application-Specific Message Protection]. You can create new message security providers in one of the following ways: @@ -1311,7 +1311,7 @@ are managed with `keytool`. If Network Security Services (NSS) is installed, certificates and private keys are stored in an NSS database, where they are managed using `certutil`. System administrator tasks are discussed in the xref:security-guide.adoc#GSSCG[{productName} -Security Guide]. +Server Security Guide]. [[application-specific-message-protection]] @@ -1365,7 +1365,7 @@ endpoint in the application's `glassfish-ejb-jar.xml` file. In this file, add `request-protection` and `response-protection` elements, which are analogous to the `request-policy` and `response-policy` elements discussed in the xref:security-guide.adoc#GSSCG[{productName} -Security Guide]. To apply the same protection mechanisms for all +Server Security Guide]. To apply the same protection mechanisms for all methods, leave the method-name element blank. xref:#configuring-message-protection-for-a-specific-method-based-on-digital-signatures[Configuring Message Protection for a Specific Method Based on Digital Signatures] discusses listing specific methods or using wildcard characters. @@ -1428,7 +1428,7 @@ the EJB web service endpoint in the application's `glassfish-ejb-jar.xml` file. To this file, add `request-protection` and `response-protection` elements, which are analogous to the `request-policy` and `response-policy` elements discussed in the -xref:security-guide.adoc#GSSCG[{productName} Security Guide]. The +xref:security-guide.adoc#GSSCG[{productName} Server Security Guide]. The administration guide includes a table listing the set and order of security operations for different request and response policy configurations. diff --git a/docs/deployment-planning-guide/src/main/asciidoc/preface.adoc b/docs/deployment-planning-guide/src/main/asciidoc/preface.adoc index d4d7ffe045c..e321192dcfa 100644 --- a/docs/deployment-planning-guide/src/main/asciidoc/preface.adoc +++ b/docs/deployment-planning-guide/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== The Deployment Planning Guide explains how to build a production deployment of {productName}. @@ -42,20 +30,48 @@ of Jakarta EE: compatibility. It enables Java developers to access the === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. -[width="100%",cols="<30%,<{product-majorVersion}0%",options="header",] +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -71,50 +87,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -140,10 +156,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -313,4 +325,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc b/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc index 681f8fbbb5c..94a75d6adc7 100644 --- a/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc +++ b/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc @@ -15,46 +15,47 @@ ability to program in the Java language is assumed. The following topics are addressed here: * xref:#introduction-to-embedded-glassfish-server[Introduction to Embedded {productName}] -* xref:#embedded-glassfish-server-file-system[Embedded {productName} File System] +* xref:#running-from-command-line[Running {productName} Embedded Server from Command Line] +* xref:#testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server[Using the Maven Plug-in for Embedded {productName}] * xref:#including-the-glassfish-server-embedded-server-api-in-applications[Including the {productName} Embedded Server API in Applications] -* xref:#testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server[Testing Applications with the Maven Plug-in for Embedded {productName}] -* xref:#GSESG00039[Using the EJB 3.1 Embeddable API with Embedded {productName}] +* xref:#default-java-persistence-data-source-for-embedded-glassfish-server[Default Java Persistence Data Source for Embedded {productName}] * xref:#changing-log-levels-in-embedded-glassfish-server[Changing Log Levels in Embedded {productName}] * xref:#monitoring-embedded-glassfish-server-with-jmx[Monitoring Embedded {productName} with JMX] -* xref:#default-java-persistence-data-source-for-embedded-glassfish-server[Default Java Persistence Data Source for Embedded {productName}] +* xref:#embedded-glassfish-server-file-system[Embedded {productName} File System] +* xref:#GSESG00039[Using the EJB 3.1 Embeddable API with Embedded {productName}] * xref:#restrictions-for-embedded-glassfish-server[Restrictions for Embedded {productName}] [[introduction-to-embedded-glassfish-server]] == Introduction to Embedded {productName} -Embedded {productName} enables you to use -{productName} as a library or run applications from command line. Embedded {productName} also enables -you to run {productName} inside any Virtual Machine for the Java +Embedded {productName} enables you to run {productName} as a +self-contained executable JAR from the command line. It can also be used as a +library embedded in your application, inside any Virtual Machine for the Java platform (Java Virtual Machine or JVM). No installation or configuration of embedded {productName} is -required. The ability to run {productName} -without installation or configuration simplifies the process of bundling -{productName} with applications or running applications from command line. +required. Running {productName} without installation or configuration +makes it well suited for production deployments in cloud environments, +containerized workloads, and CI/CD pipelines, as well as for local +development and integration testing. You can use embedded {productName} in the following ways: * With the Embedded Server API (see xref:#including-the-glassfish-server-embedded-server-api-in-applications[Including the {productName} Embedded Server API in Applications]) * As an executable JAR, executed with `java -jar` (see xref:#running-from-command-line[Running {productName} Embedded Server from Command Line]) -* With the Maven Plug-in (see xref:#testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server[Testing Applications with the +* With the Maven Plug-in (see xref:#testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server[Using the Maven Plug-in for Embedded {productName}]) * With the EJB 3.1 Embeddable API (see xref:#GSESG00039[Using the EJB 3.1 Embeddable API with Embedded {productName}]) Embedded {productName} provides a plug-in for http://maven.apache.org/[Apache Maven] (`http://maven.apache.org/`). -This plug-in simplifies the testing of applications by enabling you to -build an application and run it with {productName} on a single -system. Testing and debugging are simplified because the need for an -installed and configured {productName} is eliminated. Therefore, you -can run unit tests automatically in every build. +This plug-in enables you to build and run applications with {productName} +on a single system, without requiring a separate installed and configured +{productName}. This is useful both for production builds and for running +integration tests as part of the build process. [NOTE] @@ -88,82 +89,6 @@ Embedded {productName} comes with the following flavours: explanation of as-install, see xref:#installation-root-directory[Installation Root Directory]. -[[embedded-glassfish-server-file-system]] - -== Embedded {productName} File System - -The following Embedded {productName} directories and files are -important if you are referencing a nonembedded installation of {productName}: - -* xref:#installation-root-directory[Installation Root Directory] -* xref:#instance-root-directory[Instance Root Directory] -* xref:#GSESG00056[The `domain.xml` File] - -[[installation-root-directory]] - -=== Installation Root Directory - -The installation root directory, represented as as-install, is the -parent of the directory that embedded {productName} uses for -configuration files. This directory corresponds to the base directory -for an installation of {productName}. Configuration files are -contained in the following directories in the base directory for an -installation of {productName}: - -* `domains` -* `lib` - -Specify the installation root directory only if you have a valid -nonembedded {productName} installation and are using -`glassfish-embedded-static-shell.jar`. - -[[instance-root-directory]] - -=== Instance Root Directory - -The instance root directory, also known as the domain directory, represented as domain-dir, is the parent -directory of a server instance directory. Embedded {productName} uses the server instance directory for domain -configuration files. - -[NOTE] -==== -If you have valid custom as-install and domain-dir -directories, specify both in the `BootstrapProperties` and -`GlassFishProperties` classes respectively as described in -xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}]. -==== - - -If domain-dir is not specified, {productName} creates a directory -named ``gfembed``random-number``tmp`` in a temporary directory, where -random-number is a randomly generated 19-digit number. {productName} -then copies configuration files into this directory. The temporary -directory is the value of the system property `java.io.tmpdir`. You can -override this value by specifying the `glassfish.embedded.tmpdir` -property in the `GlassFishProperties` class or as a system property. - -[[GSESG00056]][[the-domain.xml-file]] - -=== The `domain.xml` File - -Using an existing `domain.xml` file avoids the need to configure -embedded {productName} programmatically in your application. Your -application obtains domain configuration data from an existing -`domain.xml` file. You can create this file by using the administrative -interfaces of an installation of nonembedded {productName}. To -specify an existing `domain.xml` file, invoke the `setConfigFileURI` -method of the `GlassFishProperties` class as described in -xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}]. - - -[NOTE] -==== -The built-in `domain.xml` file used by default by Embedded {productName} can be found in the Embedded {productName} JAR files, in path -`org/glassfish/embed/domain.xml`. You can customize this -file and pass it in using the `setConfigFileURI` method while creating -an Embedded {productName}. -==== - [[running-from-command-line]] == Running {productName} Embedded Server from Command Line @@ -376,1420 +301,1674 @@ Any argument that doesn't start with a hyphen (-), is treated as follows: admin commands are the same commands supported by {productName} Server's "asadmin" command line tool or by the "CommandRunner" Java class in the {productName} Simple Public API. -[[including-the-glassfish-server-embedded-server-api-in-applications]] - -== Including the {productName} Embedded Server API in Applications - -{productName} provides an application programming -interface (API) for developing applications in which {productName} is -embedded. For details, see the `org.glassfish.embeddable` packages at -`https://www.javadoc.io/doc/org.glassfish.main.common/simple-glassfish-api/latest/index.html`. - -The following topics are addressed here: - -* xref:#setting-the-class-path[Setting the Class Path] -* xref:#creating-starting-and-stopping-embedded-glassfish-server[Creating, Starting, and Stopping Embedded {productName}] -* xref:#deploying-and-undeploying-an-application-in-an-embedded-glassfish-server[Deploying and Undeploying an Application in an Embedded -{productName}] -* xref:#running-asadmin-commands-using-the-glassfish-server-embedded-server-api[Running `asadmin` Commands Using the {productName} -Embedded Server API] -* xref:#sample-applications[Sample Applications] - -[[setting-the-class-path]] - -=== Setting the Class Path - -To enable your applications to locate the class libraries for embedded -{productName}, add a JAR file corresponding to one of the xref:#editions[Embedded {productName} editions] to your class path. - -In addition, add to the class path any other JAR files or classes upon -which your applications depend. For example, if an application uses a -database other than Java DB, include the Java DataBase Connectivity -(JDBC) driver JAR files in the class path. - -[[creating-starting-and-stopping-embedded-glassfish-server]] +[[testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server]] -=== Creating, Starting, and Stopping Embedded {productName} +== Using the Maven Plug-in for Embedded {productName} -Before you can run applications, you must set up and run the embedded -{productName}. +If you are using http://maven.apache.org/[Apache Maven] +(`http://maven.apache.org/`), the plug-in for embedded {productName} +enables you to build, deploy, and run applications with a single Maven goal, +without requiring a separate installed and configured {productName}. +This is useful for running applications in development, for CI/CD pipelines, +and for integration testing as part of the build process. The following topics are addressed here: -* xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}] -* xref:#running-an-embedded-glassfish-server[Running an Embedded {productName}] +* xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment] +* xref:#to-build-and-start-an-application-from-maven[To Build and Start an Application From Maven] +* xref:#to-stop-embedded-glassfish-server[To Stop Embedded {productName}] +* xref:#to-redeploy-an-application-that-was-built-and-started-from-maven[To Redeploy an Application That Was Built and Started From Maven] +* xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}] -[[creating-and-configuring-an-embedded-glassfish-server]] +Predefined Maven goals for embedded {productName} are described in +xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}]. -==== Creating and Configuring an Embedded {productName} +To use Maven with Embedded {productName} and the EJB 3.1 Embeddable +API, see xref:#GSESG00064[Using Maven with the EJB 3.1 Embeddable API and +Embedded {productName}]. -To create and configure an embedded {productName}, perform these -tasks: +[[to-set-up-your-maven-environment]] -1. Instantiate the `org.glassfish.embeddable.BootstrapProperties` -class. -2. Invoke any methods for configuration settings that you require. This -is optional. -3. Invoke the `GlassFishRuntime.bootstrap()` or -`GlassFishRuntime.bootstrap(BootstrapProperties)` method to create a -`GlassFishRuntime` object. -4. Instantiate the `org.glassfish.embeddable.GlassFishProperties` -class. -5. Invoke any methods for configuration settings that you require. This -is optional. -6. Invoke the `glassfishRuntime.newGlassFish(GlassFishProperties)` -method to create a `GlassFish` object. +=== To Set Up Your Maven Environment -The methods of the `BootstrapProperties` class for setting the server -configuration are listed in the following table. The default value of -each configuration setting is also listed. +Setting up your Maven environment enables Maven to download the required +embedded {productName} distribution file when you build your project. +Setting up your Maven environment also identifies the plug-in that +enables you to build and start an unpackaged application with a single +Maven goal. -[[gksir]] +Before You Begin -Table 1-1 Methods of the `BootstrapProperties` Class +Ensure that http://maven.apache.org/[Apache Maven] +(`http://maven.apache.org/`) is installed. -[width="100%",cols="<29%,<33%,<38%",options="header",] -|=== -|Purpose |Method |Default Value -|References an existing xref:#installation-root-directory[Installation Root Directory], also called as-install -a|[source] +1. Identify the Maven plug-in for embedded {productName}. ++ +Add the following `plugin` element to your POM file: ++ +[source,xml] ---- -setInstallRoot(String as-install) +... + ... + + ... + + org.glassfish.embedded + embedded-glassfish-maven-plugin + version + + ... + +... ---- +version:: + The version to use. The version of the final promoted build for this + release is `7.0`. The Maven plug-in is not bound to a specific version + of {productName}. You can specify the version you want to use. If + no version is specified, a default version is used. -|None. If `glassfish-embedded-static-shell.jar` is used, the -xref:#installation-root-directory[Installation Root Directory] is automatically determined and -need not be specified. -|=== - - -The methods of the `GlassFishProperties` class for setting the server -configuration are listed in the following table. The default value of -each configuration setting is also listed. - -[[gkskl]] - -Table 1-2 Methods of the `GlassFishProperties` Class - -[width="100%",cols="<24%,<37%,<39%",options="header",] -|=== -|Purpose |Method |Default Value -|References an existing xref:#instance-root-directory[Instance Root Directory], also -called domain-dir -a| -[source] +2. Configure the the path to the application WAR, and other standard settings. ++ +Add the following `configuration` element to your POM file: ++ +[source,xml] ---- -setInstanceRoot(String domain-dir) +... + + ... + + ... + + target/test.war + 8080 + test + true + ... + + ... + + ... + +... ---- +app:: + In the app parameter, substitute the archive file or directory for your + application. The optional port, contextRoot, and autoDelete parameters + show example values. For details, see xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for + Embedded {productName}]. -a| -In order of precedence: - -* `glassfish.embedded.tmpdir` property value specified in `GlassFishProperties` object -* `glassfish.embedded.tmpdir` system property value -* `java.io.tmpdir` system property value -* as-install``/domains/domain1`` if a nonembedded installation is referenced - -|Creates a new or references an existing configuration file -a| -[source] +3. Perform advanced plug-in configuration. This step is optional. +Add the following `configuration` element to your POM file: ++ +[source,xml] ---- -setConfigFileURI(String configFileURI) +... + + ... + + ... + + target/test.war + test + test + + 8080 + 8181 + + + test_key=test_value + + bootstrap.properties + +server.jms-service.jms-host.default_JMS_host.port=17676 + + glassfish.properties + + ANTLR_USE_DIRECT_CLASS_LOADING=true + + system.properties + + + + + start + deploy + undeploy + stop + + + + + ... + +... ---- -a|In order of precedence: -* domain-dir``/config/domain.xml`` if domain-dir was set using `setInstanceRoot` -* built-in embedded `domain.xml` +4. Configure Maven goals. +Add `execution` elements to your POM file: ++ +[source,xml] +---- +... + + ... + + ... + + + install + + goal + + + + ... + + ... + +... +---- +goal:: + The goal to use. See xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}]. -|Specifies whether the configuration file is read-only -a| -[source] + +[[gjkod]] +Example 1-13 POM File for Configuring Maven to Use Embedded {productName} + +This example shows a POM file for configuring Maven to use embedded {productName}. + +[source,xml] ---- -setConfigFileReadOnly(boolean readOnly) + + + + + 4.0.0 + org.example + maven-glassfish-plugin-tester + 1.0.0-SNAPSHOT + Maven Embedded Glassfish Plugin Example + + + + org.glassfish.embedded + embedded-glassfish-maven-plugin + 7.0 + + target/test.war + 8080 + test + true + + + + install + + run + + + + + + + ---- -|`true` -|Sets the port on which Embedded {productName} listens. -|`setPort`(String networkListener, int port) -|none -|=== +[[to-build-and-start-an-application-from-maven]] -[NOTE] -==== -Do not use `setPort` if you are using `setInstanceRoot` or `setConfigFileURI`. -==== +=== To Build and Start an Application From Maven +If you are using Maven to manage the development of your application, +you can use a Maven goal to build and start the application in embedded +{productName}. -[[gikmz]] -Example 1-1 Creating an Embedded {productName} +Before You Begin -This example shows code for creating an Embedded {productName}. +Ensure that your Maven environment is configured, as described in +xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment]. -[source,java] +1. Include the path to the Maven executable file `mvn` in your path +statement. +2. Ensure that the `JAVA_HOME` environment variable is defined. +3. Create a directory for the Maven project for your application. +4. Copy to your project directory the POM file that you created in +xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment]. +5. Run the following command in your project directory: ++ +[source] ---- -... -import org.glassfish.embeddable.*; -... - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - glassfish.start(); -... +mvn install ---- +This command performs the following actions: +* Installs the Maven repository in a directory named `.m2` under your +home directory. +* Starts Embedded {productName}. +* Deploys your application. ++ +The application continues to run in Embedded {productName} until +Embedded {productName} is stopped. -[[gksjo]] -Example 1-2 Creating an Embedded {productName} with configuration -customizations +[[to-stop-embedded-glassfish-server]] -This example shows code for creating an Embedded {productName} using -the existing domain-dir -`C:\samples\test\applicationserver\domains\domain1`. +=== To Stop Embedded {productName} -[source,java] +1. Change to the root directory of the Maven project for your +application. +2. Run the Maven goal to stop the application in embedded {productName}. ++ +[source] ---- -// ... -import org.glassfish.embeddable.*; - // ... - BootstrapProperties bootstrapProperties = new BootstrapProperties(); - bootstrapProperties.setInstallRoot("C:\\samples\\test\\applicationserver"); - GlassFishRuntime glassfishRuntime = GlassFishRuntime.bootstrap(bootstrapProperties); +mvn embedded-glassfish:stop +---- +This runs the `stop` method of the `GlassFish` object and any other +methods that are required to shut down the server in an orderly fashion. +See xref:#stopping-an-embedded-glassfish-server-from-an-application[Stopping an Embedded {productName} From an +Application]. - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setInstanceRoot("C:\\samples\\test\\applicationserver\\domains\\domain1"); - GlassFish glassfish = glassfishRuntime.newGlassFish(glassfishProperties); +[[to-redeploy-an-application-that-was-built-and-started-from-maven]] - glassfish.start(); - // ... ----- +=== To Redeploy an Application That Was Built and Started From Maven -[[supported-properties]] -==== Configuration properties supported by Embedded {productName} +An application that was built and started from Maven continues to run in +Embedded {productName} until Embedded {productName} is stopped. +While the application is running, you can test changes to the +application by redeploying it. -In `GlassFishProperties` and in a properties file, Embedded {productName} supports the same configuration properties as the `set` and `get` administration commands of the {productName} Server. +To redeploy, in the window from where the application was built and +started from Maven, press Enter. -In addition, it also accepts properties with the `embedded-glassfish-config.` prefix. This prefix is removed before applying the property (e.g., `resources.jdbc-connection-pool...` can be defined as `embedded-glassfish-config.resources.jdbc-connection-pool...`). This prefix is no longer necessary and its usage is deprecated, but it's supported for backwards compatibility. +[[maven-goals-for-embedded-glassfish-server]] -[[running-an-embedded-glassfish-server]] -==== Running Embedded {productName} from a Java application +=== Maven Goals for Embedded {productName} -After you create an embedded {productName} server as described in -xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}], you -can perform operations such as: +You can use the following Maven goals with embedded {productName}: -* xref:#setting-the-port-of-an-embedded-glassfish-server-from-an-application[Setting the Port of an Embedded {productName} From an Application] -* xref:#starting-an-embedded-glassfish-server-from-an-application[Starting an Embedded {productName} From an Application] -* xref:#stopping-an-embedded-glassfish-server-from-an-application[Stopping an Embedded {productName} From an Application] +* xref:#embedded-glassfishrun-goal[`embedded-glassfish:run` Goal] +* xref:#embedded-glassfishstart-goal[`embedded-glassfish:start` Goal] +* xref:#embedded-glassfishdeploy-goal[`embedded-glassfish:deploy` Goal] +* xref:#embedded-glassfishundeploy-goal[`embedded-glassfish:undeploy` Goal] +* xref:#embedded-glassfishstop-goal[`embedded-glassfish:stop` Goal] +* xref:#embedded-glassfishadmin-goal[`embedded-glassfish:admin` Goal] -[[setting-the-port-of-an-embedded-glassfish-server-from-an-application]] +[[embedded-glassfishrun-goal]] -Setting the Port of an Embedded {productName} From an Application +==== `embedded-glassfish:run` Goal -You must set the server's HTTP or HTTPS port. If you do not set the -port, your application fails to start and throws an exception. You can -set the port directly or indirectly. +This goal starts the server and deploys an application. You can redeploy +if you change the application. The application can be a packaged archive +or a directory that contains an exploded application. You can set the +parameters described in the following table. -[NOTE] -==== -Do not use `setPort` if you are using `setInstanceRoot` or -`setConfigFileURI`. These methods set the port indirectly. -==== +[[gjkws]] +Table 1-5 `embedded-glassfish:run` Parameters -* To set the port directly, invoke the `setPort` method of the -`GlassFishProperties` object. -* To set the port indirectly, use a `domain.xml` file that sets the -port. For more information, see xref:#GSESG00056[The `domain.xml` File]. +[width="100%",cols="<18%,<42%,<40%",options="header",] +|=== +|Parameter |Default |Description +|app |None |The archive file or directory for the application to be deployed. -[[gjkxc]] -Example 1-3 Setting the port of an Embedded {productName} +|serverID |`maven` |(optional) The ID of the server to start. -This example shows code for setting the port of an embedded {productName}. +|containerType |`all` |(optional) The container to start: `web`, `ejb`, `jpa`, or `all`. -[source,java] ----- -... -import org.glassfish.embeddable.*; -... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setPort("http-listener", 8080); - glassfishProperties.setPort("https-listener", 8181); -... ----- +|installRoot |None |(optional) The xref:#installation-root-directory[Installation Root Directory]. -[[starting-an-embedded-glassfish-server-from-an-application]] +|instanceRoot a| +In order of precedence: -Starting an Embedded {productName} From an Application +* `glassfish.embedded.tmpdir` property value specified in `GlassFishProperties` object +* `glassfish.embedded.tmpdir` system property value +* `java.io.tmpdir` system property value +* as-install``/domains/domain1`` if a nonembedded installation is referenced -To start an embedded {productName}, invoke the `start` method of the `GlassFish` object. + |(optional) The xref:#instance-root-directory[Instance Root Directory] -[[gilry]] -Example 1-4 Starting an Embedded {productName} +|configFile |domain-dir``/config/domain.xml`` |(optional) The +configuration file. -This example shows code for setting the port and starting an embedded -{productName}. This example also includes the code from -xref:#gikmz[Example 1-1] for creating a `GlassFish` object. +|port |None. Must be set explicitly or defined in the configuration +file. |The HTTP or HTTPS port. -[source,java] ----- -... -import org.glassfish.embeddable.*; -... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setPort("http-listener", 8080); - glassfishProperties.setPort("https-listener", 8181); - ... - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); - glassfish.start(); -... ----- +|name a| +In order of precedence: -[[stopping-an-embedded-glassfish-server-from-an-application]] +* The `application-name` or `module-name` in the deployment descriptor. +* The name of the archive file without the extension or the directory name. -Stopping an Embedded {productName} From an Application +For more information, see "xref:application-deployment-guide.adoc#naming-standards[Naming Standards]" in +{productName} Application Deployment Guide. -The API for embedded {productName} provides a method for stopping an -embedded server. Using this method enables your application to stop the -server in an orderly fashion by performing any necessary cleanup steps -before stopping the server, for example: + |(optional) The name of the application. -* Undeploying deployed applications -* Releasing any resources that your application uses +|contextRoot |The name of the application. |(optional) The context root +of the application. -To stop an embedded {productName}, invoke the `stop` method of an -existing `GlassFish` object. +|precompileJsp |`false` |(optional) If `true`, JSP pages are precompiled +during deployment. -[[gilnz]] -Example 1-5 Stopping an Embedded {productName} +|dbVendorName |None |(optional) The name of the database vendor for +which tables can be created. Allowed values are `javadb`, `db2`, +`mssql`, `mysql`, `oracle`, `postgresql`, `pointbase`, `derby` (also for +CloudScape), and `sybase`, case-insensitive. -This example shows code for prompting the user to press the Enter key to -stop an embedded {productName}. Code for creating a `GlassFish` -object is not shown in this example. For an example of code for creating -a `GlassFish` object, see xref:#gikmz[Example 1-1]. +|createTables |Value of the `create-tables-at-deploy` attribute in +`sun-ejb-jar.xml`. |(optional) If `true`, creates database tables during +deployment for beans that are automatically mapped by the EJB container. -[source,java] ----- -... -import java.io.BufferedReader; -... -import org.glassfish.embeddable.*; -... - System.out.println("Press Enter to stop server"); - // wait for Enter - glassfish.stop(); // Stop Embedded GlassFish -... ----- +|dropTables |Value of the `drop-tables-at-undeploy` attribute in +`sun-ejb-jar.xml`. a| +(optional) If `true`, and deployment and undeployment occur in the same +JVM session, database tables that were automatically created when the +bean(s) were deployed are dropped when the bean(s) are undeployed. -As an alternative, you can use the `dispose` method to stop an embedded -{productName} and dispose of the temporary file system. +If `true`, the name parameter must be specified or tables may not be +dropped. -[[deploying-and-undeploying-an-application-in-an-embedded-glassfish-server]] +|autoDelete |`false` a| +(optional) If `true`, deletes the contents of the xref:#instance-root-directory[Instance +Root Directory] when the server is stopped. -=== Deploying and Undeploying an Application in an Embedded {productName} +Caution: Do not set `autoDelete` to `true` if you are using +`installRoot` to refer to a preexisting {productName} installation. -Deploying an application installs the files that comprise the -application into Embedded {productName} and makes the application -ready to run. By default, an application is enabled when it is deployed. +|=== -The following topics are addressed here: -* xref:#to-deploy-an-application-from-an-archive-file-or-a-directory[To Deploy an Application From an Archive File or a Directory] -* xref:#undeploying-an-application[Undeploying an Application] -* xref:#creating-a-scattered-archive[Creating a Scattered Archive] -* xref:#creating-a-scattered-enterprise-archive[Creating a Scattered Enterprise Archive] +[[embedded-glassfishstart-goal]] -For general information about deploying applications in {productName}, see the xref:application-deployment-guide.adoc#GSDPG[{productName} -Application Deployment Guide]. +==== `embedded-glassfish:start` Goal -[[to-deploy-an-application-from-an-archive-file-or-a-directory]] +This goal starts the server. You can set the parameters described in the +following table. -==== To Deploy an Application From an Archive File or a Directory +[[gjkye]] -An archive file contains the resources, deployment descriptor, and -classes of an application. The content of the file must be organized in -the directory structure that the Jakarta EE specifications define for the -type of archive that the file contains. For more information, see -"xref:application-deployment-guide.adoc#deploying-applications[Deploying Applications]" in {productName} Application Deployment Guide. +Table 1-6 `embedded-glassfish:start` Parameters -Deploying an application from a directory enables you to deploy an -application without the need to package the application in an archive -file. The contents of the directory must match the contents of the -expanded Jakarta EE archive file as laid out by the {productName}. The -directory must be accessible to the machine on which the deploying -application runs. For more information about the requirements for -deploying an application from a directory, see "xref:application-deployment-guide.adoc#to-deploy-an-application-or-module-in-a-directory-format[To -Deploy an Application or Module in a Directory Format]" in {productName} Application Deployment Guide. +[width="100%",cols="<17%,<38%,<45%",options="header",] +|=== +|Parameter |Default |Description +|serverID |`maven` |(optional) The ID of the server to start. -If some of the resources needed by an application are not under the -application's directory, see xref:#creating-a-scattered-archive[Creating a Scattered Archive]. +|containerType |`all` |(optional) The container to start: `web`, `ejb`, +`jpa`, or `all`. -1. Instantiate the `java.io.File` class to represent the archive file or directory. +|installRoot |None |(optional) The xref:#installation-root-directory[Installation Root +Directory]. -2. Invoke the `getDeployer` method of the `GlassFish` object to get an -instance of the `org.glassfish.embeddable.Deployer` class. +|instanceRoot a| +In order of precedence: -3. Invoke the `deploy(File archive, String... params)` method of the -instance of the `Deployer` object. + -Specify the `java.io.File` class instance you created previously as the -first method parameter. + -For information about optional parameters you can set, see the -descriptions of the -xref:reference-manual.adoc#deploy[`deploy`(1)] subcommand parameters. -Simply quote each parameter in the method, for example `"--force=true"`. +* `glassfish.embedded.tmpdir` system property value +* `java.io.tmpdir` system property value +* as-install``/domains/domain1`` -[[gioph]] -Example 1-6 Deploying an Application From an Archive File + |(optional) The xref:#instance-root-directory[Instance Root Directory] -This example shows code for deploying an application from the archive -file `c:\samples\simple.war` and setting the name, contextroot, and -force parameters. This example also includes the code from -xref:#gikmz[Example 1-1] for creating `GlassFishProperties` and -`GlassFish` objects. +|configFile |domain-dir`/config/domain.xml` |(optional) The +configuration file. -[source,java] ----- -... -import java.io.File; -... -import org.glassfish.embeddable.*; -... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setPort("http-listener", 8080); - glassfishProperties.setPort("https-listener", 8181); - ... - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); - glassfish.start(); - File war = new File("c:\\samples\\simple.war"); - Deployer deployer = glassfish.getDeployer(); - deployer.deploy(war, "--name=simple", "--contextroot=simple", "--force=true"); - // deployer.deploy(war) can be invoked instead. Other parameters are optional. -... ----- +|port |None. Must be set explicitly or defined in the configuration +file. |The HTTP or HTTPS port. -[[undeploying-an-application]] +|autoDelete |`false` a| +(optional) If `true`, deletes the contents of the xref:#instance-root-directory[Instance +Root Directory] when the server is stopped. -==== Undeploying an Application +Caution: Do not set `autoDelete` to `true` if you are using +`installRoot` to refer to a preexisting {productName} installation. -Undeploy an application when the application is no longer required to -run in {productName}. For example, before stopping {productName}, -undeploy all applications that are running in {productName}. +|=== -[NOTE] -==== -If you reference a nonembedded {productName} installation using the -`glassfish-embedded-static-shell.jar` file and do not undeploy your -applications in the same server life cycle in which you deployed them, -expanded archives for these applications remain under the -domain-dir``/applications`` directory. -==== +[[embedded-glassfishdeploy-goal]] +==== `embedded-glassfish:deploy` Goal -To undeploy an application, invoke the `undeploy` method of an existing -`Deployer` object. In the method invocation, pass the name of the -application as a parameter. This name is specified when the application -is deployed. +This goal deploys an application. You can redeploy if you change the +application. The application can be a packaged archive or a directory +that contains an exploded application. You can set the parameters +described in the following table. -For information about optional parameters you can set, see the -descriptions of the -xref:reference-manual.adoc#deploy[`deploy`(1)] command parameters. -Simply quote each parameter in the method, for example -`"--cascade=true"`. +[[gjkvv]] -To undeploy all deployed applications, invoke the `undeployAll` method -of an existing `EmbeddedDeployer` object. This method takes no -parameters. +Table 1-7 `embedded-glassfish:deploy` Parameters -[[gilwu]] -Example 1-7 Undeploying an Application +[width="100%",cols="<18%,<39%,<43%",options="header",] +|=== +|Parameter |Default |Description +|app |None |The archive file or directory for the application to be +deployed. -This example shows code for undeploying the application that was -deployed in xref:#gioph[Example 1-6]. +|serverID |`maven` |(optional) The ID of the server to start. -[source,java] ----- -... -import org.glassfish.embeddable.*; -... - deployer.undeploy(war, "--droptables=true", "--cascade=true"); -... ----- +|name a| +In order of precedence: -[[creating-a-scattered-archive]] +* The `application-name` or `module-name` in the deployment descriptor. +* The name of the archive file without the extension or the directory +name. -==== Creating a Scattered Archive - -Deploying a module from a scattered archive (WAR or JAR) enables you to -deploy an unpackaged module whose resources, deployment descriptor, and -classes are in any location. Deploying a module from a scattered archive -simplifies the testing of a module during development, especially if all -the items that the module requires are not available to be packaged. - -In a scattered archive, these items are not required to be organized in -a specific directory structure. Therefore, you must specify the location -of the module's resources, deployment descriptor, and classes when -deploying the module. - -To create a scattered archive, perform these tasks: +For more information, see "xref:application-deployment-guide.adoc#naming-standards[Naming Standards]" in +{productName} Application Deployment Guide. -1. Instantiate the `org.glassfish.embeddable.archive.ScatteredArchive` class. -2. Invoke the `addClassPath` and `addMetadata` methods if you require them. -3. Invoke the `toURI` method to deploy the scattered archive. + |(optional) The name of the application. -The methods of this class for setting the scattered archive -configuration are listed in the following table. The default value of -each configuration setting is also listed. +|contextRoot |The name of the application. |(optional) The context root +of the application. -[[gjrdg]] +|precompileJsp |`false` |(optional) If `true`, JSP pages are precompiled +during deployment. -Table 1-3 Constructors and Methods of the `ScatteredArchive` Class +|dbVendorName |None |(optional) The name of the database vendor for +which tables can be created. Allowed values are `javadb`, `db2`, +`mssql`, `oracle`, `postgresql`, `pointbase`, `derby` (also for +CloudScape), and `sybase`, case-insensitive. -[width="100%",cols="<52%,<38%,<10%",options="header",] +|createTables |Value of the `create-tables-at-deploy` attribute in +`sun-ejb-jar.xml`. |(optional) If `true`, creates database tables during +deployment for beans that are automatically mapped by the EJB container. |=== -|Purpose |Method |Default Value -|Creates and names a scattered archive -a|[source,java] ----- -ScatteredArchive(String name, ScatteredArchive.Type type) ----- - -|None -|Creates and names a scattered archive based on a top-level directory. -If the entire module is organized under the topDir, this is the only -method necessary. The topDir can be null if other methods specify the -remaining parts of the module. -a|[source,java] ----- -ScatteredArchive(String name, ScatteredArchive.Type type, File topDir) ----- -|None +[[embedded-glassfishundeploy-goal]] -|Adds a directory to the classes classpath -a|[source,java] ----- -addClassPath(File path) ----- +==== `embedded-glassfish:undeploy` Goal -|None -|Adds a metadata locator -a|[source,java] ----- -addMetaData(File path) ----- +[NOTE] +==== +If you reference a nonembedded {productName} installation using the +`glassfish-embedded-static-shell.jar` file and do not undeploy your +applications in the same server life cycle in which you deployed them, +expanded archives for these applications remain under the +domain-dir``/applications`` directory. +==== -|None -|Adds and names a metadata locator -a|[source,java] ----- -addMetaData(File path, String name) ----- +This goal undeploys an application. You can set the parameters described +in the following table. -|None +[[gjkxf]] -|Gets the deployable URI for this scattered archive a| -[source,java] ----- -toURI() ----- +Table 1-8 `embedded-glassfish:undeploy` Parameters -|None +[width="100%",cols="<14%,<34%,<52%",options="header",] |=== +|Parameter |Default |Description +|name |If the name is omitted, all applications are undeployed. |The +name of the application. +|serverID |`maven` |(optional) The ID of the server to start. -[[gjrfq]] -Example 1-8 Deploying an Application From a Scattered Archive - -This example shows code for creating a WAR file and using the -`addClassPath` and `addMetadata` methods. This example also includes the -code from xref:#gioph[Example 1-6] for deploying an application from an archive file. +|dropTables |Value of the `drop-tables-at-undeploy` attribute in +`sun-ejb-jar.xml`. a| +(optional) If `true`, and deployment and undeployment occur in the same +JVM session, database tables that were automatically created when the +bean(s) were deployed are dropped when the bean(s) are undeployed. -[source,java] ----- -... -import java.io.File; -... -import org.glassfish.embeddable.*; -... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setPort("http-listener", 9090); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); - glassfish.start(); - Deployer deployer = glassfish.getDeployer(); - ScatteredArchive archive = new ScatteredArchive("testapp", ScatteredArchive.Type.WAR); - // target/classes directory contains complied servlets - archive.addClassPath(new File("target", "classes")); - // resources/sun-web.xml is the WEB-INF/sun-web.xml - archive.addMetadata(new File("resources", "sun-web.xml")); - // resources/web.xml is the WEB-INF/web.xml - archive.addMetadata(new File("resources", "web.xml")); - // Deploy the scattered web archive. - String appName = deployer.deploy(archive.toURI(), "--contextroot=hello"); +If `true`, the name parameter must be specified or tables may not be +dropped. - deployer.undeploy(appName); - glassfish.stop(); - glassfish.dispose(); -... ----- +|cascade |`false` a| +(optional) If `true`, deletes all connection pools and connector +resources associated with the resource adapter being undeployed. -[[creating-a-scattered-enterprise-archive]] +If `false`, undeployment fails if any pools or resources are still +associated with the resource adapter. -==== Creating a Scattered Enterprise Archive +This attribute is applicable to connectors (resource adapters) and +applications with connector modules. -Deploying an application from a scattered enterprise archive (EAR) -enables you to deploy an unpackaged application whose resources, -deployment descriptor, and classes are in any location. Deploying an -application from a scattered archive simplifies the testing of an -application during development, especially if all the items that the -application requires are not available to be packaged. +|=== -In a scattered archive, these items are not required to be organized in -a specific directory structure. Therefore, you must specify the location -of the application's resources, deployment descriptor, and classes when -deploying the application. -To create a scattered enterprise archive, perform these tasks: +[[embedded-glassfishstop-goal]] -1. Instantiate the -`org.glassfish.embeddable.archive.ScatteredEnterpriseArchive` class. -2. Invoke the `addArchive` and `addMetadata` methods if you require -them. -3. Invoke the `toURI` method to deploy the scattered enterprise -archive. +==== `embedded-glassfish:stop` Goal -The methods of this class for setting the scattered enterprise archive -configuration are listed in the following table. The default value of -each configuration setting is also listed. +This goal stops the server. You can set the parameters described in the +following table. -[[gkvgb]] +[[gjkwm]] -Table 1-4 Constructors and Methods of the `ScatteredEnterpriseArchive` Class +Table 1-9 `embedded-glassfish:stop` Parameters -[width="99%",cols="<42%,<48%,<10%",options="header",] +[width="100%",cols="<16%,<17%,<67%",options="header",] +|=== +|Parameter |Default |Description +|serverID |`maven` |(optional) The ID of the server to stop. |=== -|Purpose |Method |Default Value -|Creates and names a scattered enterprise archive a| -[source,java] ----- -ScatteredEnterpriseArchive(String name) ----- - - |None -|Adds a module or library a| -[source,java] ----- -addArchive(File archive) ----- - |None -|Adds a module or library a| -[source,java] ----- -addArchive(File archive, String name) ----- - |None -|Adds a module or library a| -[source,java] ----- -addArchive(URI URI) ----- +[[embedded-glassfishadmin-goal]] - |None -|Adds a module or library a| -[source,java] ----- -addArchive(URI URI, String name) ----- +==== `embedded-glassfish:admin` Goal - |None -|Adds a metadata locator a| -[source,java] ----- -addMetaData(File path) ----- +This goal runs a {productName} administration command. You must use +either the command and commandParameters parameters in combination or +the commandLine parameter. For more information about administration +commands, see the xref:reference-manual.adoc#GSRFM[{productName} +Reference Manual]. You can set the parameters described in the following +table. - |None -|Adds and names a metadata locator a| -[source,java] ----- -addMetaData(File path, String name) ----- +[[gjkwe]] - |None -|Gets the deployable URI for this scattered archive a| -[source,java] ----- -toURI() ----- +Table 1-10 `embedded-glassfish:start` Parameters - |None +[width="100%",cols="<24%,<10%,<66%",options="header",] |=== +|Parameter |Default |Description +|serverID |`maven` |(optional) The ID of the server on which to run the +command. +|command |None |The name of the command, for example +`createJdbcResource`. -[[gkvga]] -Example 1-9 Deploying an Application From a Scattered Enterprise Archive +|commandParameters |None |A map of the command parameters. See the +`org.glassfish.embeddable.admin.CommandParameters` class at +`https://www.javadoc.io/doc/org.glassfish.main.common/glassfish-api/latest/org/glassfish/api/admin/CommandParameters.html`. -This example shows code for creating an EAR file and using the -`addArchive` and `addMetadata` methods. This example also includes code -similar toxref:#gjrfq[Example 1-8] for creating a scattered archive. +|commandLine |None |The full `asadmin` syntax of the command. +|=== -[source,java] + +[[including-the-glassfish-server-embedded-server-api-in-applications]] + +== Including the {productName} Embedded Server API in Applications + +{productName} provides an application programming +interface (API) for developing applications in which {productName} is +embedded. For details, see the `org.glassfish.embeddable` packages at +`https://www.javadoc.io/doc/org.glassfish.main.common/simple-glassfish-api/latest/index.html`. + +The following topics are addressed here: + +* xref:#setting-the-class-path[Setting the Class Path] +* xref:#creating-starting-and-stopping-embedded-glassfish-server[Creating, Starting, and Stopping Embedded {productName}] +* xref:#deploying-and-undeploying-an-application-in-an-embedded-glassfish-server[Deploying and Undeploying an Application in an Embedded +{productName}] +* xref:#running-asadmin-commands-using-the-glassfish-server-embedded-server-api[Running `asadmin` Commands Using the {productName} +Embedded Server API] +* xref:#sample-applications[Sample Applications] + +[[setting-the-class-path]] + +=== Setting the Class Path + +To enable your applications to locate the class libraries for embedded +{productName}, add a JAR file corresponding to one of the xref:#editions[Embedded {productName} editions] to your class path. + +In addition, add to the class path any other JAR files or classes upon +which your applications depend. For example, if an application uses a +database other than Java DB, include the Java DataBase Connectivity +(JDBC) driver JAR files in the class path. + +[[creating-starting-and-stopping-embedded-glassfish-server]] + +=== Creating, Starting, and Stopping Embedded {productName} + +Before you can run applications, you must set up and run the embedded +{productName}. + +The following topics are addressed here: + +* xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}] +* xref:#running-an-embedded-glassfish-server[Running an Embedded {productName}] + +[[creating-and-configuring-an-embedded-glassfish-server]] + +==== Creating and Configuring an Embedded {productName} + +To create and configure an embedded {productName}, perform these +tasks: + +1. Instantiate the `org.glassfish.embeddable.BootstrapProperties` +class. +2. Invoke any methods for configuration settings that you require. This +is optional. +3. Invoke the `GlassFishRuntime.bootstrap()` or +`GlassFishRuntime.bootstrap(BootstrapProperties)` method to create a +`GlassFishRuntime` object. +4. Instantiate the `org.glassfish.embeddable.GlassFishProperties` +class. +5. Invoke any methods for configuration settings that you require. This +is optional. +6. Invoke the `glassfishRuntime.newGlassFish(GlassFishProperties)` +method to create a `GlassFish` object. + +The methods of the `BootstrapProperties` class for setting the server +configuration are listed in the following table. The default value of +each configuration setting is also listed. + +[[gksir]] + +Table 1-1 Methods of the `BootstrapProperties` Class + +[width="100%",cols="<29%,<33%,<38%",options="header",] +|=== +|Purpose |Method |Default Value +|References an existing xref:#installation-root-directory[Installation Root Directory], also called as-install +a|[source] +---- +setInstallRoot(String as-install) ---- -... -import java.io.File; -... -import org.glassfish.embeddable.*; -... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setPort("http-listener", 9090); - GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); - glassfish.start(); - Deployer deployer = glassfish.getDeployer(); - // Create a scattered web application. - ScatteredArchive webmodule = new ScatteredArchive("testweb", ScatteredArchive.Type.WAR); - // target/classes directory contains my complied servlets - webmodule.addClassPath(new File("target", "classes")); - // resources/sun-web.xml is my WEB-INF/sun-web.xml - webmodule.addMetadata(new File("resources", "sun-web.xml")); +|None. If `glassfish-embedded-static-shell.jar` is used, the +xref:#installation-root-directory[Installation Root Directory] is automatically determined and +need not be specified. +|=== - // Create a scattered enterprise archive. - ScatteredEnterpriseArchive archive = new ScatteredEnterpriseArchive("testapp"); - // src/application.xml is my META-INF/application.xml - archive.addMetadata(new File("src", "application.xml")); - // Add scattered web module to the scattered enterprise archive. - // src/application.xml references Web module as "scattered.war". - //Hence specify the name while adding the archive. - archive.addArchive(webmodule.toURI(), "scattered.war"); - // lib/mylibrary.jar is a library JAR file. - archive.addArchive(new File("lib", "mylibrary.jar")); - // target/ejbclasses contain my compiled EJB module. - // src/application.xml references EJB module as "ejb.jar". - //Hence specify the name while adding the archive. - archive.addArchive(new File("target", "ejbclasses"), "ejb.jar"); - // Deploy the scattered enterprise archive. - String appName = deployer.deploy(archive.toURI()); +The methods of the `GlassFishProperties` class for setting the server +configuration are listed in the following table. The default value of +each configuration setting is also listed. - deployer.undeploy(appName); - glassfish.stop(); - glassfish.dispose(); -... +[[gkskl]] + +Table 1-2 Methods of the `GlassFishProperties` Class + +[width="100%",cols="<24%,<37%,<39%",options="header",] +|=== +|Purpose |Method |Default Value +|References an existing xref:#instance-root-directory[Instance Root Directory], also +called domain-dir +a| +[source] +---- +setInstanceRoot(String domain-dir) ---- -[[running-asadmin-commands-using-the-glassfish-server-embedded-server-api]] +a| +In order of precedence: -=== Running `asadmin` Commands Using the {productName} Embedded API +* `glassfish.embedded.tmpdir` property value specified in `GlassFishProperties` object +* `glassfish.embedded.tmpdir` system property value +* `java.io.tmpdir` system property value +* as-install``/domains/domain1`` if a nonembedded installation is referenced -Running xref:reference-manual.adoc#asadmin[`asadmin`] commands from an application enables -the application to configure the embedded {productName} to suit the -application's requirements. For example, an application can run the -required `asadmin` commands to create a JDBC technology connection to a -database. +|Creates a new or references an existing configuration file +a| +[source] +---- +setConfigFileURI(String configFileURI) +---- +a|In order of precedence: -For more information about configuring embedded {productName}, see -the xref:administration-guide.adoc#GSADG[{productName} Administration -Guide]. For detailed information about `asadmin` commands, see Section 1 -of the xref:reference-manual.adoc#GSRFM[{productName} Reference -Manual]. +* domain-dir``/config/domain.xml`` if domain-dir was set using `setInstanceRoot` +* built-in embedded `domain.xml` + +|Specifies whether the configuration file is read-only +a| +[source] +---- +setConfigFileReadOnly(boolean readOnly) +---- +|`true` +|Sets the port on which Embedded {productName} listens. +|`setPort`(String networkListener, int port) +|none +|=== [NOTE] ==== -Ensure that your application has started an embedded {productName} -before the application attempts to run `asadmin` commands. For more -information, see xref:#running-an-embedded-glassfish-server[Running an Embedded {productName}]. +Do not use `setPort` if you are using `setInstanceRoot` or `setConfigFileURI`. ==== -The `org.glassfish.embeddable` package contains classes that you can use -to run `asadmin` commands. Use the following code examples as templates -and change the command name, parameter names, and parameter values as -needed. - -[[gjldj]] -Example 1-10 Running an `asadmin create-jdbc-resource` Command +[[gikmz]] +Example 1-1 Creating an Embedded {productName} -This example shows code for running an `asadmin create-jdbc-resource` -command. Code for creating and starting the server is not shown in this -example. For an example of code for creating and starting the server, -see xref:#gilry[Example 1-4]. +This example shows code for creating an Embedded {productName}. [source,java] ---- ... import org.glassfish.embeddable.*; ... - String command = "create-jdbc-resource"; - String poolid = "--connectionpoolid=DerbyPool"; - String dbname = "jdbc/DerbyPool"; - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult commandResult = commandRunner.run(command, poolid, dbname); + GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(); + glassfish.start(); ... ---- -[[gjlfm]] -Example 1-11 Running an `asadmin set-log-level` Command +[[gksjo]] +Example 1-2 Creating an Embedded {productName} with configuration +customizations -This example shows code for running an `asadmin set-log-level` command. -Code for creating and starting the server is not shown in this example. -For an example of code for creating and starting the server, see -xref:#gilry[Example 1-4]. +This example shows code for creating an Embedded {productName} using +the existing domain-dir +`C:\samples\test\applicationserver\domains\domain1`. [source,java] ---- -... +// ... import org.glassfish.embeddable.*; -... - String command = "set-log-level"; - String weblevel = "jakarta.enterprise.system.container.web=FINE"; - CommandRunner commandRunner = glassfish.getCommandRunner(); - CommandResult commandResult = commandRunner.run(command, weblevel); -... + // ... + BootstrapProperties bootstrapProperties = new BootstrapProperties(); + bootstrapProperties.setInstallRoot("C:\\samples\\test\\applicationserver"); + GlassFishRuntime glassfishRuntime = GlassFishRuntime.bootstrap(bootstrapProperties); + + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setInstanceRoot("C:\\samples\\test\\applicationserver\\domains\\domain1"); + GlassFish glassfish = glassfishRuntime.newGlassFish(glassfishProperties); + + glassfish.start(); + // ... ---- -For another way to change log levels, see xref:#changing-log-levels-in-embedded-glassfish-server[Changing Log -Levels in Embedded {productName}]. +[[supported-properties]] +==== Configuration properties supported by Embedded {productName} -[[sample-applications]] +In `GlassFishProperties` and in a properties file, Embedded {productName} supports the same configuration properties as the `set` and `get` administration commands of the {productName} Server. -=== Sample Applications +In addition, it also accepts properties with the `embedded-glassfish-config.` prefix. This prefix is removed before applying the property (e.g., `resources.jdbc-connection-pool...` can be defined as `embedded-glassfish-config.resources.jdbc-connection-pool...`). This prefix is no longer necessary and its usage is deprecated, but it's supported for backwards compatibility. -[[gionq]] -Example 1-12 Using an Existing `domain.xml` File and Deploying an -Application From an Archive File +[[running-an-embedded-glassfish-server]] +==== Running Embedded {productName} from a Java application -This example shows code for the following: +After you create an embedded {productName} server as described in +xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}], you +can perform operations such as: -* Using the existing file -`c:\myapp\embeddedserver\domains\domain1\config\domain.xml` and -preserving this file when the application is stopped. -* Deploying an application from the archive file -`c:\samples\simple.war`. +* xref:#setting-the-port-of-an-embedded-glassfish-server-from-an-application[Setting the Port of an Embedded {productName} From an Application] +* xref:#starting-an-embedded-glassfish-server-from-an-application[Starting an Embedded {productName} From an Application] +* xref:#stopping-an-embedded-glassfish-server-from-an-application[Stopping an Embedded {productName} From an Application] + +[[setting-the-port-of-an-embedded-glassfish-server-from-an-application]] + +Setting the Port of an Embedded {productName} From an Application + +You must set the server's HTTP or HTTPS port. If you do not set the +port, your application fails to start and throws an exception. You can +set the port directly or indirectly. + +[NOTE] +==== +Do not use `setPort` if you are using `setInstanceRoot` or +`setConfigFileURI`. These methods set the port indirectly. +==== + + +* To set the port directly, invoke the `setPort` method of the +`GlassFishProperties` object. +* To set the port indirectly, use a `domain.xml` file that sets the +port. For more information, see xref:#GSESG00056[The `domain.xml` File]. + +[[gjkxc]] +Example 1-3 Setting the port of an Embedded {productName} + +This example shows code for setting the port of an embedded {productName}. [source,java] ---- -import java.io.File; -import java.io.BufferedReader; +... import org.glassfish.embeddable.*; +... + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setPort("http-listener", 8080); + glassfishProperties.setPort("https-listener", 8181); +... +---- -public class Main { +[[starting-an-embedded-glassfish-server-from-an-application]] - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - File configFile = new File ("c:\\myapp\\embeddedserver\\domains\\domain1\\config\\domain.xml"); - File war = new File("c:\\samples\\simple.war"); - try { - GlassFishRuntime glassfishRuntime = GlassFishRuntime.bootstrap(); - ... - GlassFishProperties glassfishProperties = new GlassFishProperties(); - glassfishProperties.setConfigFileURI(configFile.toURI()); - glassfishProperties.setConfigFileReadOnly(false); - ... - GlassFish glassfish = glassfishRuntime.newGlassFish(glassfishProperties); - glassfish.start(); +Starting an Embedded {productName} From an Application - Deployer deployer = glassfish.getDeployer(); - deployer.deploy(war, "--force=true"); - } - catch (Exception e) { - e.printStackTrace(); - } +To start an embedded {productName}, invoke the `start` method of the `GlassFish` object. - System.out.println("Press Enter to stop server"); +[[gilry]] +Example 1-4 Starting an Embedded {productName} + +This example shows code for setting the port and starting an embedded +{productName}. This example also includes the code from +xref:#gikmz[Example 1-1] for creating a `GlassFish` object. + +[source,java] +---- +... +import org.glassfish.embeddable.*; +... + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setPort("http-listener", 8080); + glassfishProperties.setPort("https-listener", 8181); + ... + GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); + glassfish.start(); +... +---- + +[[stopping-an-embedded-glassfish-server-from-an-application]] + +Stopping an Embedded {productName} From an Application + +The API for embedded {productName} provides a method for stopping an +embedded server. Using this method enables your application to stop the +server in an orderly fashion by performing any necessary cleanup steps +before stopping the server, for example: + +* Undeploying deployed applications +* Releasing any resources that your application uses + +To stop an embedded {productName}, invoke the `stop` method of an +existing `GlassFish` object. + +[[gilnz]] +Example 1-5 Stopping an Embedded {productName} + +This example shows code for prompting the user to press the Enter key to +stop an embedded {productName}. Code for creating a `GlassFish` +object is not shown in this example. For an example of code for creating +a `GlassFish` object, see xref:#gikmz[Example 1-1]. + +[source,java] +---- +... +import java.io.BufferedReader; +... +import org.glassfish.embeddable.*; +... + System.out.println("Press Enter to stop server"); // wait for Enter - new BufferedReader(new java.io.InputStreamReader(System.in)).readLine(); - try { - glassfish.dispose(); - glassfishRuntime.shutdown(); - } - catch (Exception e) { - e.printStackTrace(); - } - } -} + glassfish.stop(); // Stop Embedded GlassFish +... ---- -[[testing-applications-with-the-maven-plug-in-for-embedded-glassfish-server]] +As an alternative, you can use the `dispose` method to stop an embedded +{productName} and dispose of the temporary file system. + +[[deploying-and-undeploying-an-application-in-an-embedded-glassfish-server]] -== Testing Applications with the Maven Plug-in for Embedded {productName} +=== Deploying and Undeploying an Application in an Embedded {productName} -If you are using http://maven.apache.org/[Apache Maven] -(`http://maven.apache.org/`), the plug-in for embedded {productName} -simplifies the testing of applications. This plug-in enables you to -build and start an unpackaged application with a single Maven goal. +Deploying an application installs the files that comprise the +application into Embedded {productName} and makes the application +ready to run. By default, an application is enabled when it is deployed. The following topics are addressed here: -* xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment] -* xref:#to-build-and-start-an-application-from-maven[To Build and Start an Application From Maven] -* xref:#to-stop-embedded-glassfish-server[To Stop Embedded {productName}] -* xref:#to-redeploy-an-application-that-was-built-and-started-from-maven[To Redeploy an Application That Was Built and Started From Maven] -* xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}] +* xref:#to-deploy-an-application-from-an-archive-file-or-a-directory[To Deploy an Application From an Archive File or a Directory] +* xref:#undeploying-an-application[Undeploying an Application] +* xref:#creating-a-scattered-archive[Creating a Scattered Archive] +* xref:#creating-a-scattered-enterprise-archive[Creating a Scattered Enterprise Archive] -Predefined Maven goals for embedded {productName} are described in -xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}]. +For general information about deploying applications in {productName}, see the xref:application-deployment-guide.adoc#GSDPG[{productName} +Application Deployment Guide]. -To use Maven with Embedded {productName} and the EJB 3.1 Embeddable -API, see xref:#GSESG00064[Using Maven with the EJB 3.1 Embeddable API and -Embedded {productName}]. +[[to-deploy-an-application-from-an-archive-file-or-a-directory]] -[[to-set-up-your-maven-environment]] +==== To Deploy an Application From an Archive File or a Directory -=== To Set Up Your Maven Environment +An archive file contains the resources, deployment descriptor, and +classes of an application. The content of the file must be organized in +the directory structure that the Jakarta EE specifications define for the +type of archive that the file contains. For more information, see +"xref:application-deployment-guide.adoc#deploying-applications[Deploying Applications]" in {productName} Application Deployment Guide. -Setting up your Maven environment enables Maven to download the required -embedded {productName} distribution file when you build your project. -Setting up your Maven environment also identifies the plug-in that -enables you to build and start an unpackaged application with a single -Maven goal. +Deploying an application from a directory enables you to deploy an +application without the need to package the application in an archive +file. The contents of the directory must match the contents of the +expanded Jakarta EE archive file as laid out by the {productName}. The +directory must be accessible to the machine on which the deploying +application runs. For more information about the requirements for +deploying an application from a directory, see "xref:application-deployment-guide.adoc#to-deploy-an-application-or-module-in-a-directory-format[To +Deploy an Application or Module in a Directory Format]" in {productName} Application Deployment Guide. -Before You Begin +If some of the resources needed by an application are not under the +application's directory, see xref:#creating-a-scattered-archive[Creating a Scattered Archive]. -Ensure that http://maven.apache.org/[Apache Maven] -(`http://maven.apache.org/`) is installed. +1. Instantiate the `java.io.File` class to represent the archive file or directory. -1. Identify the Maven plug-in for embedded {productName}. -+ -Add the following `plugin` element to your POM file: -+ -[source,xml] +2. Invoke the `getDeployer` method of the `GlassFish` object to get an +instance of the `org.glassfish.embeddable.Deployer` class. + +3. Invoke the `deploy(File archive, String... params)` method of the +instance of the `Deployer` object. + +Specify the `java.io.File` class instance you created previously as the +first method parameter. + +For information about optional parameters you can set, see the +descriptions of the +xref:reference-manual.adoc#deploy[`deploy`(1)] subcommand parameters. +Simply quote each parameter in the method, for example `"--force=true"`. + +[[gioph]] +Example 1-6 Deploying an Application From an Archive File + +This example shows code for deploying an application from the archive +file `c:\samples\simple.war` and setting the name, contextroot, and +force parameters. This example also includes the code from +xref:#gikmz[Example 1-1] for creating `GlassFishProperties` and +`GlassFish` objects. + +[source,java] ---- ... - ... - - ... - - org.glassfish.embedded - embedded-glassfish-maven-plugin - version - - ... - +import java.io.File; ... ----- -version:: - The version to use. The version of the final promoted build for this - release is `7.0`. The Maven plug-in is not bound to a specific version - of {productName}. You can specify the version you want to use. If - no version is specified, a default version is used. - -2. Configure the the path to the application WAR, and other standard settings. -+ -Add the following `configuration` element to your POM file: -+ -[source,xml] ----- +import org.glassfish.embeddable.*; ... - - ... - - ... - - target/test.war - 8080 - test - true - ... - - ... - - ... - + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setPort("http-listener", 8080); + glassfishProperties.setPort("https-listener", 8181); + ... + GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); + glassfish.start(); + File war = new File("c:\\samples\\simple.war"); + Deployer deployer = glassfish.getDeployer(); + deployer.deploy(war, "--name=simple", "--contextroot=simple", "--force=true"); + // deployer.deploy(war) can be invoked instead. Other parameters are optional. ... ---- -app:: - In the app parameter, substitute the archive file or directory for your - application. The optional port, contextRoot, and autoDelete parameters - show example values. For details, see xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for - Embedded {productName}]. -3. Perform advanced plug-in configuration. This step is optional. -Add the following `configuration` element to your POM file: -+ -[source,xml] +[[undeploying-an-application]] + +==== Undeploying an Application + +Undeploy an application when the application is no longer required to +run in {productName}. For example, before stopping {productName}, +undeploy all applications that are running in {productName}. + + +[NOTE] +==== +If you reference a nonembedded {productName} installation using the +`glassfish-embedded-static-shell.jar` file and do not undeploy your +applications in the same server life cycle in which you deployed them, +expanded archives for these applications remain under the +domain-dir``/applications`` directory. +==== + + +To undeploy an application, invoke the `undeploy` method of an existing +`Deployer` object. In the method invocation, pass the name of the +application as a parameter. This name is specified when the application +is deployed. + +For information about optional parameters you can set, see the +descriptions of the +xref:reference-manual.adoc#deploy[`deploy`(1)] command parameters. +Simply quote each parameter in the method, for example +`"--cascade=true"`. + +To undeploy all deployed applications, invoke the `undeployAll` method +of an existing `EmbeddedDeployer` object. This method takes no +parameters. + +[[gilwu]] +Example 1-7 Undeploying an Application + +This example shows code for undeploying the application that was +deployed in xref:#gioph[Example 1-6]. + +[source,java] ---- ... - - ... - - ... - - target/test.war - test - test - - 8080 - 8181 - - - test_key=test_value - - bootstrap.properties - -server.jms-service.jms-host.default_JMS_host.port=17676 - - glassfish.properties - - ANTLR_USE_DIRECT_CLASS_LOADING=true - - system.properties - - - - - start - deploy - undeploy - stop - - - - - ... - +import org.glassfish.embeddable.*; +... + deployer.undeploy(war, "--droptables=true", "--cascade=true"); ... ---- -4. Configure Maven goals. -Add `execution` elements to your POM file: -+ -[source,xml] +[[creating-a-scattered-archive]] + +==== Creating a Scattered Archive + +Deploying a module from a scattered archive (WAR or JAR) enables you to +deploy an unpackaged module whose resources, deployment descriptor, and +classes are in any location. Deploying a module from a scattered archive +simplifies the testing of a module during development, especially if all +the items that the module requires are not available to be packaged. + +In a scattered archive, these items are not required to be organized in +a specific directory structure. Therefore, you must specify the location +of the module's resources, deployment descriptor, and classes when +deploying the module. + +To create a scattered archive, perform these tasks: + +1. Instantiate the `org.glassfish.embeddable.archive.ScatteredArchive` class. +2. Invoke the `addClassPath` and `addMetadata` methods if you require them. +3. Invoke the `toURI` method to deploy the scattered archive. + +The methods of this class for setting the scattered archive +configuration are listed in the following table. The default value of +each configuration setting is also listed. + +[[gjrdg]] + +Table 1-3 Constructors and Methods of the `ScatteredArchive` Class + +[width="100%",cols="<52%,<38%,<10%",options="header",] +|=== +|Purpose |Method |Default Value +|Creates and names a scattered archive +a|[source,java] ---- -... - - ... - - ... - - - install - - goal - - - - ... - - ... - -... +ScatteredArchive(String name, ScatteredArchive.Type type) ---- -goal:: - The goal to use. See xref:#maven-goals-for-embedded-glassfish-server[Maven Goals for Embedded {productName}]. +|None -[[gjkod]] -Example 1-13 POM File for Configuring Maven to Use Embedded {productName} +|Creates and names a scattered archive based on a top-level directory. +If the entire module is organized under the topDir, this is the only +method necessary. The topDir can be null if other methods specify the +remaining parts of the module. +a|[source,java] +---- +ScatteredArchive(String name, ScatteredArchive.Type type, File topDir) +---- -This example shows a POM file for configuring Maven to use embedded {productName}. +|None -[source,xml] +|Adds a directory to the classes classpath +a|[source,java] +---- +addClassPath(File path) ---- - - - - 4.0.0 - org.example - maven-glassfish-plugin-tester - 1.0.0-SNAPSHOT - Maven Embedded Glassfish Plugin Example - - - - org.glassfish.embedded - embedded-glassfish-maven-plugin - 7.0 - - target/test.war - 8080 - test - true - - - - install - - run - - - - - - - +|None + +|Adds a metadata locator +a|[source,java] +---- +addMetaData(File path) ---- -[[to-build-and-start-an-application-from-maven]] +|None -=== To Build and Start an Application From Maven +|Adds and names a metadata locator +a|[source,java] +---- +addMetaData(File path, String name) +---- -If you are using Maven to manage the development of your application, -you can use a Maven goal to build and start the application in embedded -{productName}. +|None -Before You Begin +|Gets the deployable URI for this scattered archive a| +[source,java] +---- +toURI() +---- -Ensure that your Maven environment is configured, as described in -xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment]. +|None +|=== -1. Include the path to the Maven executable file `mvn` in your path -statement. -2. Ensure that the `JAVA_HOME` environment variable is defined. -3. Create a directory for the Maven project for your application. -4. Copy to your project directory the POM file that you created in -xref:#to-set-up-your-maven-environment[To Set Up Your Maven Environment]. -5. Run the following command in your project directory: -+ -[source] + +[[gjrfq]] +Example 1-8 Deploying an Application From a Scattered Archive + +This example shows code for creating a WAR file and using the +`addClassPath` and `addMetadata` methods. This example also includes the +code from xref:#gioph[Example 1-6] for deploying an application from an archive file. + +[source,java] +---- +... +import java.io.File; +... +import org.glassfish.embeddable.*; +... + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setPort("http-listener", 9090); + GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); + glassfish.start(); + Deployer deployer = glassfish.getDeployer(); + ScatteredArchive archive = new ScatteredArchive("testapp", ScatteredArchive.Type.WAR); + // target/classes directory contains complied servlets + archive.addClassPath(new File("target", "classes")); + // resources/sun-web.xml is the WEB-INF/sun-web.xml + archive.addMetadata(new File("resources", "sun-web.xml")); + // resources/web.xml is the WEB-INF/web.xml + archive.addMetadata(new File("resources", "web.xml")); + // Deploy the scattered web archive. + String appName = deployer.deploy(archive.toURI(), "--contextroot=hello"); + + deployer.undeploy(appName); + glassfish.stop(); + glassfish.dispose(); +... +---- + +[[creating-a-scattered-enterprise-archive]] + +==== Creating a Scattered Enterprise Archive + +Deploying an application from a scattered enterprise archive (EAR) +enables you to deploy an unpackaged application whose resources, +deployment descriptor, and classes are in any location. Deploying an +application from a scattered archive simplifies the testing of an +application during development, especially if all the items that the +application requires are not available to be packaged. + +In a scattered archive, these items are not required to be organized in +a specific directory structure. Therefore, you must specify the location +of the application's resources, deployment descriptor, and classes when +deploying the application. + +To create a scattered enterprise archive, perform these tasks: + +1. Instantiate the +`org.glassfish.embeddable.archive.ScatteredEnterpriseArchive` class. +2. Invoke the `addArchive` and `addMetadata` methods if you require +them. +3. Invoke the `toURI` method to deploy the scattered enterprise +archive. + +The methods of this class for setting the scattered enterprise archive +configuration are listed in the following table. The default value of +each configuration setting is also listed. + +[[gkvgb]] + +Table 1-4 Constructors and Methods of the `ScatteredEnterpriseArchive` Class + +[width="99%",cols="<42%,<48%,<10%",options="header",] +|=== +|Purpose |Method |Default Value +|Creates and names a scattered enterprise archive a| +[source,java] +---- +ScatteredEnterpriseArchive(String name) +---- + + |None +|Adds a module or library a| +[source,java] +---- +addArchive(File archive) +---- + + |None +|Adds a module or library a| +[source,java] +---- +addArchive(File archive, String name) +---- + + |None +|Adds a module or library a| +[source,java] ---- -mvn install +addArchive(URI URI) ---- -This command performs the following actions: -* Installs the Maven repository in a directory named `.m2` under your -home directory. -* Starts Embedded {productName}. -* Deploys your application. -+ -The application continues to run in Embedded {productName} until -Embedded {productName} is stopped. -[[to-stop-embedded-glassfish-server]] + |None +|Adds a module or library a| +[source,java] +---- +addArchive(URI URI, String name) +---- -=== To Stop Embedded {productName} + |None +|Adds a metadata locator a| +[source,java] +---- +addMetaData(File path) +---- -1. Change to the root directory of the Maven project for your -application. -2. Run the Maven goal to stop the application in embedded {productName}. -+ -[source] + |None +|Adds and names a metadata locator a| +[source,java] ---- -mvn embedded-glassfish:stop +addMetaData(File path, String name) ---- -This runs the `stop` method of the `GlassFish` object and any other -methods that are required to shut down the server in an orderly fashion. -See xref:#stopping-an-embedded-glassfish-server-from-an-application[Stopping an Embedded {productName} From an -Application]. -[[to-redeploy-an-application-that-was-built-and-started-from-maven]] + |None +|Gets the deployable URI for this scattered archive a| +[source,java] +---- +toURI() +---- -=== To Redeploy an Application That Was Built and Started From Maven + |None +|=== -An application that was built and started from Maven continues to run in -Embedded {productName} until Embedded {productName} is stopped. -While the application is running, you can test changes to the -application by redeploying it. -To redeploy, in the window from where the application was built and -started from Maven, press Enter. +[[gkvga]] +Example 1-9 Deploying an Application From a Scattered Enterprise Archive -[[maven-goals-for-embedded-glassfish-server]] +This example shows code for creating an EAR file and using the +`addArchive` and `addMetadata` methods. This example also includes code +similar toxref:#gjrfq[Example 1-8] for creating a scattered archive. -=== Maven Goals for Embedded {productName} +[source,java] +---- +... +import java.io.File; +... +import org.glassfish.embeddable.*; +... + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setPort("http-listener", 9090); + GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); + glassfish.start(); + Deployer deployer = glassfish.getDeployer(); -You can use the following Maven goals to test your applications with -embedded {productName}: + // Create a scattered web application. + ScatteredArchive webmodule = new ScatteredArchive("testweb", ScatteredArchive.Type.WAR); + // target/classes directory contains my complied servlets + webmodule.addClassPath(new File("target", "classes")); + // resources/sun-web.xml is my WEB-INF/sun-web.xml + webmodule.addMetadata(new File("resources", "sun-web.xml")); -* xref:#embedded-glassfishrun-goal[`embedded-glassfish:run` Goal] -* xref:#embedded-glassfishstart-goal[`embedded-glassfish:start` Goal] -* xref:#embedded-glassfishdeploy-goal[`embedded-glassfish:deploy` Goal] -* xref:#embedded-glassfishundeploy-goal[`embedded-glassfish:undeploy` Goal] -* xref:#embedded-glassfishstop-goal[`embedded-glassfish:stop` Goal] -* xref:#embedded-glassfishadmin-goal[`embedded-glassfish:admin` Goal] + // Create a scattered enterprise archive. + ScatteredEnterpriseArchive archive = new ScatteredEnterpriseArchive("testapp"); + // src/application.xml is my META-INF/application.xml + archive.addMetadata(new File("src", "application.xml")); + // Add scattered web module to the scattered enterprise archive. + // src/application.xml references Web module as "scattered.war". + //Hence specify the name while adding the archive. + archive.addArchive(webmodule.toURI(), "scattered.war"); + // lib/mylibrary.jar is a library JAR file. + archive.addArchive(new File("lib", "mylibrary.jar")); + // target/ejbclasses contain my compiled EJB module. + // src/application.xml references EJB module as "ejb.jar". + //Hence specify the name while adding the archive. + archive.addArchive(new File("target", "ejbclasses"), "ejb.jar"); -[[embedded-glassfishrun-goal]] + // Deploy the scattered enterprise archive. + String appName = deployer.deploy(archive.toURI()); -==== `embedded-glassfish:run` Goal + deployer.undeploy(appName); + glassfish.stop(); + glassfish.dispose(); +... +---- -This goal starts the server and deploys an application. You can redeploy -if you change the application. The application can be a packaged archive -or a directory that contains an exploded application. You can set the -parameters described in the following table. +[[running-asadmin-commands-using-the-glassfish-server-embedded-server-api]] -[[gjkws]] +=== Running `asadmin` Commands Using the {productName} Embedded API -Table 1-5 `embedded-glassfish:run` Parameters +Running xref:reference-manual.adoc#asadmin[`asadmin`] commands from an application enables +the application to configure the embedded {productName} to suit the +application's requirements. For example, an application can run the +required `asadmin` commands to create a JDBC technology connection to a +database. -[width="100%",cols="<18%,<42%,<40%",options="header",] -|=== -|Parameter |Default |Description -|app |None |The archive file or directory for the application to be deployed. +For more information about configuring embedded {productName}, see +the xref:administration-guide.adoc#GSADG[{productName} Administration +Guide]. For detailed information about `asadmin` commands, see Section 1 +of the xref:reference-manual.adoc#GSRFM[{productName} Reference +Manual]. -|serverID |`maven` |(optional) The ID of the server to start. -|containerType |`all` |(optional) The container to start: `web`, `ejb`, `jpa`, or `all`. +[NOTE] +==== +Ensure that your application has started an embedded {productName} +before the application attempts to run `asadmin` commands. For more +information, see xref:#running-an-embedded-glassfish-server[Running an Embedded {productName}]. +==== -|installRoot |None |(optional) The xref:#installation-root-directory[Installation Root Directory]. -|instanceRoot a| -In order of precedence: +The `org.glassfish.embeddable` package contains classes that you can use +to run `asadmin` commands. Use the following code examples as templates +and change the command name, parameter names, and parameter values as +needed. -* `glassfish.embedded.tmpdir` property value specified in `GlassFishProperties` object -* `glassfish.embedded.tmpdir` system property value -* `java.io.tmpdir` system property value -* as-install``/domains/domain1`` if a nonembedded installation is referenced +[[gjldj]] +Example 1-10 Running an `asadmin create-jdbc-resource` Command - |(optional) The xref:#instance-root-directory[Instance Root Directory] +This example shows code for running an `asadmin create-jdbc-resource` +command. Code for creating and starting the server is not shown in this +example. For an example of code for creating and starting the server, +see xref:#gilry[Example 1-4]. -|configFile |domain-dir``/config/domain.xml`` |(optional) The -configuration file. +[source,java] +---- +... +import org.glassfish.embeddable.*; +... + String command = "create-jdbc-resource"; + String poolid = "--connectionpoolid=DerbyPool"; + String dbname = "jdbc/DerbyPool"; + CommandRunner commandRunner = glassfish.getCommandRunner(); + CommandResult commandResult = commandRunner.run(command, poolid, dbname); +... +---- -|port |None. Must be set explicitly or defined in the configuration -file. |The HTTP or HTTPS port. +[[gjlfm]] +Example 1-11 Running an `asadmin set-log-level` Command -|name a| -In order of precedence: +This example shows code for running an `asadmin set-log-level` command. +Code for creating and starting the server is not shown in this example. +For an example of code for creating and starting the server, see +xref:#gilry[Example 1-4]. -* The `application-name` or `module-name` in the deployment descriptor. -* The name of the archive file without the extension or the directory name. +[source,java] +---- +... +import org.glassfish.embeddable.*; +... + String command = "set-log-level"; + String weblevel = "jakarta.enterprise.system.container.web=FINE"; + CommandRunner commandRunner = glassfish.getCommandRunner(); + CommandResult commandResult = commandRunner.run(command, weblevel); +... +---- -For more information, see "xref:application-deployment-guide.adoc#naming-standards[Naming Standards]" in -{productName} Application Deployment Guide. +For another way to change log levels, see xref:#changing-log-levels-in-embedded-glassfish-server[Changing Log +Levels in Embedded {productName}]. - |(optional) The name of the application. +[[sample-applications]] -|contextRoot |The name of the application. |(optional) The context root -of the application. +=== Sample Applications -|precompileJsp |`false` |(optional) If `true`, JSP pages are precompiled -during deployment. +[[gionq]] +Example 1-12 Using an Existing `domain.xml` File and Deploying an +Application From an Archive File -|dbVendorName |None |(optional) The name of the database vendor for -which tables can be created. Allowed values are `javadb`, `db2`, -`mssql`, `mysql`, `oracle`, `postgresql`, `pointbase`, `derby` (also for -CloudScape), and `sybase`, case-insensitive. +This example shows code for the following: -|createTables |Value of the `create-tables-at-deploy` attribute in -`sun-ejb-jar.xml`. |(optional) If `true`, creates database tables during -deployment for beans that are automatically mapped by the EJB container. +* Using the existing file +`c:\myapp\embeddedserver\domains\domain1\config\domain.xml` and +preserving this file when the application is stopped. +* Deploying an application from the archive file +`c:\samples\simple.war`. -|dropTables |Value of the `drop-tables-at-undeploy` attribute in -`sun-ejb-jar.xml`. a| -(optional) If `true`, and deployment and undeployment occur in the same -JVM session, database tables that were automatically created when the -bean(s) were deployed are dropped when the bean(s) are undeployed. +[source,java] +---- +import java.io.File; +import java.io.BufferedReader; +import org.glassfish.embeddable.*; -If `true`, the name parameter must be specified or tables may not be -dropped. +public class Main { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + File configFile = new File ("c:\\myapp\\embeddedserver\\domains\\domain1\\config\\domain.xml"); + File war = new File("c:\\samples\\simple.war"); + try { + GlassFishRuntime glassfishRuntime = GlassFishRuntime.bootstrap(); + ... + GlassFishProperties glassfishProperties = new GlassFishProperties(); + glassfishProperties.setConfigFileURI(configFile.toURI()); + glassfishProperties.setConfigFileReadOnly(false); + ... + GlassFish glassfish = glassfishRuntime.newGlassFish(glassfishProperties); + glassfish.start(); + + Deployer deployer = glassfish.getDeployer(); + deployer.deploy(war, "--force=true"); + } + catch (Exception e) { + e.printStackTrace(); + } -|autoDelete |`false` a| -(optional) If `true`, deletes the contents of the xref:#instance-root-directory[Instance -Root Directory] when the server is stopped. + System.out.println("Press Enter to stop server"); + // wait for Enter + new BufferedReader(new java.io.InputStreamReader(System.in)).readLine(); + try { + glassfish.dispose(); + glassfishRuntime.shutdown(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +---- -Caution: Do not set `autoDelete` to `true` if you are using -`installRoot` to refer to a preexisting {productName} installation. +[[default-java-persistence-data-source-for-embedded-glassfish-server]] -|=== +== Default Java Persistence Data Source for Embedded {productName} +The `jdbc/__default` Java DB database is preconfigured with Embedded +{productName}. It is used when an application is deployed in Embedded +{productName} that uses Java Persistence but doesn't specify a data +source. Embedded {productName} uses the embedded Java DB database +created in a temporary domain that is destroyed when Embedded {productName} is stopped. You can use a Java DB database configured with +nonembedded {productName} if you explicitly specify the instance root +directory or the configuration file. -[[embedded-glassfishstart-goal]] +By default, weaving is enabled when the {productName} Embedded Server +API is used. To disable weaving, set the +`org.glassfish.persistence.embedded.weaving.enabled` property to +`false`. -==== `embedded-glassfish:start` Goal +[[changing-log-levels-in-embedded-glassfish-server]] -This goal starts the server. You can set the parameters described in the -following table. +== Changing Log Levels in Embedded {productName} -[[gjkye]] +To change log levels in Embedded {productName}, you can follow the +steps in this section or you can use the Embedded Server API as shown in +xref:#gjlfm[Example 1-11]. For more information about {productName} +logging, see "xref:administration-guide.adoc#administering-the-logging-service[Administering the Logging Service]" in +{productName} Administration Guide. -Table 1-6 `embedded-glassfish:start` Parameters +You can change log levels in Embedded {productName} in either of the +following ways: -[width="100%",cols="<17%,<38%,<45%",options="header",] -|=== -|Parameter |Default |Description -|serverID |`maven` |(optional) The ID of the server to start. +* Using the {productName} Embedded Server API +* Creating a custom logging configuration file -|containerType |`all` |(optional) The container to start: `web`, `ejb`, -`jpa`, or `all`. +Both these ways use logger names. For a list of logger names, use the +xref:reference-manual.adoc#list-log-levels[`list-log-levels`] subcommand. -|installRoot |None |(optional) The xref:#installation-root-directory[Installation Root -Directory]. +[[gkrhh]] +Example 1-15 Using the {productName} Embedded Server API -|instanceRoot a| -In order of precedence: +This example shows how to set log levels using the `getLogger` method in +the API. -* `glassfish.embedded.tmpdir` system property value -* `java.io.tmpdir` system property value -* as-install``/domains/domain1`` +[source,java] +---- +import org.glassfish.embeddable.*; - |(optional) The xref:#instance-root-directory[Instance Root Directory] +// Create Embedded GlassFish +GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(); -|configFile |domain-dir`/config/domain.xml` |(optional) The -configuration file. +// Set the log levels. For example, set 'deployment' and 'server' log levels to FINEST +Logger.getLogger("").getHandlers()[0].setLevel(Level.FINEST); +Logger.getLogger("jakarta.enterprise.system.tools.deployment").setLevel(Level.FINEST); +Logger.getLogger("jakarta.enterprise.system").setLevel(Level.FINEST); -|port |None. Must be set explicitly or defined in the configuration -file. |The HTTP or HTTPS port. +// Start Embedded GlassFish and deploy an application. +// You will see all the FINEST logs printed on the console. +glassfish.start(); +glassfish.getDeployer().deploy(new File("sample.war")); -|autoDelete |`false` a| -(optional) If `true`, deletes the contents of the xref:#instance-root-directory[Instance -Root Directory] when the server is stopped. +// Dispose Embedded GlassFish +glassfish.dispose(); +---- -Caution: Do not set `autoDelete` to `true` if you are using -`installRoot` to refer to a preexisting {productName} installation. +[[gkrgw]] +Example 1-16 Creating a Custom Logging Configuration File -|=== +This example shows the contents of a custom logging configuration file, +`customlogging.properties`. +[source] +---- +handlers = java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.level = FINEST +jakarta.enterprise.system.tools.deployment.level = FINEST +jakarta.enterprise.system.level = FINEST +---- -[[embedded-glassfishdeploy-goal]] +Pass the name of this custom logging configuration file to the `java` +command when you invoke Embedded {productName}. For example: -==== `embedded-glassfish:deploy` Goal +[source] +---- +java -Djava.util.logging.config.file=customlogging.properties MyEmbeddedGlassFish +---- -This goal deploys an application. You can redeploy if you change the -application. The application can be a packaged archive or a directory -that contains an exploded application. You can set the parameters -described in the following table. +[[monitoring-embedded-glassfish-server-with-jmx]] -[[gjkvv]] +== Monitoring Embedded {productName} with JMX -Table 1-7 `embedded-glassfish:deploy` Parameters +Embedded {productName} supports monitoring through JMX MBeans, similar to regular {productName} Server. However, you must attache the flashlight agent on command line to enable monitoring functionality. -[width="100%",cols="<18%,<39%,<43%",options="header",] -|=== -|Parameter |Default |Description -|app |None |The archive file or directory for the application to be -deployed. +[IMPORTANT] +==== +AMX (Application Management Extensions) monitoring is only available in `glassfish-embedded-all.jar`. The `glassfish-embedded-web.jar` does not include AMX support, which limits the available monitoring MBeans. +==== -|serverID |`maven` |(optional) The ID of the server to start. +=== Prerequisites -|name a| -In order of precedence: +To enable monitoring in Embedded {productName}, you need the flashlight agent JAR file: -* The `application-name` or `module-name` in the deployment descriptor. -* The name of the archive file without the extension or the directory -name. +* Download from Maven Central: `org.glassfish.main.flashlight:flashlight-agent` +* Or use from an existing {productName} installation: `glassfish/lib/monitor/flashlight-agent.jar` -For more information, see "xref:application-deployment-guide.adoc#naming-standards[Naming Standards]" in -{productName} Application Deployment Guide. +=== Enabling Monitoring Modules - |(optional) The name of the application. +By default, the monitoring service and MBeans support are enabled, but no monitoring modules are active. You can enable specific monitoring modules using one of two methods: -|contextRoot |The name of the application. |(optional) The context root -of the application. +==== Method 1: Command Line -|precompileJsp |`false` |(optional) If `true`, JSP pages are precompiled -during deployment. +Start Embedded {productName} with the `enable-monitoring` command: -|dbVendorName |None |(optional) The name of the database vendor for -which tables can be created. Allowed values are `javadb`, `db2`, -`mssql`, `oracle`, `postgresql`, `pointbase`, `derby` (also for -CloudScape), and `sybase`, case-insensitive. +[source] +---- +java -javaagent:/path/to/flashlight-agent.jar -jar glassfish-embedded-all.jar 'enable-monitoring --modules thread-pool:http-service' +---- -|createTables |Value of the `create-tables-at-deploy` attribute in -`sun-ejb-jar.xml`. |(optional) If `true`, creates database tables during -deployment for beans that are automatically mapped by the EJB container. -|=== +==== Method 2: Properties File +Create a `glassfish.properties` file in the current directory with monitoring configuration: -[[embedded-glassfishundeploy-goal]] +[source] +---- +configs.config.server-config.monitoring-service.module-monitoring-levels.thread-pool=HIGH +configs.config.server-config.monitoring-service.module-monitoring-levels.http-service=HIGH +---- -==== `embedded-glassfish:undeploy` Goal +Then start Embedded {productName}: +[source] +---- +java -javaagent:/path/to/flashlight-agent.jar -jar glassfish-embedded-all.jar +---- -[NOTE] -==== -If you reference a nonembedded {productName} installation using the -`glassfish-embedded-static-shell.jar` file and do not undeploy your -applications in the same server life cycle in which you deployed them, -expanded archives for these applications remain under the -domain-dir``/applications`` directory. -==== +=== Accessing Monitoring Data +Once monitoring modules are enabled, you can access monitoring data through JMX clients such as VisualVM or JConsole. -This goal undeploys an application. You can set the parameters described -in the following table. +==== Using VisualVM -[[gjkxf]] +1. Connect to the Embedded {productName} process in VisualVM +2. Install the MBeans extension if not already available +3. Navigate to the MBeans tab +4. Execute the `bootAMX` operation first (this is required, same as with regular {productName} Server) +5. Monitoring data will be available under the `amx` node, in nodes that end with `-mon`, such as `thread-pool-mon` or `request-mon` -Table 1-8 `embedded-glassfish:undeploy` Parameters +==== Exposing JMX on a Specific Port -[width="100%",cols="<14%,<34%,<52%",options="header",] -|=== -|Parameter |Default |Description -|name |If the name is omitted, all applications are undeployed. |The -name of the application. +To allow remote JMX connections, you can expose the JMX server on a specific port by adding JVM system properties: -|serverID |`maven` |(optional) The ID of the server to start. +[source] +---- +java -javaagent:/path/to/flashlight-agent.jar \ + -Dcom.sun.management.jmxremote \ + -Dcom.sun.management.jmxremote.port=8686 \ + -Dcom.sun.management.jmxremote.authenticate=false \ + -Dcom.sun.management.jmxremote.ssl=false \ + -jar glassfish-embedded-all.jar 'enable-monitoring --modules thread-pool:http-service' +---- -|dropTables |Value of the `drop-tables-at-undeploy` attribute in -`sun-ejb-jar.xml`. a| -(optional) If `true`, and deployment and undeployment occur in the same -JVM session, database tables that were automatically created when the -bean(s) were deployed are dropped when the bean(s) are undeployed. +[WARNING] +==== +Exposing JMX without authentication and SSL is not secure and should only be used in development environments. JMX MBeans include management beans that allow executing administrative operations on {productName}, which could be exploited by unauthorized users. In production environments, always enable authentication and SSL for JMX connections. +==== -If `true`, the name parameter must be specified or tables may not be -dropped. +==== Available Monitoring Modules -|cascade |`false` a| -(optional) If `true`, deletes all connection pools and connector -resources associated with the resource adapter being undeployed. +Embedded {productName} supports the same monitoring modules as regular {productName} Server, including: -If `false`, undeployment fails if any pools or resources are still -associated with the resource adapter. +* `thread-pool` - Thread pool statistics +* `http-service` - HTTP service metrics +* `web-container` - Web container statistics +* `ejb-container` - EJB container metrics +* `transaction-service` - Transaction service data +* `jvm` - JVM statistics -This attribute is applicable to connectors (resource adapters) and -applications with connector modules. +For comprehensive information about available monitoring modules and their metrics, see xref:administration-guide.adoc#administering-the-monitoring-service[Administering the Monitoring Service] in the {productName} Administration Guide. -|=== +[[embedded-glassfish-server-file-system]] +== Embedded {productName} File System -[[embedded-glassfishstop-goal]] +The following Embedded {productName} directories and files are +important if you are referencing a nonembedded installation of {productName}: -==== `embedded-glassfish:stop` Goal +* xref:#installation-root-directory[Installation Root Directory] +* xref:#instance-root-directory[Instance Root Directory] +* xref:#GSESG00056[The `domain.xml` File] -This goal stops the server. You can set the parameters described in the -following table. +[[installation-root-directory]] -[[gjkwm]] +=== Installation Root Directory -Table 1-9 `embedded-glassfish:stop` Parameters +The installation root directory, represented as as-install, is the +parent of the directory that embedded {productName} uses for +configuration files. This directory corresponds to the base directory +for an installation of {productName}. Configuration files are +contained in the following directories in the base directory for an +installation of {productName}: -[width="100%",cols="<16%,<17%,<67%",options="header",] -|=== -|Parameter |Default |Description -|serverID |`maven` |(optional) The ID of the server to stop. -|=== +* `domains` +* `lib` +Specify the installation root directory only if you have a valid +nonembedded {productName} installation and are using +`glassfish-embedded-static-shell.jar`. -[[embedded-glassfishadmin-goal]] +[[instance-root-directory]] -==== `embedded-glassfish:admin` Goal +=== Instance Root Directory -This goal runs a {productName} administration command. You must use -either the command and commandParameters parameters in combination or -the commandLine parameter. For more information about administration -commands, see the xref:reference-manual.adoc#GSRFM[{productName} -Reference Manual]. You can set the parameters described in the following -table. +The instance root directory, also known as the domain directory, represented as domain-dir, is the parent +directory of a server instance directory. Embedded {productName} uses the server instance directory for domain +configuration files. -[[gjkwe]] +[NOTE] +==== +If you have valid custom as-install and domain-dir +directories, specify both in the `BootstrapProperties` and +`GlassFishProperties` classes respectively as described in +xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}]. +==== -Table 1-10 `embedded-glassfish:start` Parameters -[width="100%",cols="<24%,<10%,<66%",options="header",] -|=== -|Parameter |Default |Description -|serverID |`maven` |(optional) The ID of the server on which to run the -command. +If domain-dir is not specified, {productName} creates a directory +named ``gfembed``random-number``tmp`` in a temporary directory, where +random-number is a randomly generated 19-digit number. {productName} +then copies configuration files into this directory. The temporary +directory is the value of the system property `java.io.tmpdir`. You can +override this value by specifying the `glassfish.embedded.tmpdir` +property in the `GlassFishProperties` class or as a system property. -|command |None |The name of the command, for example -`createJdbcResource`. +[[GSESG00056]][[the-domain.xml-file]] -|commandParameters |None |A map of the command parameters. See the -`org.glassfish.embeddable.admin.CommandParameters` class at -`https://www.javadoc.io/doc/org.glassfish.main.common/glassfish-api/latest/org/glassfish/api/admin/CommandParameters.html`. +=== The `domain.xml` File -|commandLine |None |The full `asadmin` syntax of the command. -|=== +Using an existing `domain.xml` file avoids the need to configure +embedded {productName} programmatically in your application. Your +application obtains domain configuration data from an existing +`domain.xml` file. You can create this file by using the administrative +interfaces of an installation of nonembedded {productName}. To +specify an existing `domain.xml` file, invoke the `setConfigFileURI` +method of the `GlassFishProperties` class as described in +xref:#creating-and-configuring-an-embedded-glassfish-server[Creating and Configuring an Embedded {productName}]. +[NOTE] +==== +The built-in `domain.xml` file used by default by Embedded {productName} can be found in the Embedded {productName} JAR files, in path +`org/glassfish/embed/domain.xml`. You can customize this +file and pass it in using the `setConfigFileURI` method while creating +an Embedded {productName}. +==== + [[GSESG00039]][[using-the-ejb-3.1-embeddable-api-with-embedded-glassfish-server]] == Using the EJB 3.1 Embeddable API with Embedded {productName} @@ -1994,189 +2173,17 @@ If you are using `glassfish-embedded-all.jar`, you can omit the Then run `mvn clean verify` command. -[[changing-log-levels-in-embedded-glassfish-server]] - -== Changing Log Levels in Embedded {productName} - -To change log levels in Embedded {productName}, you can follow the -steps in this section or you can use the Embedded Server API as shown in -xref:#gjlfm[Example 1-11]. For more information about {productName} -logging, see "xref:administration-guide.adoc#administering-the-logging-service[Administering the Logging Service]" in -{productName} Administration Guide. - -You can change log levels in Embedded {productName} in either of the -following ways: - -* Using the {productName} Embedded Server API -* Creating a custom logging configuration file - -Both these ways use logger names. For a list of logger names, use the -xref:reference-manual.adoc#list-log-levels[`list-log-levels`] subcommand. - -[[gkrhh]] -Example 1-15 Using the {productName} Embedded Server API - -This example shows how to set log levels using the `getLogger` method in -the API. - -[source,java] ----- -import org.glassfish.embeddable.*; - -// Create Embedded GlassFish -GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(); - -// Set the log levels. For example, set 'deployment' and 'server' log levels to FINEST -Logger.getLogger("").getHandlers()[0].setLevel(Level.FINEST); -Logger.getLogger("jakarta.enterprise.system.tools.deployment").setLevel(Level.FINEST); -Logger.getLogger("jakarta.enterprise.system").setLevel(Level.FINEST); - -// Start Embedded GlassFish and deploy an application. -// You will see all the FINEST logs printed on the console. -glassfish.start(); -glassfish.getDeployer().deploy(new File("sample.war")); - -// Dispose Embedded GlassFish -glassfish.dispose(); ----- - -[[gkrgw]] -Example 1-16 Creating a Custom Logging Configuration File - -This example shows the contents of a custom logging configuration file, -`customlogging.properties`. - -[source] ----- -handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = FINEST -jakarta.enterprise.system.tools.deployment.level = FINEST -jakarta.enterprise.system.level = FINEST ----- - -Pass the name of this custom logging configuration file to the `java` -command when you invoke Embedded {productName}. For example: - -[source] ----- -java -Djava.util.logging.config.file=customlogging.properties MyEmbeddedGlassFish ----- - -[[monitoring-embedded-glassfish-server-with-jmx]] - -== Monitoring Embedded {productName} with JMX - -Embedded {productName} supports monitoring through JMX MBeans, similar to regular {productName} Server. However, you must attache the flashlight agent on command line to enable monitoring functionality. - -[IMPORTANT] -==== -AMX (Application Management Extensions) monitoring is only available in `glassfish-embedded-all.jar`. The `glassfish-embedded-web.jar` does not include AMX support, which limits the available monitoring MBeans. -==== - -=== Prerequisites - -To enable monitoring in Embedded {productName}, you need the flashlight agent JAR file: - -* Download from Maven Central: `org.glassfish.main.flashlight:flashlight-agent` -* Or use from an existing {productName} installation: `glassfish/lib/monitor/flashlight-agent.jar` - -=== Enabling Monitoring Modules - -By default, the monitoring service and MBeans support are enabled, but no monitoring modules are active. You can enable specific monitoring modules using one of two methods: - -==== Method 1: Command Line - -Start Embedded {productName} with the `enable-monitoring` command: - -[source] ----- -java -javaagent:/path/to/flashlight-agent.jar -jar glassfish-embedded-all.jar 'enable-monitoring --modules thread-pool:http-service' ----- - -==== Method 2: Properties File - -Create a `glassfish.properties` file in the current directory with monitoring configuration: - -[source] ----- -configs.config.server-config.monitoring-service.module-monitoring-levels.thread-pool=HIGH -configs.config.server-config.monitoring-service.module-monitoring-levels.http-service=HIGH ----- - -Then start Embedded {productName}: - -[source] ----- -java -javaagent:/path/to/flashlight-agent.jar -jar glassfish-embedded-all.jar ----- - -=== Accessing Monitoring Data - -Once monitoring modules are enabled, you can access monitoring data through JMX clients such as VisualVM or JConsole. - -==== Using VisualVM - -1. Connect to the Embedded {productName} process in VisualVM -2. Install the MBeans extension if not already available -3. Navigate to the MBeans tab -4. Execute the `bootAMX` operation first (this is required, same as with regular {productName} Server) -5. Monitoring data will be available under the `amx` node, in nodes that end with `-mon`, such as `thread-pool-mon` or `request-mon` - -==== Exposing JMX on a Specific Port - -To allow remote JMX connections, you can expose the JMX server on a specific port by adding JVM system properties: - -[source] ----- -java -javaagent:/path/to/flashlight-agent.jar \ - -Dcom.sun.management.jmxremote \ - -Dcom.sun.management.jmxremote.port=8686 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=false \ - -jar glassfish-embedded-all.jar 'enable-monitoring --modules thread-pool:http-service' ----- - -[WARNING] -==== -Exposing JMX without authentication and SSL is not secure and should only be used in development environments. JMX MBeans include management beans that allow executing administrative operations on {productName}, which could be exploited by unauthorized users. In production environments, always enable authentication and SSL for JMX connections. -==== - -==== Available Monitoring Modules - -Embedded {productName} supports the same monitoring modules as regular {productName} Server, including: - -* `thread-pool` - Thread pool statistics -* `http-service` - HTTP service metrics -* `web-container` - Web container statistics -* `ejb-container` - EJB container metrics -* `transaction-service` - Transaction service data -* `jvm` - JVM statistics - -For comprehensive information about available monitoring modules and their metrics, see xref:administration-guide.adoc#administering-the-monitoring-service[Administering the Monitoring Service] in the {productName} Administration Guide. - -[[default-java-persistence-data-source-for-embedded-glassfish-server]] - -== Default Java Persistence Data Source for Embedded {productName} - -The `jdbc/__default` Java DB database is preconfigured with Embedded -{productName}. It is used when an application is deployed in Embedded -{productName} that uses Java Persistence but doesn't specify a data -source. Embedded {productName} uses the embedded Java DB database -created in a temporary domain that is destroyed when Embedded {productName} is stopped. You can use a Java DB database configured with -nonembedded {productName} if you explicitly specify the instance root -directory or the configuration file. - -By default, weaving is enabled when the {productName} Embedded Server -API is used. To disable weaving, set the -`org.glassfish.persistence.embedded.weaving.enabled` property to -`false`. - [[restrictions-for-embedded-glassfish-server]] == Restrictions for Embedded {productName} -The `glassfish-embedded-web.jar` file for embedded {productName} -supports only these features of nonembedded {productName}: +Embedded {productName} is intentionally designed as a lighter runtime +suitable for cloud deployments, containerized environments, and +self-contained applications. The following describes the scope of each +JAR variant. + +The `glassfish-embedded-web.jar` file provides a focused web runtime +that includes: * The following web technologies of the Jakarta EE platform: @@ -2192,7 +2199,7 @@ supports only these features of nonembedded {productName}: The `glassfish-embedded-all.jar` and `glassfish-embedded-static-shell.jar` files support all features of -nonembedded {productName} with these exceptions: +nonembedded {productName} with these exceptions that are intentionally not included to keep it lighter than {productName} Server : * Installers * Administration Console diff --git a/docs/embedded-server-guide/src/main/asciidoc/preface.adoc b/docs/embedded-server-guide/src/main/asciidoc/preface.adoc index 072100e7b8b..7956d36adea 100644 --- a/docs/embedded-server-guide/src/main/asciidoc/preface.adoc +++ b/docs/embedded-server-guide/src/main/asciidoc/preface.adoc @@ -10,23 +10,11 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== - -This document explains how to run applications in embedded +This document explains how to run applications with Embedded {productName} and to develop applications in which {productName} is embedded. This document is for software developers -who are developing applications to run in embedded {productName}. +who are developing applications to run with Embedded {productName}, +whether for production deployments, cloud environments, or testing. The ability to program in the Java language is assumed. This preface contains information about and conventions for the entire @@ -52,20 +40,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -81,50 +97,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -150,10 +166,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -323,4 +335,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/embedded-server-guide/src/main/asciidoc/title.adoc b/docs/embedded-server-guide/src/main/asciidoc/title.adoc index 65f665c3cac..c8219a77aca 100644 --- a/docs/embedded-server-guide/src/main/asciidoc/title.adoc +++ b/docs/embedded-server-guide/src/main/asciidoc/title.adoc @@ -21,13 +21,11 @@ This document explains how to run applications in embedded {productName} and to who are developing applications to run in embedded {productName}. The ability to program in the Java language is assumed. -Note: The main thrust of the {productName} {product-majorVersion} -release is to provide an application server for developers to explore -and begin exploiting the new and updated technologies in the Jakarta EE 10 -platform. Thus, the embedded server feature of {productName} was not -a focus of this release. This feature is included in the release, but it -may not function properly with some of the new features added in support -of the Jakarta EE 10 platform. +Note: Since {productName} 7.1.0, Embedded {productName} is a fully supported +and actively maintained feature, covered by the internal test suite. +Running applications from the command line using the Embedded {productName} JAR +is the recommended approach and is suitable for production deployments, +including cloud environments. Embedding Embedded GlassFish into Java applications or using for testing purposes is also supported. [[sthref1]] diff --git a/docs/error-messages-reference/src/main/asciidoc/error-messages.adoc b/docs/error-messages-reference/src/main/asciidoc/error-messages.adoc index 3e3837ee2a8..a03aaf13f88 100644 --- a/docs/error-messages-reference/src/main/asciidoc/error-messages.adoc +++ b/docs/error-messages-reference/src/main/asciidoc/error-messages.adoc @@ -23,7 +23,7 @@ Viewer. For more information about logging, see xref:administration-guide.adoc#administering-the-logging-service[Administering the Logging Service] in {productName} Administration Guide. For additional troubleshooting information, see the -xref:troubleshooting-guide.adoc#GSTSG[{productName} Troubleshooting Guide]. +xref:troubleshooting-guide.adoc#GSTSG[{productName} Server Troubleshooting Guide]. Error messages in this chapter are listed in alphabetic and numeric order by message ID. The text is as it appears in the actual error diff --git a/docs/error-messages-reference/src/main/asciidoc/preface.adoc b/docs/error-messages-reference/src/main/asciidoc/preface.adoc index 6e4baf465dd..eb37f9e57f9 100644 --- a/docs/error-messages-reference/src/main/asciidoc/preface.adoc +++ b/docs/error-messages-reference/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== This document describes error messages that you might encounter when using {productName}. @@ -49,20 +37,48 @@ The following topics are addressed here: === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -78,50 +94,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -147,8 +163,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - [[related-documentation]] === Related Documentation diff --git a/docs/ha-administration-guide/src/main/asciidoc/preface.adoc b/docs/ha-administration-guide/src/main/asciidoc/preface.adoc index 3e5da04b3fa..bacc9e874ae 100644 --- a/docs/ha-administration-guide/src/main/asciidoc/preface.adoc +++ b/docs/ha-administration-guide/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== This book describes the high-availability features in {productName}, including converged load balancing, HTTP load balancing, clusters, @@ -42,101 +30,132 @@ between Oracle engineers and the community. [[oracle-glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] |Explains how to get started with the -{productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. -|xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software -and its components. +|xref:installation-guide.adoc#GSING[Installation Guide] +|Explains how to install the software and its components. -|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] |Explains how to upgrade to the latest -version of {productName}. This guide also describes differences -between adjacent product releases and configuration options that can -result in incompatibility with the product specifications. +|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] +|Explains how to upgrade to the latest version of {productName}. +This guide also describes differences between adjacent product releases and configuration +options that can result in incompatibility with the product specifications. -|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] |Explains how to build a -production deployment of {productName} that meets the requirements of +|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] +|Explains how to build a production deployment of {productName} that meets the requirements of your system and enterprise. -|xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, -and manage {productName} subsystems and components from the command -line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for -performing these tasks from the Administration Console are provided in -the Administration Console online help. +|xref:administration-guide.adoc#GSADG[Administration Guide] +|Explains how to configure, monitor, and manage {productName} subsystems and components +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. +Instructions for performing these tasks from the Administration Console are provided +in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] |Provides instructions for configuring and -administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. -|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and -deploy applications to the {productName} and provides information +|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] +|Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] |Explains how to create and -implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. These -applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). This guide provides -information about developer tools, security, and debugging. +|xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] +|Explains how to use published interfaces of {productName} to develop add-on components +for {productName}. +This document explains how to perform only those tasks that ensure that the add-on component +is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] |Explains how to run applications in -embedded {productName} and to develop applications in which {productName} is embedded. - -|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to -configure {productName} to provide higher availability and +|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] +|Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] |Explains how to optimize the -performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] |Describes common problems that you -might encounter when using {productName} and explains how to solve -them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] |Describes error messages that you -might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] |Provides reference information in man -page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== -|link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, -compatibility issues, and existing bugs for Open Message Queue. +==== Eclipse Open MQ Documentation -|link:{mq-tech-over-url}[Message Queue Technical Overview] |Provides an introduction -to the technology, concepts, architecture, capabilities, and features of +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|link:{mq-release-notes-url}[Message Queue Release Notes] +|Describes new features, compatibility issues, and existing bugs for Open Message Queue. + +|link:{mq-tech-over-url}[Message Queue Technical Overview] +|Provides an introduction to the technology, concepts, architecture, capabilities, and features of the Message Queue messaging service. -|link:{mq-admin-guide-url}[Message Queue Administration Guide] |Explains how to set up -and manage a Message Queue messaging system. +|link:{mq-admin-guide-url}[Message Queue Administration Guide] +|Explains how to set up and manage a Message Queue messaging system. -|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] |Describes -the application programming interface in Message Queue for +|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] +|Describes the application programming interface in Message Queue for programmatically configuring and monitoring Message Queue resources in conformance with the Java Management Extensions (JMX). -|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] |Provides -information about concepts and procedures for developing Java messaging +|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] +|Provides information about concepts and procedures for developing Java messaging applications (Java clients) that work with {productName}. -|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] |Provides -programming and reference information for developers working with +|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] +|Provides programming and reference information for developers working with Message Queue who want to use the C language binding to the Message -Queue messaging service to send, receive, and process Message Queue -messages. +Queue messaging service to send, receive, and process Message Queue messages. |=== - - [[typographic-conventions]] === Typographic Conventions diff --git a/docs/installation-guide/src/main/asciidoc/installing.adoc b/docs/installation-guide/src/main/asciidoc/installing.adoc index 25b7d8bb17c..74b85f823a0 100644 --- a/docs/installation-guide/src/main/asciidoc/installing.adoc +++ b/docs/installation-guide/src/main/asciidoc/installing.adoc @@ -744,8 +744,8 @@ Unzip using your favorite file compression utility. under your current directory. This `glassfish{product-majorVersion}` directory is referred to throughout the {productName} documentation set as as-install-parent. -4. Start {productName} using the instructions in the -xref:quick-start-guide.adoc#GSQSG[{productName} Quick Start Guide]. +4. Start {productName} Server using the instructions in the +xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide]. + The guide explains how to perform basic tasks such as starting the server, accessing the Administration Console, and deploying a sample application. diff --git a/docs/installation-guide/src/main/asciidoc/preface.adoc b/docs/installation-guide/src/main/asciidoc/preface.adoc index 1b0a7f4ab55..37e196fdfbd 100644 --- a/docs/installation-guide/src/main/asciidoc/preface.adoc +++ b/docs/installation-guide/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== This document contains instructions for installing and uninstalling {productName}. @@ -49,20 +37,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -78,50 +94,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -147,10 +163,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -320,4 +332,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/performance-tuning-guide/src/main/asciidoc/overview.adoc b/docs/performance-tuning-guide/src/main/asciidoc/overview.adoc index 276ac9f3ad8..148e80fddfc 100644 --- a/docs/performance-tuning-guide/src/main/asciidoc/overview.adoc +++ b/docs/performance-tuning-guide/src/main/asciidoc/overview.adoc @@ -180,7 +180,7 @@ already use a directory server may find it advantageous to leverage investment in Solaris security infrastructure. For more information on security realms, see -"xref:security-guide.adoc#administering-authentication-realms[Administering Authentication Realms]" in {productName} Security Guide. +"xref:security-guide.adoc#administering-authentication-realms[Administering Authentication Realms]" in {productName} Server Security Guide. The type of authentication mechanism chosen may require additional hardware for the deployment. Typically a directory server executes on a @@ -250,7 +250,7 @@ choices? For information on how to encrypt the communication between web servers and {productName}, see "xref:security-guide.adoc#administering-message-security[Administering Message -Security]" in {productName} Security Guide. +Security]" in {productName} Server Security Guide. [[high-availability-clustering-load-balancing-and-failover]] diff --git a/docs/performance-tuning-guide/src/main/asciidoc/preface.adoc b/docs/performance-tuning-guide/src/main/asciidoc/preface.adoc index ae63e990dd8..1dcad798f70 100644 --- a/docs/performance-tuning-guide/src/main/asciidoc/preface.adoc +++ b/docs/performance-tuning-guide/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== The Performance Tuning Guide describes how to get the best performance with {productName} {product-majorVersion}. @@ -39,97 +27,133 @@ between Oracle engineers and the community. [[oracle-glassfish-server-documentation-set]] === {productName} Documentation Set +\ +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] |Explains how to get started with the -{productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. -|xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software -and its components. +|xref:installation-guide.adoc#GSING[Installation Guide] +|Explains how to install the software and its components. -|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] |Explains how to upgrade to the latest -version of {productName}. This guide also describes differences -between adjacent product releases and configuration options that can -result in incompatibility with the product specifications. +|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] +|Explains how to upgrade to the latest version of {productName}. +This guide also describes differences between adjacent product releases and configuration +options that can result in incompatibility with the product specifications. -|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] |Explains how to build a -production deployment of {productName} that meets the requirements of +|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] +|Explains how to build a production deployment of {productName} that meets the requirements of your system and enterprise. -|xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, -and manage {productName} subsystems and components from the command -line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for -performing these tasks from the Administration Console are provided in -the Administration Console online help. +|xref:administration-guide.adoc#GSADG[Administration Guide] +|Explains how to configure, monitor, and manage {productName} subsystems and components +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. +Instructions for performing these tasks from the Administration Console are provided +in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] |Provides instructions for configuring and -administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. -|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and -deploy applications to the {productName} and provides information +|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] +|Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] |Explains how to create and -implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. These -applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). This guide provides -information about developer tools, security, and debugging. +|xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] +|Explains how to use published interfaces of {productName} to develop add-on components +for {productName}. +This document explains how to perform only those tasks that ensure that the add-on component +is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] |Explains how to run applications in -embedded {productName} and to develop applications in which {productName} is embedded. - -|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to -configure {productName} to provide higher availability and +|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] +|Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] |Explains how to optimize the -performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] |Describes common problems that you -might encounter when using {productName} and explains how to solve -them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] |Describes error messages that you -might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] |Provides reference information in man -page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== -|link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, -compatibility issues, and existing bugs for Open Message Queue. +==== Eclipse Open MQ Documentation -|link:{mq-tech-over-url}[Message Queue Technical Overview] |Provides an introduction -to the technology, concepts, architecture, capabilities, and features of +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|link:{mq-release-notes-url}[Message Queue Release Notes] +|Describes new features, compatibility issues, and existing bugs for Open Message Queue. + +|link:{mq-tech-over-url}[Message Queue Technical Overview] +|Provides an introduction to the technology, concepts, architecture, capabilities, and features of the Message Queue messaging service. -|link:{mq-admin-guide-url}[Message Queue Administration Guide] |Explains how to set up -and manage a Message Queue messaging system. +|link:{mq-admin-guide-url}[Message Queue Administration Guide] +|Explains how to set up and manage a Message Queue messaging system. -|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] |Describes -the application programming interface in Message Queue for +|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] +|Describes the application programming interface in Message Queue for programmatically configuring and monitoring Message Queue resources in conformance with the Java Management Extensions (JMX). -|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] |Provides -information about concepts and procedures for developing Java messaging +|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] +|Provides information about concepts and procedures for developing Java messaging applications (Java clients) that work with {productName}. -|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] |Provides -programming and reference information for developers working with +|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] +|Provides programming and reference information for developers working with Message Queue who want to use the C language binding to the Message -Queue messaging service to send, receive, and process Message Queue -messages. +Queue messaging service to send, receive, and process Message Queue messages. |=== - - [[typographic-conventions]] === Typographic Conventions diff --git a/docs/performance-tuning-guide/src/main/asciidoc/tuning-apps.adoc b/docs/performance-tuning-guide/src/main/asciidoc/tuning-apps.adoc index ef0e1082297..c484bb79245 100644 --- a/docs/performance-tuning-guide/src/main/asciidoc/tuning-apps.adoc +++ b/docs/performance-tuning-guide/src/main/asciidoc/tuning-apps.adoc @@ -605,7 +605,7 @@ If you have a legacy rich-client application that directly uses the CosNaming service (not a recommended configuration), then you must generate the stubs for your application explicitly using RMIC. For more information, see the xref:troubleshooting-guide.adoc#GSTSG[{productName} -Troubleshooting Guide] for more details. +Server Troubleshooting Guide] for more details. [[remove-unneeded-stateful-session-beans]] diff --git a/docs/quick-start-guide/src/main/asciidoc/preface.adoc b/docs/quick-start-guide/src/main/asciidoc/preface.adoc index 080aaabf245..009214d655e 100644 --- a/docs/quick-start-guide/src/main/asciidoc/preface.adoc +++ b/docs/quick-start-guide/src/main/asciidoc/preface.adoc @@ -11,18 +11,6 @@ prev=title.html == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== This book demonstrates key features of the {productName} product and enables you to quickly learn the basics. Step-by-step procedures @@ -53,103 +41,132 @@ The following topics are addressed here: === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. -[width="100%",cols="30%,70%",options="header",] +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] |Explains how to get started with the -{productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. -|xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software -and its components. +|xref:installation-guide.adoc#GSING[Installation Guide] +|Explains how to install the software and its components. -|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] |Explains how to upgrade to the latest -version of {productName}. This guide also describes differences -between adjacent product releases and configuration options that can -result in incompatibility with the product specifications. +|xref:upgrade-guide.adoc#GSUPG[Upgrade Guide] +|Explains how to upgrade to the latest version of {productName}. +This guide also describes differences between adjacent product releases and configuration +options that can result in incompatibility with the product specifications. -|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] |Explains how to build a -production deployment of {productName} that meets the requirements of +|xref:deployment-planning-guide.adoc#GSPLG[Deployment Planning Guide] +|Explains how to build a production deployment of {productName} that meets the requirements of your system and enterprise. -|xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, -and manage {productName} subsystems and components from the command -line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for -performing these tasks from the Administration Console are provided in -the Administration Console online help. +|xref:administration-guide.adoc#GSADG[Administration Guide] +|Explains how to configure, monitor, and manage {productName} subsystems and components +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. +Instructions for performing these tasks from the Administration Console are provided +in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] |Provides instructions for configuring and -administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. -|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and -deploy applications to the {productName} and provides information +|xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] +|Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] |Explains how to create and -implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. These -applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). This guide provides -information about developer tools, security, and debugging. +|xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] +|Explains how to use published interfaces of {productName} to develop add-on components +for {productName}. +This document explains how to perform only those tasks that ensure that the add-on component +is suitable for {productName}. -| | +|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] +|Explains how to configure {productName} to provide higher availability and +scalability through failover and load balancing. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] |Explains how to run applications in -embedded {productName} and to develop applications in which {productName} is embedded. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to -configure {productName} to provide higher availability and -scalability through failover and load balancing. +==== Embedded {productName} Guides -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] |Explains how to optimize the -performance of {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] |Describes common problems that you -might encounter when using {productName} and explains how to solve -them. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] |Describes error messages that you -might encounter when using {productName}. +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== -|xref:reference-manual.adoc#GSRFM[Reference Manual] |Provides reference information in man -page format for {productName} administration commands, utility -commands, and related concepts. +==== Eclipse Open MQ Documentation -|link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, -compatibility issues, and existing bugs for Open Message Queue. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|link:{mq-release-notes-url}[Message Queue Release Notes] +|Describes new features, compatibility issues, and existing bugs for Open Message Queue. -|link:{mq-tech-over-url}[Message Queue Technical Overview] |Provides an introduction -to the technology, concepts, architecture, capabilities, and features of +|link:{mq-tech-over-url}[Message Queue Technical Overview] +|Provides an introduction to the technology, concepts, architecture, capabilities, and features of the Message Queue messaging service. -|link:{mq-admin-guide-url}[Message Queue Administration Guide] |Explains how to set up -and manage a Message Queue messaging system. +|link:{mq-admin-guide-url}[Message Queue Administration Guide] +|Explains how to set up and manage a Message Queue messaging system. -|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] |Describes -the application programming interface in Message Queue for +|link:{mq-dev-guide-jmx-url}[Message Queue Developer's Guide for JMX Clients] +|Describes the application programming interface in Message Queue for programmatically configuring and monitoring Message Queue resources in conformance with the Java Management Extensions (JMX). -|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] |Provides -information about concepts and procedures for developing Java messaging +|link:{mq-dev-guide-java-url}[Message Queue Developer's Guide for Java Clients] +|Provides information about concepts and procedures for developing Java messaging applications (Java clients) that work with {productName}. -|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] |Provides -programming and reference information for developers working with +|link:{mq-dev-guide-c-url}[Message Queue Developer's Guide for C Clients] +|Provides programming and reference information for developers working with Message Queue who want to use the C language binding to the Message -Queue messaging service to send, receive, and process Message Queue -messages. +Queue messaging service to send, receive, and process Message Queue messages. |=== - - [[typographic-conventions]] === Typographic Conventions @@ -216,4 +233,3 @@ Control key, release it, and then press the subsequent keys. New > Templates |From the File menu, choose New. From the New submenu, choose Templates. |=== - diff --git a/docs/quick-start-guide/src/main/asciidoc/title.adoc b/docs/quick-start-guide/src/main/asciidoc/title.adoc index d08f6441291..c7eb676fb78 100644 --- a/docs/quick-start-guide/src/main/asciidoc/title.adoc +++ b/docs/quick-start-guide/src/main/asciidoc/title.adoc @@ -1,16 +1,16 @@ type=page status=published -title={productName} Quick Start Guide, Release {product-majorVersion} +title={productName} Server Quick Start Guide, Release {product-majorVersion} next=preface.html prev=toc.html ~~~~~~ -= {productName} Quick Start Guide, Release {product-majorVersion} += {productName} Server Quick Start Guide, Release {product-majorVersion} [[eclipse-glassfish-server]] == {productName} -Quick Start Guide +Server Quick Start Guide Release {product-majorVersion} @@ -18,14 +18,14 @@ Contributed 2018 - 2026 This book demonstrates key features of the {productName} product and enables you to quickly learn the basics. Step-by-step procedures -introduce you to product features and {productName} {product-majorVersion} Quick Start Guide {productName} {product-majorVersion} -Quick Start Guide you to use them immediately. +introduce you to product features and {productName} {product-majorVersion} Server Quick Start Guide {productName} {product-majorVersion} +Server Quick Start Guide you to use them immediately. [[sthref1]] ''''' -{productName} Quick Start Guide, Release {product-majorVersion} +{productName} Server Quick Start Guide, Release {product-majorVersion} Copyright (c) 2025 Contributors to the Eclipse Foundation. All rights reserved. diff --git a/docs/reference-manual/src/main/asciidoc/create-auth-realm.adoc b/docs/reference-manual/src/main/asciidoc/create-auth-realm.adoc index f0591e64573..2a32f3ad77d 100644 --- a/docs/reference-manual/src/main/asciidoc/create-auth-realm.adoc +++ b/docs/reference-manual/src/main/asciidoc/create-auth-realm.adoc @@ -92,7 +92,7 @@ asadmin-options:: an implementation of the javax.security.auth.spi.LoginModule interface, and then plug the module into a `jaas-context`. For more information, see "xref:security-guide.adoc#custom-authentication-of-client-certificate-in-ssl-mutual-authentication[Custom Authentication of Client - Certificate in SSL Mutual Authentication]" in {productName} Security Guide. + Certificate in SSL Mutual Authentication]" in {productName} Server Security Guide. * You can specify the following properties for `JDBCRealm`: diff --git a/docs/reference-manual/src/main/asciidoc/preface.adoc b/docs/reference-manual/src/main/asciidoc/preface.adoc index a28a56f1679..4005c3b5b3b 100644 --- a/docs/reference-manual/src/main/asciidoc/preface.adoc +++ b/docs/reference-manual/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== Both novice users and those familiar with {productName} can use online man pages to obtain information about the product and its features. A man page is intended to answer concisely the diff --git a/docs/release-notes/src/main/asciidoc/preface.adoc b/docs/release-notes/src/main/asciidoc/preface.adoc index d43adb0ff77..5e984038912 100644 --- a/docs/release-notes/src/main/asciidoc/preface.adoc +++ b/docs/release-notes/src/main/asciidoc/preface.adoc @@ -35,20 +35,48 @@ The following topics are addressed here: === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -64,50 +92,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -133,8 +161,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - [[related-documentation]] === Related Documentation @@ -308,4 +334,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/security-guide/src/main/asciidoc/preface.adoc b/docs/security-guide/src/main/asciidoc/preface.adoc index 61298b3c4e6..6b65f3991f9 100644 --- a/docs/security-guide/src/main/asciidoc/preface.adoc +++ b/docs/security-guide/src/main/asciidoc/preface.adoc @@ -11,20 +11,8 @@ prev=title.html == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== - -The {productName} Security Guide provides + +The {productName} Server Security Guide provides instructions for configuring and administering {productName} security. This preface contains information about and conventions for the entire @@ -51,20 +39,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -80,50 +96,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -149,10 +165,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -323,4 +335,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/security-guide/src/main/asciidoc/title.adoc b/docs/security-guide/src/main/asciidoc/title.adoc index 5a580d07ac6..f7dff242bf8 100644 --- a/docs/security-guide/src/main/asciidoc/title.adoc +++ b/docs/security-guide/src/main/asciidoc/title.adoc @@ -1,29 +1,29 @@ type=page status=published -title={productName} Security Guide, Release 8 +title={productName} Server Security Guide, Release 8 next=preface.html prev=lot.html ~~~~~~ -= {productName} Security Guide, Release 8 += {productName} Server Security Guide, Release 8 [[eclipse-glassfish-server]] == {productName} -Security Guide +Server Security Guide Release 8 Contributed 2018 - 2026 This book provides instructions for configuring and administering -{productName} security. +{productName} Server security. [[sthref1]] ''''' -{productName} Security Guide, Release 8 +{productName} Server Security Guide, Release 8 Copyright (c) 2025 Contributors to the Eclipse Foundation. All rights reserved. diff --git a/docs/troubleshooting-guide/src/main/asciidoc/preface.adoc b/docs/troubleshooting-guide/src/main/asciidoc/preface.adoc index 8cf82a3d866..eb1bd8a4686 100644 --- a/docs/troubleshooting-guide/src/main/asciidoc/preface.adoc +++ b/docs/troubleshooting-guide/src/main/asciidoc/preface.adoc @@ -10,18 +10,6 @@ prev=title.html [[preface]] == Preface -[NOTE] -==== -This documentation is part of the Java Enterprise Edition contribution -to the Eclipse Foundation and is not intended for use in relation to -Java Enterprise Edition or Orace GlassFish. The documentation is in the -process of being revised to reflect the new Jakarta EE branding. -Additional changes will be made as requirements and procedures evolve -for Jakarta EE. Where applicable, references to Jakarta EE or Java -Enterprise Edition should be considered references to Jakarta EE. - -Please see the Title page for additional license information. -==== This guide describes common problems that you might encounter when using {productName} and how to solve them. @@ -49,20 +37,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -78,50 +94,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -147,10 +163,6 @@ applications (Java clients) that work with {productName}. Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - - [[related-documentation]] === Related Documentation @@ -321,4 +333,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/troubleshooting-guide/src/main/asciidoc/title.adoc b/docs/troubleshooting-guide/src/main/asciidoc/title.adoc index 5a458b0e0d5..d13b77d7c10 100644 --- a/docs/troubleshooting-guide/src/main/asciidoc/title.adoc +++ b/docs/troubleshooting-guide/src/main/asciidoc/title.adoc @@ -1,29 +1,29 @@ type=page status=published -title={productName} Troubleshooting Guide, Release 8 +title={productName} Server Troubleshooting Guide, Release 8 next=preface.html prev=toc.html ~~~~~~ -= {productName} Troubleshooting Guide, Release 8 += {productName} Server Troubleshooting Guide, Release 8 [[eclipse-glassfish-server]] == {productName} -Troubleshooting Guide +Server Troubleshooting Guide Release 8 Contributed 2018 - 2026 This guide describes common problems that you might encounter when using -{productName} and how to solve them. +{productName} Server and how to solve them. [[sthref1]] ''''' -{productName} Troubleshooting Guide, Release 8 +{productName} Server Troubleshooting Guide, Release 8 Copyright (c) 2025 Contributors to the Eclipse Foundation. All rights reserved. diff --git a/docs/upgrade-guide/src/main/asciidoc/appendix.adoc b/docs/upgrade-guide/src/main/asciidoc/appendix.adoc index 814f1958d6c..acac2bd3d06 100644 --- a/docs/upgrade-guide/src/main/asciidoc/appendix.adoc +++ b/docs/upgrade-guide/src/main/asciidoc/appendix.adoc @@ -33,20 +33,48 @@ The following topics are addressed here: [[glassfish-server-documentation-set]] === {productName} Documentation Set -The {productName} documentation set describes deployment planning and -system installation. For an introduction to {productName}, refer to -the books in the order in which they are listed in the following table. +The {productName} documentation set is organized into the following groups. + +==== Common {productName} Guides + +These guides apply to all {productName} variants. + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:release-notes.adoc#GSRLN[Release Notes] +|Provides late-breaking information about the software and the documentation and includes a comprehensive, +table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers. + +|xref:application-development-guide.adoc#GSDVG[Application Development Guide] +|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) +applications that are intended to run on the {productName}. +These applications follow the open Java standards model for Jakarta EE components +and application programmer interfaces (APIs). +This guide provides information about developer tools, security, and debugging. + +|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] +|Describes error messages that you might encounter when using {productName}. + +|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] +|Explains how to optimize the performance of {productName}. + +|xref:reference-manual.adoc#GSRFM[Reference Manual] +|Provides reference information in man page format for {productName} administration commands, utility +commands, and related concepts. +|=== + +==== {productName} Server Guides + +These guides are specific to the {productName} Server installation. [width="100%",cols="<30%,<70%",options="header",] |=== |Book Title |Description -|xref:release-notes.adoc#GSRLN[Release Notes] |Provides late-breaking information about -the software and the documentation and includes a comprehensive, -table-based summary of the supported hardware, operating system, Java -Development Kit (JDK), and database drivers. -|xref:quick-start-guide.adoc#GSQSG[Quick Start Guide] -|Explains how to get started with the {productName} product. +|xref:quick-start-guide.adoc#GSQSG[Server Quick Start Guide] +|Explains how to get started with the {productName} Server. |xref:installation-guide.adoc#GSING[Installation Guide] |Explains how to install the software and its components. @@ -62,50 +90,50 @@ your system and enterprise. |xref:administration-guide.adoc#GSADG[Administration Guide] |Explains how to configure, monitor, and manage {productName} subsystems and components -from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`(1M)] utility. +from the command line by using the xref:reference-manual.adoc#asadmin[`asadmin`] utility. Instructions for performing these tasks from the Administration Console are provided in the Administration Console online help. -|xref:security-guide.adoc#GSSCG[Security Guide] -|Provides instructions for configuring and administering {productName} security. +|xref:security-guide.adoc#GSSCG[Server Security Guide] +|Provides instructions for configuring and administering {productName} Server security. |xref:application-deployment-guide.adoc#GSDPG[Application Deployment Guide] |Explains how to assemble and deploy applications to the {productName} and provides information about deployment descriptors. -|xref:application-development-guide.adoc#GSDVG[Application Development Guide] -|Explains how to create and implement Java Platform, Enterprise Edition (Jakarta EE platform) -applications that are intended to run on the {productName}. -These applications follow the open Java standards model for Jakarta EE components -and application programmer interfaces (APIs). -This guide provides information about developer tools, security, and debugging. - |xref:add-on-component-development-guide.adoc#GSACG[Add-On Component Development Guide] |Explains how to use published interfaces of {productName} to develop add-on components for {productName}. This document explains how to perform only those tasks that ensure that the add-on component is suitable for {productName}. -|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] -|Explains how to run applications in embedded {productName} and to develop applications -in which {productName} is embedded. - |xref:ha-administration-guide.adoc#GSHAG[High Availability Administration Guide] |Explains how to configure {productName} to provide higher availability and scalability through failover and load balancing. -|xref:performance-tuning-guide.adoc#GSPTG[Performance Tuning Guide] -|Explains how to optimize the performance of {productName}. +|xref:troubleshooting-guide.adoc#GSTSG[Server Troubleshooting Guide] +|Describes common problems that you might encounter when using {productName} Server and explains how to solve them. +|=== -|xref:troubleshooting-guide.adoc#GSTSG[Troubleshooting Guide] -|Describes common problems that you might encounter when using {productName} and explains how to solve them. +==== Embedded {productName} Guides -|xref:error-messages-reference.adoc#GSEMR[Error Message Reference] -|Describes error messages that you might encounter when using {productName}. +These guides cover running {productName} as a self-contained executable JAR for cloud deployments, +containers, and embedding in applications. -|xref:reference-manual.adoc#GSRFM[Reference Manual] -|Provides reference information in man page format for {productName} administration commands, utility -commands, and related concepts. +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description + +|xref:embedded-server-guide.adoc#GSESG[Embedded Server Guide] +|Explains how to run applications with Embedded {productName} from the command line or as a library, +suitable for cloud deployments, containers, and integration testing. +|=== + +==== Eclipse Open MQ Documentation + +[width="100%",cols="<30%,<70%",options="header",] +|=== +|Book Title |Description |link:{mq-release-notes-url}[Message Queue Release Notes] |Describes new features, compatibility issues, and existing bugs for Open Message Queue. @@ -132,9 +160,6 @@ Message Queue who want to use the C language binding to the Message Queue messaging service to send, receive, and process Message Queue messages. |=== - - - [[related-documentation]] === Related Documentation @@ -306,4 +331,3 @@ In configuration files, domain-dir is represented as follows: |Represents the directory for a server instance. |domain-dir/instance-name |=== - diff --git a/docs/website/src/main/resources/README.md b/docs/website/src/main/resources/README.md index 1a6b9f0e43d..108c1c2c6a2 100644 --- a/docs/website/src/main/resources/README.md +++ b/docs/website/src/main/resources/README.md @@ -16,7 +16,10 @@ **Eclipse GlassFish** is a lightweight yet powerful open-source application server that fully implements the **[Jakarta EE](compatibility)** platform. Designed for flexibility, scalability, and reliability, it provides a production-ready environment that adheres strictly to open standards without proprietary dependencies. -GlassFish delivers comprehensive support for all required and optional **Jakarta EE APIs**, successfully passing all corresponding **Technology Compatibility Kits (TCKs)**. It includes an advanced administration console, clustering capabilities, and a rich set of tools that streamline both development and deployment. Continuously maintained under the **Eclipse Foundation**, GlassFish remains a robust and standards-compliant choice for modern enterprise applications. +GlassFish delivers comprehensive support for all required and optional **Jakarta EE APIs**, successfully passing all corresponding **Technology Compatibility Kits (TCKs)**. Continuously maintained under the **Eclipse Foundation**, GlassFish comes in two deployment modes: + +- **GlassFish Server** — the full application server with administration console, clustering, and high availability, designed for robust on-premise and traditional enterprise deployments. +- **Embedded GlassFish** — a self-contained executable JAR requiring no installation, designed for cloud-native deployments, containers, microservices, integration testing, and embedding directly into applications. Run with `java -jar glassfish-embedded-all.jar`.