MCPcopy Index your code
hub / github.com/eclipse-ee4j/glassfish

github.com/eclipse-ee4j/glassfish @9.0.0-M2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 9.0.0-M2 ↗ · + Follow
107,942 symbols 491,755 edges 14,442 files 34,088 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Eclipse GlassFish

Eclipse GlassFish is a Jakarta EE compatible implementation owned by the Eclipse Foundation and developed and maintained by the community.

Information about contributions to the project and partially to the whole ecosystem can be found here: * GlassFish Project Web Site * EE4J Project Group Web Site * GitHub Insights

There's much more work done on project's open source dependencies too. Please consider contributing or sponsoring of related projects, contributing individuals and companies or buying their services.

📋 Quick Links

📦 Download Links

🔄 Version Compatibility

GlassFish Version Jakarta EE Version Java Requirements
8.0.0 11 21, 25
7.1.0 10 17, 21, 25
7.0.25 10 11, 17, 21
6.2.5 9.1 11, 17
6.1.0 9.1 11
6.0.0 9 8
5.1.0 8 and Java EE 8 8

Building

Prerequisites

  • JDK21+
  • Maven 3.9.0+

Execution

  • mvn clean install - Full build including documentation, automatic QA, checkstyle and all maven managed tests. Excludes just Ant and TCK tests. Typical time: 20 minutes.
  • mvn clean install -Pqa - Building all distribution artifacts, running QA, checkstyle and all maven managed tests. Excludes Ant, TCK and documentation. Typical time: 10 minutes.
  • mvn clean install -Pfast - Building all distribution artifacts, running just unit tests. Excludes QA, checkstyle, integration tests, Ant, TCK and documentation. Typical time: 7 minutes.
  • mvn clean install -Pfastest -T4C - Building all distribution artifacts as fast as possible. Excludes everything not serving this purpose. Typical time: 1 minute.

