felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-1547) OS shell level admin commands for Karaf
Date Wed, 02 Sep 2009 13:18:32 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

David Bosschaert updated FELIX-1547:

    Attachment: karaf-admin-1.patch

The attached patch takes a generic approach reusing the commands already in the org.apache.felix.karaf.gshell.admin.internal.commands

It also adds a batch script (currently only a Windows one, will work on a Unix one) the kit:

Example use:
> karaf-admin
Available commands:
  create - Create a new instance.
  destroy - Destroy an existing instance.
  list - List existing instances.
Type 'command --help' for more help on the specified command.

> karaf-admin create my_inst1
... creates the instance ...

There are two other modifications:
  AdminServiceImpl.java calls ClassLoader.getResourceAsStream("/..."); // leading slash
This doesn't work on a non-OSGi classloader. The Java API docs only specify the leading slash
on Class.getResource() not on ClassLoader.getResource() so I removed the leading slash.
(This could also be fixed by changing the code to getClass().getResourceAsStream(...))

I made the BlueprintCommand.BlueprintActionPreparator inner class public. This isnt pretty,
but it allowed me to reuse the help text generator in there. I'm open to further suggestions.

This is just an initial patch to see if people agree with the general direction. I will provide
an additional patch with unit tests and a unix version of the script.

> OS shell level admin commands for Karaf
> ---------------------------------------
>                 Key: FELIX-1547
>                 URL: https://issues.apache.org/jira/browse/FELIX-1547
>             Project: Felix
>          Issue Type: New Feature
>          Components: Karaf
>    Affects Versions: karaf-1.0.0
>            Reporter: David Bosschaert
>         Attachments: karaf-admin-1.patch
> Karaf has admin commands to create new instances from within its shell. Examples are
>   admin:create
>   admin:list
>   admin:start
> etc...
> It would be good if (some of) these commands were available from the OS-level command
line - outside of the Karaf container.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message