Hi Christian,
The idea is interesting.
I implemented the OSGI-INF/bundle.info support, but I'm afraid is not
heavily users/useful, so any way to provide more useful information is
valuable.
Even if I think that using an OSGi service for information could
"perturb" some users, I like the idea. However, I think that the
interface should be richer, providing generic ValueObject or so
(something similar to JMX CompositeData/TabularData).
Regards
JB
On 12/21/2011 05:59 PM, Christian Schneider wrote:
Hi all,
I just had an idea how we could improve the features:info and
bundles:info commands.
Currently we only write static informations. How about having a service
interface a bundle can register to offer some informations about its
inner workings.
A feature could then name the bundle that returns this information.
So for example for the http feature this service could return the port
number and the list of servlets it manages with their informations.
Like that:
=====================================================
features:info http
Description of http 2.2.4 feature
----------------------------------------------------------------
Feature configuration:
org.ops4j.pax.web
Feature configuration files:
/etc/jetty.xml
Feature depends on:
jetty [7.0,8.0)
Feature contains followed bundles:
mvn:org.ops4j.pax.web/pax-web-api/1.0.7
mvn:org.ops4j.pax.web/pax-web-spi/1.0.7
mvn:org.ops4j.pax.web/pax-web-runtime/1.0.7
mvn:org.ops4j.pax.web/pax-web-jetty/1.0.7
-----------------------------------------------------------------
Port: 8181
Managed Servlets:
| alias | bundle id |
| /system/console | 12 |
=====================================================
User bundles could provide their custom informations too.
The service interface could look like this:
public interface BundleInformationService {
String getInfoString();
}
We could then also provide this information in the bundle and feature
mbeans.
Christian
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com