Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] Extensions to plan {enhancement idea}

Hi,

I wonder if the following idea can pass the smell test.

I would like to propose a concept of an extension/fragment plan that can be attached to the referenced parent plan during deployment.  The concept is similar to one plan importing another (currently supported feature), except that it is up to deployer to discover association and "fault-in"/merge the extension/fragment plan with parent plan.

I think this will provide one more interesting feature in OSGi Application space.  Plans are treated as applications, but to add features to these applications requires modification to the plan and that is a manual step.  With PAR this means a whole new build.  

Thoughts?  I have a use case where this feature would be invaluable.  It will give me concreate boundaries and knowledge of deployment unit completeness.  Having this completeness allows interesting use case implementations based on InstallArtifactLifecycleListener. For example support for per plan JPA/Hibernate SessionFactory with entities spread out across multiple bundles vs. OSGi JPA Spec that is targeted at a single bundle.

Regards,

Dmitry 

Example:

<!-- parent -->
<?xml version="1.0" encoding="UTF-8"?>
<plan name="org.eclipse.virgo.apps.admin.plan" version="2.1.0" scoped="false" atomic="true"
        xmlns="http://www.springsource.org/schema/dm-server/plan"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan 
                            http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">

<artifact type="bundle" name="org.eclipse.virgo.apps.admin.core" version="[2.0,3.0)"/>
    <artifact type="bundle" name="org.eclipse.virgo.apps.admin.web" version="[2.0,3.0)"/>
</plan>

<!-- extension (scoped and atomic are ignored/conflict with extension attribute-->
<!-- can also be done with subelement -->
<?xml version="1.0" encoding="UTF-8"?>
<plan name="org.eclipse.virgo.apps.admin.plan" version="2.1.0" extension="true"
        xmlns="http://www.springsource.org/schema/dm-server/plan"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan 
                            http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">

    <artifact type="bundle" name="org.eclipse.virgo.apps.admin.extension.datasource" version="[2.0,3.0)"/>
</plan>


Back to the top