Or use pax tinybundles. :-) InputStream inp = bundle()
.add( MyFirstActivator.class ) .add( HelloWorld.class ) .add( HelloWorldImpl.class ) .set( Constants.BUNDLE_SYMBOLICNAME, caption ) .set( Constants.EXPORT_PACKAGE, "demo" ) .set( Constants.IMPORT_PACKAGE, "demo" ) .set( Constants.BUNDLE_ACTIVATOR, MyFirstActivator.class.getName() ) .build( getStrategy() ); can be found at [1] Best regards, Achim [1] - https://ops4j1.jira.com/wiki/display/ops4j/Tinybundles sent from mobile device Am 25.09.2014 19:57 schrieb "Raymond Auge" <raymond.a...@liferay.com>: > .. was I whining??? > > thx Peter! > > On Thu, Sep 25, 2014 at 1:53 PM, Peter Kriens <peter.kri...@aqute.biz> > wrote: > >> 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é* <http://www.liferay.com/web/raymond.auge/profile> >> (@rotty3000) >> Senior Software Architect >> *Liferay, Inc.* <http://www.liferay.com/> (@Liferay) >> >> >> >> >> _______________________________________________ >> OSGi Developer Mail List >> osgi-dev@mail.osgi.org >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> >> >> >> _______________________________________________ >> OSGi Developer Mail List >> osgi-dev@mail.osgi.org >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> > > > > -- > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> > (@rotty3000) > Senior Software Architect > *Liferay, Inc.* <http://www.liferay.com> (@Liferay) > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev