Carsten Ziegeler wrote:

Daniel Fagerstrom wrote:
All current blocks, the core and libraries that are used by several bundles are packaged as bundles. These are deployed in a OSGi kernel. During development the Cocoon bundles can be deployed within the OSGi kernel of Eclipse together with various Cocoon develpment plugins (bundles). And during deployment the Cocoon bundles are deployed in a standalone kernel that either is started from within an servlet or at "top level" and contains a http server.

The OSGi kernel is like an OS kernel. It takes care about starting and stoping bundles and to resolve dependencies between bundles and gives them a parent classloader containing their dependencies.

The above means that we can get a much higher level of isolation beween different parts of core and between blocks. As the bundles don't need to expose all classes to everyone anymore. This is something that we allready need quite badly IMO, and a must if we wish to make it possible for external communities to develp Cocoon blocks.

Ok, so far so good - now, what do I have to do if I'm developing my own
application and want to use let's say the cron block: I want to add my
own scheduled task? Currently I have to know a little bit about Avalon:
using the service manager to lookup the component. Or to put it in other
words, I have to know what the service locator concept is. And that's
all. How does this look like with OSGi?
And in this context, if I'm developing an own application, does this
have to be an OSGi bundle as well?
Read the subsections "The main sitemap" and "The Cocoon service" in the first post in this thread http://marc2.theaimsgroup.com/?l=xml-cocoon-dev&m=111659636932761&w=2. The application need to be a bundle, but that only means that there need to be a manifest file in it. Also the dependency information that we now handle in a rather implicit compile time way in blocks.properties, will need to be declared within the "sitemap bundle". Everything else will be as before, you use the service manager for lookup as always.

/Daniel

Reply via email to