After the build, you can run GlassFish in the following ways: * Run GlassFish server directly: Navigate to appserver/distributions/glassfish/target/stage/glassfish9 - it is an unpacked version of GlassFish Full. Then you can run it as usual, e.g. with bin/startserv * Run GlassFish server from a ZIP: A zip file is generated either at appserver/distributions/glassfish/target/glassfish.zip or in your local maven repository, e.g. at <HOME>/.m2/repository/org/glassfish/main/distributions/glassfish/<VERSION>/glassfish-<VERSION>.zip. Unpack it and run as usual * Run Embedded GlassFish: Find the JAR file at appserver/extras/embedded/all/target/glassfish-embedded-all.jar or in your local maven repository, e.g. at <HOME>/.m2/repository/org/glassfish/main/extras/glassfish-embedded-all/<VERSION>/glassfish-embedded-all-<VERSION>.jar. Then run it withjava -jar glassfish-embedded-all.jar`

You can use also some maven optimizations, see Maven documentation. Especially -am, -amd, -f, -pl, -rf and their combinations are useful.

If you use Maven 3.9+, we recommend that you copy the .mvn/maven.config.template file into .mvn/maven.config and uncomment one of the options there or customize the options as you need. Then you can just run mvn clean install and the options in maven.config will be applied automatically. Or with just mvn, the default goal will be run with those options. See Configuring Maven Documentation

If you want to see more logs you can use the -Dtest.logLevel=FINEST option set to an appropriate log level. Note that this applies just for tests which are executed by Maven and which use the GlassFish Java Util Logging Extension (GJULE).

📦 Distribution

After building, find distributions at: - GlassFish Server Full Profile: appserver/distributions/glassfish/target/glassfish.zip - GlassFish Server Web Profile: appserver/distributions/web/target/web.zip - Embedded GlassFish All: appserver/extras/embedded/all/target/glassfish-embedded-all.jar - Embedded GlassFish Web: appserver/extras/embedded/web/target/glassfish-embedded-web.jar

Special Profiles

  • staging - This profile was used formerly to access the Staging Maven repository. At this time the repository is not available any more and the profile should not be used.
  • jacoco - enables the JaCoCo agent in tests, so you can import its output to your editor, i.e. Eclipse, and see the code coverage.
  • jacoco-merge - merges all JaCoCo output files found in subdirectories and merges them into one. It is useful to see code which wasn't even touched by tests.

Special Scripts

  • ./updateVersion.sh 6.99.99.experimental - useful for custom distributions, so you can avoid conflicts with version in master branch.
  • ./runtests.sh [testBlockName] [?glassfishVersion] - useful to run old additional tests locally
  • ./validateJars.sh - uses the bnd command to check OSGI dependencies in all target directories

Additional Testing

After building the GlassFish distribution artifacts you can execute also additional tests managed by bash scripts. They are quite old and have high technical debt, but at this moment they still provide useful service.

QuickLook

mvn -f appserver/tests/quicklook/pom.xml test -Dglassfish.home=$(pwd)/appserver/distributions/glassfish/target/stage/glassfish9/glassfish

Old Additional Tests

:warning: If the script fails, sometimes it doesn't stop the domain and you have to do that manually.

:warning: Some of the scripts do in-place filtering or generate other sources which remain and later affect subsequent executions. You have to remove those changes manually.

* ./runtests.sh batch_all # Usual time: 1 minute
* ./runtests.sh cdi_all # Usual time: 6 minutes
* ./runtests.sh connector_group_1 # Usual time: 16 minutes
* ./runtests.sh connector_group_2 # Usual time: 3 minutes
* ./runtests.sh connector_group_3 # Usual time: 4 minutes
* ./runtests.sh connector_group_4 # Usual time: 16 minutes
* ./runtests.sh deployment_all # Usual time: 8 minutes
* ./runtests.sh ejb_group_1 # Usual time: 10 minutes
* ./runtests.sh ejb_group_2 # Usual time: 7 minutes
* ./runtests.sh ejb_group_3 # Usual time: 18 minutes
* ./runtests.sh ejb_group_embedded # Usual time: 4 minutes
* ./runtests.sh jdbc_all # Usual time: 20 minutes
* ./runtests.sh naming_all # Usual time: 2 minutes
* ./runtests.sh persistence_all # Usual time: 3 minutes
* ./runtests.sh security_all # Usual time: 8 minutes
* ./runtests.sh web_jsp # Usual time: 8 minutes
* ./runtests.sh webservice_all # Usual time: 10 minutes
* ./runtests.sh ejb_web_all # Usual time: 4 minutes
* ./runtests.sh ql_gf_web_profile_all # Usual time: 2 minutes
* ./runtests.sh ql_gf_full_profile_all # Usual time: 4 minutes
  • many tests under appserver/tests subdirectories; they are still waiting for someone's attention.

Pull request workflow

The pull request workflow is described on Eclipse GlassFish / workflow.

Build server results of pull requests can be found at CI Glassfish.

Basic Usage

  • Starting Eclipse GlassFish: glassfish9/bin/asadmin start-domain
  • Visit http://localhost:4848
  • Stopping Eclipse GlassFish: glassfish9/bin/asadmin stop-domain

Security Considerations

[!IMPORTANT] For production deployments, consider the following security measures: * Don't use domain1: The domain1 can be used just in automated tests but never on production as it contains private keys which are implicitly compromised. You should create a new domain for your environment. * Disable the Admin Console: The web-based Administration Console should be disabled in production environments to reduce attack surface and prevent CSRF attacks where malicious links can execute admin commands. Use asadmin set server.admin-service.property.adminConsoleStartup=never and restart the domain. * Enable Secure Admin: Use asadmin enable-secure-admin to secure administrative communications. * Use strong passwords: Change default passwords and use strong authentication.

For comprehensive security guidance, see the Security Guide.

Professional Services and Enterprise Support

This section is dedicated to companies offering products and services around Eclipse GlassFish.

The Eclipse GlassFish project does not endorse or recommend any of the companies on this page. We love all our supporters equally.

Professional Services and Enterprise support are available through following companies: - OmniFish - ManageCat

Extension points exported contracts — how you extend this code

IIOPInterceptorFactory (Interface)
@author Mahesh Kannan Date: Jan 16, 2009 [8 implementers]
appserver/orb/orb-connector/src/main/java/org/glassfish/enterprise/iiop/api/IIOPInterceptorFactory.java
PropertyReader (Interface)
Provides property information relavant to Load balancer tier. @author Satish Viswanatham [14 implementers]
appserver/load-balancer/admin/src/main/java/org/glassfish/loadbalancer/admin/cli/reader/api/PropertyReader.java
DigestRealm (Interface)
@author K.Venugopal@sun.com [154 implementers]
appserver/security/core-ee/src/main/java/com/sun/enterprise/security/ee/authentication/glassfish/digest/DigestRealm.java
EjbMessageDispatcher (Interface)
Common interface between jaxrpc 1.1 and jax-ws 2.0 for dispatching EJB endpoint messages. @author Bhakti Mehta [253 implementers]
appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/EjbMessageDispatcher.java
ContextService (Interface)
Concurrency context service resource definition. [13 implementers]
appserver/concurrent/concurrent-connector/src/main/java/org/glassfish/concurrent/config/ContextService.java
ByteCodeEnhancer (Interface)
A JDO enhancer, or byte-code enhancer, modifies the byte-codes of Java class files to enable transparent loading and sto [6 …
appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/ByteCodeEnhancer.java
EjbContainerInterceptor (Interface)
Contract interface for registering EjbContainerInterceptor to the Ejb Container. It can be inherited by anyone who want [18 …
appserver/ejb/ejb-internal-api/src/main/java/org/glassfish/ejb/spi/EjbContainerInterceptor.java
ResourceManager (Interface)
Interface definition for the Resource Manager. Depending on the ResourceSpec, PoolManager selects appropriate Resource M [14 …
appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/rm/ResourceManager.java

Core symbols most depended-on inside this repo

println
called by 19089
nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/util/Output.java
equals
called by 8992
appserver/common/stats77/src/main/java/com/sun/enterprise/admin/monitor/stats/lb/CommonBean.java
toString
called by 4814
appserver/common/stats77/src/main/java/com/sun/enterprise/admin/monitor/stats/lb/CommonBean.java
append
called by 3980
appserver/persistence/cmp/enhancer/src/main/java/com/sun/jdo/api/persistence/enhancer/classfile/Insn.java
put
called by 3869
appserver/persistence/cmp/support-sqlstore/src/main/java/com/sun/jdo/spi/persistence/support/sqlstore/impl/VersionConsistencyCacheImpl.java
get
called by 3380
appserver/tests/appserv-tests/devtests/deployment/ejb30/ear/session2/ejb/Sful.java
close
called by 3161
appserver/transaction/jts/src/main/java/com/sun/jts/jta/NativeXAResource.java
log
called by 2899
appserver/web/web-core/src/main/java/org/apache/catalina/Logger.java

Shape

Method 92,164
Class 12,629
Interface 2,861
Enum 173
Function 115

Languages

Java100%
TypeScript1%
Python1%
Ruby1%

Modules by API surface

appserver/web/web-core/src/main/java/org/apache/catalina/core/StandardContext.java381 symbols
appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/BaseContainer.java241 symbols
appserver/web/web-core/src/main/java/org/apache/catalina/connector/Request.java214 symbols
appserver/jdbc/jdbc-ra/jdbc-core/src/main/java/com/sun/gjc/spi/base/DatabaseMetaDataWrapper.java168 symbols
appserver/persistence/cmp/support-sqlstore/src/main/java/com/sun/jdo/spi/persistence/support/sqlstore/SQLStateManager.java156 symbols
appserver/web/web-core/src/main/java/org/apache/catalina/Context.java153 symbols
appserver/web/web-core/src/main/java/org/apache/catalina/core/DummyRequest.java141 symbols
appserver/web/web-core/src/main/java/org/apache/catalina/connector/Connector.java140 symbols
appserver/jdbc/jdbc-runtime/src/main/java/org/glassfish/jdbc/deployer/DataSourceDefinitionDeployer.java139 symbols
appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/EjbBeanDescriptor.java133 symbols
appserver/persistence/entitybean-container/src/main/java/org/glassfish/persistence/ejb/entitybean/container/EntityContainer.java130 symbols
appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/StatefulSessionContainer.java128 symbols

Datastores touched

(mysql)Database · 1 repos
dbnameDatabase · 1 repos
DATABASE_NAMEDatabase · 1 repos
mysqlDatabase · 1 repos

For agents

$ claude mcp add glassfish \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page