Skip to main content

Source code revision

svn

summary: 1. Switched to using official OSGi APIs artifacts as maven dependencies. 2. OSGi/HTTP service module now uses service tracker to track starting of glassfish.
revision: 35609
author: Sahoo
date: 2010-02-13 12:41:23 UTC (5 years)
message: 1. Switched to using official OSGi APIs artifacts as maven dependencies.
2. OSGi/HTTP service module now uses service tracker to track starting of glassfish.
3. Upgrading to HK2 1.0.1. It includes a cleaner StartupContext interface.
StartupContext used to have a couple of methods called getRootDirectiry() and getUserDirectory().
Depending on the runtime, either both were explicitly set or both were unset. When both were not set,
getRootDirectory() used to return a default value of System.getProperty("user.dir") and getUserDirectory()
used to return null. More over, it was not clear what value should be returned by those calls.
In some cases (e.g., in non-embedded case), getRootDirectory() returned path to glassfish/modules/, where as
in embedded case, it returned path to glassfish/. Over all, it was very confusing. So, I decided to clean it up.
It no longer has any of those methods. It has a properties object which can be set upfront to set the context.
We expect individual bootstrap modules to store appropriate context information there for latter retrieval.
Such information can include things like com.sun.aas.installRoot, com.sun.aas.instanceRoot, etc.

The second change in HK2 is the way HK2 OSGi adapter module is configured. Earlier, it used to be configured
via system properties. Now, we use OSGi config admin API to configure that bundle. When that bundle starts,
it does nothing until it receives a configuration update which it uses to create a StartupContext and Habitat.

4. Cleaned up ASMain* classes. Got rid of unnecessary abstraction like AbstractMain. glassfish.jar has now its own
activator which is uses to configure HK2 bundle. It reads startup context information from bundle context (or system
properties) and then configures HK2. It is also responsible for starting any other bundles needed by glassfish.
Such bundles include config admin, shell, file install, etc.

5. I have temporarily commented out jruby test in QL, as we have to integrate a new version of grizzly-jruby-module.jar.
We are waiting for RE to releaes that artifact from glassfish-scripting project after which we can integarte that version and
uncomment the test.

Tests performed: QL, embedded tests, QL on equinox
Change Path Actions
M trunk/v3/appclient/client/acc/src/main/java/org/glassfish/appclient/client/acc/ACCStartupContext.java
M trunk/v3/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/jws/DeveloperContentService.java
M trunk/v3/common/common-util/src/main/java/org/glassfish/server/ServerEnvironmentImpl.java
M trunk/v3/common/glassfish-api/src/main/java/org/glassfish/api/embedded/Server.java
M trunk/v3/common/glassfish-naming/pom.xml
M trunk/v3/core/bootstrap/osgi.bundle
M trunk/v3/core/bootstrap/pom.xml
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASEmbedded.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMain.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainEquinox.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainFelix.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainHelper.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainKnopflerFish.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainNonOSGi.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainOSGi.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainStatic.java
M trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/AbstractMain.java
A trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/Constants.java
A trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishActivator.java
A trunk/v3/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/StartupContextUtil.java
M trunk/v3/core/kernel/pom.xml
M trunk/v3/core/kernel/src/main/java/com/sun/enterprise/v3/admin/IdmService.java
M trunk/v3/core/kernel/src/main/java/com/sun/enterprise/v3/admin/LocationsCommand.java
M trunk/v3/core/kernel/src/main/java/com/sun/enterprise/v3/server/ServerContextImpl.java
M trunk/v3/flashlight/framework/pom.xml
M trunk/v3/osgi-javaee/osgi-ejb-container/pom.xml
M trunk/v3/osgi-javaee/osgi-http/pom.xml
M trunk/v3/osgi-javaee/osgi-http/src/main/java/org/glassfish/osgihttp/Activator.java
M trunk/v3/osgi-javaee/osgi-javaee-base/pom.xml
M trunk/v3/osgi-javaee/osgi-jpa/pom.xml
M trunk/v3/osgi-javaee/osgi-web-container/pom.xml
M trunk/v3/pom.xml
M trunk/v3/tests/quicklook/build.xml
M trunk/v3/tests/quicklook/testng/testng_gd.xml
M trunk/v3/tests/utils/pom.xml
M trunk/v3/tests/utils/src/main/java/org/glassfish/tests/utils/Utils.java
M trunk/v3/verifier/verifier-impl/pom.xml
M trunk/v3/verifier/verifier-impl/src/main/java/com/sun/enterprise/tools/verifier/VerifierModuleStartup.java
M trunk/v3/verifier/verifier-impl/src/main/java/com/sun/enterprise/tools/verifier/VerifierOSGiMain.java
M trunk/v3/web/web-glue/pom.xml
M trunk/v3/web/weld-integration/pom.xml
 
 
Close
loading
Please Confirm
Close