Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 43501 invoked from network); 18 Aug 2009 10:57:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Aug 2009 10:57:35 -0000 Received: (qmail 72817 invoked by uid 500); 18 Aug 2009 10:57:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 72787 invoked by uid 500); 18 Aug 2009 10:57:54 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 72778 invoked by uid 99); 18 Aug 2009 10:57:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 10:57:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 10:57:52 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id B327E118BC for ; Tue, 18 Aug 2009 10:57:32 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Apache Wiki To: commits@harmony.apache.org Date: Tue, 18 Aug 2009 10:57:32 -0000 Message-ID: <20090818105732.1406.62875@eos.apache.org> Subject: [Harmony Wiki] Update of "OSGi-Harmony Runtime" by galaxy X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification. The following page has been changed by galaxy: http://wiki.apache.org/harmony/OSGi-Harmony_Runtime ------------------------------------------------------------------------------ 1 : The main purpose - OSGi has become one of the best ways to govern the jar files in a number of + OSGi has become one of the best ways to govern the jar files in a number of applications Such as the power it exhibits in eclipse .And as we all know ,the Harmony runtime is a modularized one and each module , with its manifest file , is just like one bundle in the OSGi framework .So we are @@ -16, +16 @@ 2 : Ways to meet the main purpose - Naturally, there are two ways to meet this purpose: + Naturally, there are two ways to meet this purpose: - A Implementing the OSGi framework in VM in C/C++ to govern all the java + A Implementing the OSGi framework in VM in C/C++ to govern all the java modules - B Using one of the OSGi-ed framework implemented in java to implemented a + B Using one of the OSGi-ed framework implemented in java to implemented a half OSGi-ed JRE. - Finally I picked the plan B with the well known OSGi framework :Felix + Finally I picked the plan B with the well known OSGi framework :Felix .And the reasons are as follows : - .And the reasons are as follows - First : Implementing a OSGi-ed framework from scratch in c/c++ in the vm is + First : Implementing a OSGi-ed framework from scratch in c/c++ in the vm is difficult and time-consuming . - Second : Plan A suffers from the facts that implementations differs huge + Second : Plan A suffers from the facts that implementations differs huge from VM to VM .Plan B won’t have this kind of problem as long as the modules comply with the OSGi specifications and we have a adapted java.exe , the rest is nearly the same. - Third : Beside the framework ,each OSGi implementation has a lot of add-ons + Third : Beside the framework ,each OSGi implementation has a lot of add-ons .This will facilitate future development of new features and utilities .For example : the could use the bundle fileinstall to install all the jar files lies in a folder ,very helpful in certain circumstances.This could be done @@ -47, +46 @@ The difficulties ,or the main tasks ,of this project are as follows - A Find the minimum working environment of OSGi-framework and modify the + A Find the minimum working environment of OSGi-framework and modify the rest modules in Harmony ,mainly the manifest file ,to resolve the coupling - B Modify the classloading mechanism and booting of the jre to be able + B Modify the classloading mechanism and booting of the jre to be able run normal java applications And the fixes are For A: - Harmony is a modularized runtime .So determine the minimum working + Harmony is a modularized runtime .So determine the minimum working environment is no more than choose the right module to stay with the VM .However ,although the coupling is little , it does exist . So a modification of the module is necessary ,mainly the manifest file .And as I @@ -107, +106 @@ For B: - I added one extra sphere between the VM and the main class to run + I added one extra sphere between the VM and the main class to run .org.apache.osgi.FelixStarter. , the following is done in this class - First: Loading the configurations and Start Felix ,the OSGi framework we use + First: Loading the configurations and Start Felix ,the OSGi framework we use - Second: Initializing the class org.apache.osgi.OsgiClassLoader ,this class + Second: Initializing the class org.apache.osgi.OsgiClassLoader ,this class will load the main class and subsequently all the classes used in the main class - Third: Transfer the arguments to the “real “ main class ,invoke the main + Third: Transfer the arguments to the “real “ main class ,invoke the main method . @@ -125, +124 @@ - First : Check the class name to determine whether it should be loaded by the + First : Check the class name to determine whether it should be loaded by the parent class loader .This work is done by specifying the “org.osgi.framework.bootdelegation” property to include all the package names in the modules stays in the VM . - Second : load the classes in the bundle governed by the framework .I will + Second : load the classes in the bundle governed by the framework .I will examine each bundle's export and import property to search for the class name ; - Third : the classes in the application’s class path . + Third : the classes in the application’s class path . - Finally : we could not find the class and a ClassNotFoundException will be + Finally : we could not find the class and a ClassNotFoundException will be thrown .