I am new to OSGI and felix but strongly considering moving to both and have some related questions about javax.scripting and OSGI services.
My situation: I am developing a web based framework with a service interface that can be implemented in java or in most JVM based languages that support the javax.scripting api in JDK 6. The app can be run standalone using an embedded webserver or inside a modern webserver such as Glassfish 3. Currently I use a homegrown plugin scheme with an xml file describe the service implementation module and a script file (f.x. *.rb for jruby) or jar file with the implementation. The plugin manager just scans the classpath and load all plugins in any language. I am currently exploring the possibility to move to a OSGI based platform and felix in particular since it is used by Glassfish also. Question: Moving to OSGI+Felix would give me some benefits regarding isolation+versioning but also complicate matters and apparently limit functionality I already have. Most importantly, I can't find any information about easily supporting scripting languages in OSGI modules (as implementers of services in particular). Easy is the key word as I would not expect f.x. jruby suppliers to know about OSGI and they would properly not like to deal with activators, osgi lifecycle, multithreading (*), jar files just etc. Also, for jruby I would like users just to be able to supply a *.rb file + an xml file + an osgi manifest file, so some kind of support for exploded "jars" with script code in it would be nice. Unfortunately, none of this seems to be supported directly by OSGi and/or Felix. I guess I could write some kind of bridge/proxy module in Java that delegates to the script code but then I would have collect scripts in one module and do my own custom scanning for scripts or have multiple instances which is not allowed in OSGI (both of which seems quite unattractive) ? (*) Ideally, I would like to force a single-threaded, restricted lifecycle running environment on the scripts. Any pointers/help much appreciated? /Morten Christensen --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

