Hi,
I did first steps with Karaf EIK and found some issues regarding
configuration of the Karaf runtime:
a) I'd like to start multiple run configurations in Eclipse in parallel (to
be able to debug communication across a distributed system). Since this is
not productive use, I assumed that doing that with one Karaf installation
should not be a problem (it's not possible to have two active target
configurations at a time in Eclipse). However, the second configuration
started waits for the lock forever. It starts anyways, so this might only be
some cosmetics in karaf.log. I tried to pass -Dkaraf.lock=false as settings
for the run configuration, but such settings seem to be ngelected by Karaf
EIK. Setting karaf.lock = false in system.properties also didn't work.
Finally I exchanged lock(new Properties()); by lock(System.getProperties());
in the Karaf EIK LockManager.java, which resolved the lock problem since
then it takes the settings from system.properties.
Is there another way to achieve this, and is there a reason why the
LockManager uses a fresh properties object instead of using the ones read
from system.properties by the SystemPropertyLoader?
b) With the default start level set to 80, no bundles in the run
configuration with a start level higher than 80 are started. And they cannot
be started from the Karaf console in Eclipse (start <bundlenumber> just does
nothing). Setting org.osgi.framework.startlevel.beginning to whatever level
higher than 80 via run configuration settings (-D...) or in
config.properties does not help. Eventually, I have changed
equinoxProperties.put(OSGI_START_LEVEL_KEY, defaultStartLevel.toString());
in KarafLaunchConfigurationDelegate.java to
equinoxProperties.put(OSGI_START_LEVEL_KEY, "200"); Looks like this sets the
org.osgi.framework.startlevel.beginning value, and the original code uses
the default start level from the run configuration.
I know that these are "bloody changes", since I'm not really familiar with
the Karaf EIK internals. So also here the question: is there a better way to
achieve this. I also know that start levels are better not used in a clean
OSGi system, but in our project we are not yet fully "dynamized".
c) I'm using a custom Karaf distribution, with a number of bundles in an
additional repository located in the Karaf home folder, parallel to system.
I have added this as additional entry to
org.ops4j.pax.url.mvn.defaultRepositories
(file:${karaf.home}/myrepo@id=myid). Works perfectly when starting Karaf in
the usual way. However, when using this as directory for creation of an
Apache Karaf project in Eclipse with Karaf EIK, all bundles / features in
this repo are just neglected. I have not yet digged into the Karaf EIK code
to find the place where the resolution of the repositories should happen.
Currently I just move all the bundles to the system repo, then Karaf EIK
finds it. But anyways: is there a special trick to make Karaf EIK look for
bundles in additional repos added to
org.ops4j.pax.url.mvn.defaultRepositories?
Some additional facts: I'm using the latest version of Karaf EIK from
github, with Eclipse Luna SR1 and Karaf 3.0.2.
Cheers,
Jochen
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-EIK-how-to-configure-the-runtime-tp4037931.html
Sent from the Karaf - User mailing list archive at Nabble.com.