Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: future release
    • Fix Version/s: None
    • Component/s: OSGi
    • Labels:
      None

      Description

      This is a big feature and improvement on GF's kernel.
      Currently, after starting gf's domain, all bundles in $

      {com.sun.aas.installRootURI}

      modules/ will be installed into felix cache.

      Although there is a flag which indicates whether on-demand provisioning, on-demand true means is to only install minimize and reqired set of bundles, then using provisioning tool(eg. felix obr) is to provisioning bundles and dependencies dynamiclly.

      Once implementing the feature, glassfish's starting performance and memory consuming will be improved greatly.

      In order to attain the goal, we need to do some experiments and tasks.

      1) GLASSFISH-19395
      2) defining which modules consist of minimize and reqired set while starting domain
      3) GLASSFISH-19146

        Activity

        Hide
        TangYong added a comment - - edited

        I have a initial design about gf on-demand starting as following:

        1 divide gf's modules into a set of subsystem[1]
        [1]: the means of subsystem is similar to jboss 7's subsystem or apache karaf's feature. The following is one of imaginary gf's subsystem,

        <subsystems xmlns="http://glassfish.java.net/xmlns/subsystems/v1.0">
        <subsystem name="webcontainer" version="4.0.0.0">
        <module startlevel="XX" start=false>org.glassfish.web.web-glue</module>
        <module>...</module>
        ...
        </subsystem>
        </subsystems>

        Just as the above showing, we define a subsystem called "webcontainer" which is made up of some modules under modules directory[2]. We also define these modules's startlevel in order to start module correctly.

        [2]: modules which consist of subsystems of gf should also include "autostat" or other directories apart from "modules".

        In order to define a subsystem of gf, we need to define which modules consist of the subsystem correctly.

        Then, I start to say why we need to define such subsystems for glassfish and it can bring us which advantages.

        Once glassfish started in an on-demand way which only install and start a minimize and reqired set of modules, we will face a problem that how we can activate other modules?

        There are two ways:
        1) using asadmin deploy command
        For example, when we use "asadmin deploy --type=ejb ...", we wish that ejb container(or modules which implements EJB 3.2 spec) can be installed(or provisioning) automaticlly using OBR. If having such a subsystem which clearly defines modules implementing EJB 3.2 spec, we can scan the subsystem definition according to the xml file, then use OBR to install these modules and their dependencies. As to how to start ejb container on-demand, this has been done by HK2 [3].

        [3]: as for gf's container starting, hk2 layer along with osgi-adapter can resolve service dependencies and start dependent modules on-demand. However, for some scenes in which we must start some modules ahead of time, we need to define whether module starts in subsystem definition, this is why we define a property called "start=XXX",

        <module startlevel="XX" start=false>org.glassfish.web.web-glue</module>

        2) creating new command simliar "asadmin install-subsystem XXX"
        This will install some subsystem using command.

        2 defining which modules consist of minimize and reqired modules while starting domain
        Basiclly, according to my understanding, considering the following:
        1) modules/endorsed/
        2) modules/osgi-resource-locator.jar
        3) hk2.bundles
        4) obr.bundles
        5) modules/glassfish.jar
        6) Admin related modules(needing to investigate)

        3 enhancing "asadmin deploy --type " in order to support subsystem activation
        I have said the point in 1.

        [Experiment]
        As a experiment, I will build a subsystem called "osgi-javaee" which basiclly is made up of modules under "autostat", then, enhancing "asadmin deploy --type=osgi"

        Show
        TangYong added a comment - - edited I have a initial design about gf on-demand starting as following: 1 divide gf's modules into a set of subsystem [1] [1] : the means of subsystem is similar to jboss 7's subsystem or apache karaf's feature. The following is one of imaginary gf's subsystem, <subsystems xmlns="http://glassfish.java.net/xmlns/subsystems/v1.0"> <subsystem name="webcontainer" version="4.0.0.0"> <module startlevel="XX" start=false>org.glassfish.web.web-glue</module> <module>...</module> ... </subsystem> </subsystems> Just as the above showing, we define a subsystem called "webcontainer" which is made up of some modules under modules directory [2] . We also define these modules's startlevel in order to start module correctly. [2] : modules which consist of subsystems of gf should also include "autostat" or other directories apart from "modules". In order to define a subsystem of gf, we need to define which modules consist of the subsystem correctly. Then, I start to say why we need to define such subsystems for glassfish and it can bring us which advantages. Once glassfish started in an on-demand way which only install and start a minimize and reqired set of modules, we will face a problem that how we can activate other modules? There are two ways: 1) using asadmin deploy command For example, when we use "asadmin deploy --type=ejb ...", we wish that ejb container(or modules which implements EJB 3.2 spec) can be installed(or provisioning) automaticlly using OBR. If having such a subsystem which clearly defines modules implementing EJB 3.2 spec, we can scan the subsystem definition according to the xml file, then use OBR to install these modules and their dependencies. As to how to start ejb container on-demand, this has been done by HK2 [3] . [3] : as for gf's container starting, hk2 layer along with osgi-adapter can resolve service dependencies and start dependent modules on-demand. However, for some scenes in which we must start some modules ahead of time, we need to define whether module starts in subsystem definition, this is why we define a property called "start=XXX", <module startlevel="XX" start=false>org.glassfish.web.web-glue</module> 2) creating new command simliar "asadmin install-subsystem XXX" This will install some subsystem using command. 2 defining which modules consist of minimize and reqired modules while starting domain Basiclly, according to my understanding, considering the following: 1) modules/endorsed/ 2) modules/osgi-resource-locator.jar 3) hk2.bundles 4) obr.bundles 5) modules/glassfish.jar 6) Admin related modules(needing to investigate) 3 enhancing "asadmin deploy --type " in order to support subsystem activation I have said the point in 1. [Experiment] As a experiment, I will build a subsystem called "osgi-javaee" which basiclly is made up of modules under "autostat", then, enhancing "asadmin deploy --type=osgi"

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            TangYong
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: