Try "osgi:install --help".
There is a "-s" option to start the bundle.

On Fri, Sep 25, 2009 at 13:34, Charles Moulliard <[email protected]> wrote:
> I have discovered something strange. I have deployed a new bundle and
> this one was not started immediately. To start it, I was oblige to use
> command osgi:start
>
> Here is a copy/paste of what I have done in karaf
>
> 1) Try to install camel-web
>
> ka...@root> osgi:install
> war:mvn:org.apache.camel/camel-web-standalone/2.1-SNAPSHOT/war
> java.net.MalformedURLException: Unknown protocol: war
> ka...@root> osgi:list | grep Pax
> [  25] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - API (1.4)
> [  26] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - Service (1.4)
> [  27] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> mvn: (1.0.0)
> [  28] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> wrap: (1.0.0)
> [  35] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
> Web Container (0.6.0)
> [  69] [Active     ] [            ] [       ] [   60] OPS4J Pax Web
> Extender - WAR (0.5.1)
>
> I Can't install it as pax-utl-war bundle is not deployed
>
> 2) Install Pax Url War
>
> ka...@root> install mvn:org.ops4j.pax.url/pax-url-war/1.0.0
> Bundle ID: 115
>
> 3) Try to install camel-web
>
> ka...@root> osgi:install
> war:mvn:org.apache.camel/camel-web-standalone/2.1-SNAPSHOT/war
> java.net.MalformedURLException: Unknown protocol: war
>
> 3) Check bundle status
>
> ka...@root> osgi:list | grep Pax
> [  25] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - API (1.4)
> [  26] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - Service (1.4)
> [  27] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> mvn: (1.0.0)
> [  28] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> wrap: (1.0.0)
> [  35] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
> Web Container (0.6.0)
> [  69] [Active     ] [            ] [       ] [   60] OPS4J Pax Web
> Extender - WAR (0.5.1)
> [ 115] [Resolved   ] [            ] [       ] [   60] OPS4J Pax Url -
> war:, war-i: (1.0.0)
>
> After deployment, the status of this bundle was RESOLVED and not Active
>
> 4) Start the bundle
> ka...@root> osgi:start 115
> ka...@root> osgi:list | grep Pax
> [  25] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - API (1.4)
> [  26] [Active     ] [            ] [       ] [    8] OPS4J Pax
> Logging - Service (1.4)
> [  27] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> mvn: (1.0.0)
> [  28] [Active     ] [            ] [       ] [    5] OPS4J Pax Url -
> wrap: (1.0.0)
> [  35] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
> Web Container (0.6.0)
> [  69] [Active     ] [            ] [       ] [   60] OPS4J Pax Web
> Extender - WAR (0.5.1)
> [ 115] [Active     ] [            ] [       ] [   60] OPS4J Pax Url -
> war:, war-i: (1.0.0)
>
> 5) Deploy camel-web
>
> ka...@root> osgi:install
> war:mvn:org.apache.camel/camel-web-standalone/2.1-SNAPSHOT/war
>
>
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to