On 08 Feb 2014, at 4:46 am, Derek Abdine <[email protected]> wrote:
> Hello! I’m building an extension platform using OSGi that will enable an
> individual to write a ruby script and stick it in a predefined location (say,
> /META-INF/foo/script.rb). I’d like to create a workflow that essentially:
> Has a factory that watches for new bundles with a script in that location.
> Creates a new managed service via the config admin that initializes a jruby
> runtime for that script and sticks it into the OSGi service registry.
> That actually all works to this point, though I have one issue: I’d like the
> service that is created by the factory on behalf of the script bundle to act
> as if it were part of the script bundle, not the factory bundle as it
> currently stands. This is because I’d like to eventually take advantage of
> some of the Java security features of OSGi to prevent calls to System.exit,
> etc.
That service then has to be created using the BundleContext of the bundle that
has the script.
> If it helps, I’m using ipojo 1.11.1 as my DI framework and Felix 4.2.1 as my
> platform.
I'm going to have to let one of the iPOJO experts explain you how to do this.
> Any pointers would be much appreciated! Thanks in advance!
If you're interested, I could show you an example of how to do this using the
Dependency Manager.
Greetings, Marcel
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev