Hi Abdellatif,
Yes, you can change the start level of a bundle:
osgi:start-level allows you to set the system start level (not for a
specific bundle).
osgi:bundle-level set the start level of a bundle. BUT, you made a
mistake in the argument order:
karaf@root> osgi:bundle-level --help
DESCRIPTION
osgi:bundle-level
Gets or sets the start level of a given bundle.
SYNTAX
osgi:bundle-level [options] id [startLevel]
ARGUMENTS
id
The bundle ID
startLevel
The bundle's new start level
OPTIONS
--help
Display this help message
--force
Forces the command to execute
The first argument is the bundle ID and the second one is the startLevel.
So in your case, you should use:
osgi:bundle-level 170 70
I tested it:
karaf@root> osgi:bundle-level 49
Level 30
karaf@root> osgi:bundle-level 49 60
karaf@root> osgi:bundle-level 49
Level 60
So it works ;)
Regards
JB
On 09/19/2012 12:08 PM, a_bouchama wrote:
Hello,
Is it possible to install a bundle and set it his start level ? Is it
possible to change the start level for a bundle already installed ?
I have tried this:
I have tried this :
+ First case : Install a bundle and set his start level: --> (it doesn't
work)
{code}
karaf@root> osgi:start-level 90
karaf@root> osgi:start-level
Level 90
karaf@root> osgi:install mvn:com.eurofins/camel-smoke-test/2.0.0
Bundle ID: 170
karaf@root> osgi:list | grep 170
[ 170] [Installed ] [ ] [ ] [ 80] CORE ::
camel_smoke_test (2.0.0)
{code}
+ Second case : change the start level for a bundle already installed: : -->
(it doesn't work)
{code}
karaf@root> osgi:list | grep 170
[ 170] [Installed ] [ ] [ ] [ 80] CORE ::
camel_smoke_test (2.0.0)
karaf@root> osgi:bundle-level 70 170
karaf@root> osgi:list | grep 170
[ 170] [Installed ] [ ] [ ] [ 80] CORE ::
camel_smoke_test (2.0.0)
{code}
Regards,
Abdellatif
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-How-to-change-or-set-the-start-level-for-a-bundle-tp4026080.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com