On 25 sep. 2014, at 15:16, Raymond Auge <raymond.a...@liferay.com> wrote:
> On Thu, Sep 25, 2014 at 9:08 AM, Peter Kriens <peter.kri...@aqute.biz> wrote:
> Somebody in your system must do the schema migration. This bundle should 
> create a synthetic bundle with the capability that describes the current 
> version. When this bundle migrates the database, it first deletes the 
> synthetic bundle (if present) and refreshes. This will unresolve anybody that 
> has a DB dependency.
> 
> You then migrate the db, knowing nobody uses it that depends on it.
> 
> Then you install a new synthetic bundle with the updated schema version 
> capability and refresh again. Only the bundles that can handle the new 
> version will resolve.
> 
> Tom and I had a brief discussion about this and he came up with about the 
> same model of synthetic bundles housing the capabilities.
> 
> ... wouldn't it be nice if we could create capabilities through an API? R7?

Yeah, lets make even more simple things complicated! :-)

        bb(Version v) {
                String template = 
                        "Bundle-SymbolicName: 
com.whiner.for.apis;singleton:=true\n"
                +       "-noresources=true\n"
                +       "Provide-Capability= 
schema;schema='blehhhh';version=${Bundle-Version}\n";

                Builder b = new Builder();
                b.getProperties().load( new StringReader(template) );   
                b.setVersion(v);
                b.build();
                if ( b.isOk() ) 
                        context.installBundle("synthetic-com.api.whiner", new 
JarResource(b.build().openInputStream());
        }

Kind regards,

        Peter Kriens





> 
> This would be an extremely powerful feature and not very far out from what 
> the current wiring API can already do (except not for packages).
> 
> 
> -- 
> Raymond Augé (@rotty3000)
> Senior Software Architect
> Liferay, Inc. (@Liferay)
> 
> 
> 
> 
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to