Skip to main content

Source code revision

svn

summary: GLASSFISH-11880: Improve OSGi cache handling to enable moving installation directory to a new location. GLASSFISH-13957: Non-daemon threads prevent server shutdown.
revision: 47494
author: Sahoo
date: 2011-06-16 09:38:46 UTC (3 years)
message: GLASSFISH-11880: Improve OSGi cache handling to enable moving installation directory to a new location.
GLASSFISH-13957: Non-daemon threads prevent server shutdown.
GLASSFISH-16263: Some of the threads spawned by osgi bundles are non-daemon threads.
GLASSFISH-15519: Exceptions during shutdown caused by fileinstall trying to start bundles even though framework start level has reached 0.
GLASSFISH-15457: NPE in osgi-http during shutdown.

First bug is fixed by adding some logic to identify the changes to provisioning options and then reconfiguring the framework.
The next two bugs are addressed by launching Felix in a daemon thread.
The last two bugs are addressed by using framework start level.

In the process, we have significantly simplified the launcher code.
kernel module is no longer responsible for registering GFRs. It is now done inside GlassFishMainActivator.
So, kernel does not have to have an activator, nor does it have to be started.
We no longer need an extra module called osgi-main to do the provisioning.
It is handled by the same BundleProvisioner that's now shared between embedded and non-embedded runtime builders.
Have renamed provisioning options to glassfish.osgi.auto.install,
glassfish.osgi.auto.start and
glassfish.osgi.auto.start.level[.N].
We no longer use the property called org.glassfish.additionalOSGiBundlesToStart to start additional
bundles. Additional bundles are managed using regular provisioning options found in OSGi config file.
We now use startlevel to control starting bundle start order. We start core bundles first and once
server is up, we increase the start level to activate optional bundles.

We no longer use FileInstall to manage modules/autostart/. We use our provisioning code to manage the same.
In non-embedded case, autostart bundles are started at start level 2.
FileInstall now manages autodeploy/bundles/ dir only. Earlier fileinstall was
configured to watch autostart dir using system properties in domain.xml.
Because there is no upgradetool available for users to upgrade from 3.1 to 3.1.1,
we can't change domain.xml in this release. So, we are now configuring fileinstall
to watch autostart using osgi config file.

Refactored osgi related bootstrapping code to a separate sub-package called osgi.

TODO: We should have common implementation of GlassFishRuntime between static and OSGi mode.
Change Path Actions
M branches/3.1.1/core/bootstrap/osgi.bundle
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainHelper.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/AutoProcessor.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/Constants.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/EmbeddedOSGiGlassFishRuntimeBuilder.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishDecorator.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMainActivator.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishRuntimeDecorator.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiFrameworkLauncher.java
M branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiGlassFishRuntimeBuilder.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Constants.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntime.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/GlassFishMainActivator.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Jar.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishImpl.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntime.java
A branches/3.1.1/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntimeBuilder.java
M branches/3.1.1/core/bootstrap/src/main/resources/META-INF/services/org.glassfish.embeddable.spi.RuntimeBuilder
M branches/3.1.1/core/kernel/osgi.bundle
M branches/3.1.1/core/kernel/pom.xml
M branches/3.1.1/core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java
M branches/3.1.1/osgi-platforms/equinox/src/main/resources/glassfish/osgi/equinox/configuration/config.ini
M branches/3.1.1/osgi-platforms/felix/src/main/resources/glassfish/osgi/felix/conf/config.properties
M branches/3.1.1/packager/glassfish-nucleus/pom.xml
M branches/3.1.1/pom.xml
 
 
Close
loading
Please Confirm
Close