Felix,
Thanks for the pointers. Your run-down basically worked, ServiceMix
Kernel was missing a few additional Felix bundles (like event admin and
some of the commons stuff). I did have to remove the LogService bundles
a few times, because it was installed together with other bundles and
ServiceMix Kernel already has a LogService about. Is this just 'part of
the game' or is there anything I can change to ServiceMix Kernel to
solve this in the future (or provide a patch for it in Sling off course)?
Secondly, is there any documentation about on writing the ESP pages?
For now, I always go and take a look at the ScriptableXxxYyy classes to
figure out my options.
Another ESP question: is there a way to get only a limited number of
children of a given node? For my ServiceMix monitoring solution, I
would prefer to get only the last 50 or so MessageExchanges on the list
by default. If a user requires older logging, he should be able to look
it up afterwards, but for now a limited list would do fine.
Finally, I'm using the JCR-RMI API to store MessageExchange information
in the JCR, but I suppose I can do it more directly since they are both
running on the same VM. Haven't been able to find a code example for
how to get a reference to the Repository instance however, although
there probably is an example somewhere in the source code. Any idea
where I can look?
Gert
Felix Meschberger wrote:
Hi Gert,
There are multiple options, yet this one is based on OBR:
To make it easy to use the OBR for installation, you might want to use
the sling console, which lists bundles available from the OBR and you
may just select those that you require. So lets start with the sling
console.
(1) Install the Sling Log Bundle unless you already have the OSGi
LogService, SLF4J and Jakarta Commons Logging already available for
Import-Package: Use the SMX kernel methods to install this from your
local maven repository or from the osgi/log target folder.
(2) Install the Jakarte commons-io 1.4 bundle - as of Version 1.4 the
library is built as an OSGi bundle and may be deployed as-is
(3) Deploy the Apache Felix Bundle Repository bundle
(4) Deploy the Sling Assembly bundle - this is currently needed for OBR
support in the console
(6) If the SMX kernel does not provide an HttpService implementation,
grab the Pax Web Service from
http://wiki.ops4j.org/confluence/display/ops4j/Pax+Web and deploy it
using the SMX kernel methods.
(7) Install the sling console: Same as for the log bundle, use the SMX
kernel methods.
Now, the Sling Console should be starting up and be available as /sling.
Next step is to point the Sling Console OSGi Repositories page to your
local maven repository, provided you installed all sling bundles there.
This is the URL to add the repository
http://localhost:8080/sling/bundlerepo?action=refreshOBR&repository=file://${M2_REPO}/repository.xml
where ${M2_REPO} is the path to your local maven repository, e.g.
${HOME}/.m2/repository and assuming the smx system is available at
localhost:8080.
Now you should be able to select the bundles you want ...
Hope this helps, but I have to admit, that this is a pure theoretical
run-down ;-)
Regards
Felix
Am Mittwoch, den 12.03.2008, 17:01 +0100 schrieb Gert Vanthienen:
L.S.,
I'm trying to get Sling to run inside the ServiceMix 4 Kernel by looking
at a running Sling /console to determine the list of bundles and
manually copying them to SMX4 Kernel's deploy directory. Isn't there a
more convenient way to deploy this, e.g. using an OBR/Maven repository
and auto-downloading the dependencies?
Gert