Skip to content

Conversation

@Ariho-Seth
Copy link
Contributor

In this PR, information about the OSGi module management was removed from the administration-guide documentation because it no longer exists in GlassFish 7.
The last update of the artifacts version in the Maven Central was made in 2017 for GlassFish 5.0.

<dependency>
    <groupId>org.glassfish.main.packager</groupId>
    <artifactId>glassfish-osgi-http</artifactId>
    <version>5.0</version>
</dependency>

Fixes #24314

@Ariho-Seth
Copy link
Contributor Author

Hello @OndroMih, Please have a look thru this PR and let me know whether there is anything to be added.

gogo$
----
[[to-download-and-install-the-glassfish-osgi-web-console]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the OSGi Web Console was removed from GlassFish. The other OSGi functionality is still supported.

Please remove only the following sections:

  • "To Download and Install the GlassFish OSGi Web Console"
  • "To Access the GlassFish OSGi Web Console Through the {productName} Administration Console"

Keep the rest of the OSGi documentation:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the OSGi Web Console was removed from GlassFish. The other OSGi functionality is still supported.

Web console exists in the source tree under appserver/osgi-platforms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I didn't know about this. However, that module is just a phony. I added it to the GlassFish modules directory, it adds a tab for server and instances, but when the tab is clicked, it just redirects to http://localhost:8080/osgi/system/console/bundles, which is not found. I assume that this URL used to be provided either by Felix or by some external plugin and now it's just not there.

See https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/osgi-platforms/glassfish-osgi-console-plugin/src/main/resources/osgiConsole.jsf.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there's a Web Console by Felix, which is probably what the GlassFish OSGi Web Console plugin wants to redirect to: https://github.com/apache/felix-dev/tree/master/webconsole

I couldn't get it running easily with GlassFish. I downloaded the Felix Web Console bundle from Maven Central, but it requires a few more bundles and either some integration with GlassFish or a bundle that runs it inside an embedded Jetty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a few hours, I managed to deploy the Felix Web Console:
image

It requires to download around 10 bundles from Maven central and install them into the GlassFish modules directory, and also modify the glassfish/config/osgi.properties file to set a few properties. I managed to run it only via an embedded Jetty, on a separate port, and with a hardcoded username and password in osgi.properties.

I also managed to deploy it using a HTTP bridge bundle but that requires some more config and probably a custom bundle to integrate the Felix servlet to GlassFish. Security could be also bridged so that it's protected by GlassFish user and password. But, again, some more coding required.

If we decided it's worth it, I will modify the docs to describe how to install the OSGi Web Console. If not, I will just write a blog about it and we can just merge this PR and remove the docs.

@OndroMih
Copy link
Contributor

OndroMih commented Aug 3, 2025

Hi @Ariho-Seth , the core OSGi functionality still works in GlassFish. Only the Web Console was removed - it's a component in the Admin UI of GlassFish. OSGi can be still administered via command line commands.

@Ariho-Seth
Copy link
Contributor Author

Sorry @OndroMih, for the misunderstanding above. But I've updated the PR for to reflect the suggested changes.
Please let me know if it delivers what we are intending to achieve. Thanks!

@Ariho-Seth Ariho-Seth changed the title Removed instructions about the OSGi Module Management. Removed instructions about the OSGi Web Console. Aug 3, 2025
@Ariho-Seth Ariho-Seth requested a review from OndroMih August 3, 2025 10:12

* xref:overview.adoc#gkvay[1-1 Determining if the DAS Requires Restart]
* xref:overview.adoc#gkvba[1-2 Determining if an Instance Requires Restart]
* xref:overview.adoc#GSADG1053[1-3 Listing Apache Felix Gogo Remote Shell Commands]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be kept, do not remove this, this functionality works

@OndroMih
Copy link
Contributor

OndroMih commented Aug 3, 2025

Hi, @Ariho-Seth, based on the conversation #25649 (comment), we found out that it may be possible to install the Web Console. It cannot be installed from the Update Center anymore, but it might be possible to install it by directly added files to a GlassFish installation.

I think it's worth exploring this and keep the documentation for now. Let's pause work on this PR until we decide whether we want to explore how to install the Web Console or we just remove the docs.

@Ariho-Seth Ariho-Seth marked this pull request as draft August 3, 2025 10:40
@Ariho-Seth
Copy link
Contributor Author

Hi, @Ariho-Seth, based on the conversation #25649 (comment), we found out that it may be possible to install the Web Console. It cannot be installed from the Update Center anymore, but it might be possible to install it by directly added files to a GlassFish installation.

I think it's worth exploring this and keep the documentation for now. Let's pause work on this PR until we decide whether we want to explore how to install the Web Console or we just remove the docs.

Sure thing, I'll be ready anytime.

@OndroMih
Copy link
Contributor

OndroMih commented Aug 8, 2025

Just for the record, I was able to install the Apache Felix OSGi console into GlassFish 7.0.25 in this way, bit hacky and manual:

I downloaded the following Maven artifacts into the glassfish/modules directory:

  • org.owasp.encoder.encoder-1.3.1.jar
  • org.apache.felix.http.bridge-6.0.0.jar
  • org.osgi.service.log-1.5.0.jar
  • glassfish-osgi-console-plugin-7.0.25.jar
  • slf4j-api-2.0.17.jar
  • slf4j-jdk14-2.0.17.jar
  • org.apache.felix.http.servlet-api-3.0.0.jar
  • org.apache.felix.inventory-1.1.0.jar
  • javax.servlet-api-4.0.1.jar

And these ones into the glassfish/modules/autostart directory, so that it starts automatically at server startup:

  • org.apache.felix.webconsole-5.0.12.jar
  • org.apache.felix.http.jetty12-1.0.36.jar

Then I edited the file glassfish/config/osgi.properties and set org.osgi.framework.system.capabilities to:

org.osgi.framework.system.capabilities=\
osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8",${eecap-${java.vm.specification.version}}

This is required because the module org.osgi.service.log-1.5.0.jar requires the osgi.ee=JavaSE/compact1)(versi on=1.8) capability, which is not realy needed and not supported on newer Java versions.

In the osgi.properties file, I added org.osgi.service.http.port=7080 property, which is for the embedded Jetty server to run on port 7080. I didn't find an easy way how to deploy the OSGi console to a GlassFish listener, so I used embedded Jetty and it binds to this port.

Then I could run GlassFish and access the OSGi console at https://

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Review the docs about the OSGi Web Console

3 participants