Hi, Am Mittwoch, den 16.04.2008, 14:01 +0600 schrieb janandith jayawardena: > * > First question* > ... snip snip snip ... > But I didn't write any logic. > So how is it possible for the bundle to load and start. How can i really > check whether it is started ?.*
The OSGi framework in which Sling is running starts a bundle by resolving all dependencies, creating a classloader to load the bundle classes and making the bundle available for use. If the Bundle has a BundleActivator. The start method of that activator is called. Otherwise the bundle is started and ready for use and its state is set to started. This is what the console tells you. Now, this is the main part of the story. Other parts follow up now: If you configured your Scala bundle, such that the ScalaScriptEngineFactory class name is listed in the appropriate services file under META-INF, the Sling script resolver bundle will pick up the ScalaScriptEngineFactory from your new bundle and make it available immediately. There is nothing more to be done on your part. This is really what I like about OSGi: The framework provides features which alleviate you from regular error prone tasks like registrating a ScriptEngineFactory because it may just be picked up. You may now continue your testing by writing Scala scripts... Hope this helps. Regards Felix
