felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Offermans (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4294) Dependency Manager Shell improvements
Date Sun, 27 Oct 2013 20:02:30 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13806445#comment-13806445
] 

Marcel Offermans commented on FELIX-4294:
-----------------------------------------

You're welcome. I remember that during a face to face meeting, Xander and I discussed some
other possible extensions he had as well. I'm sure he has some feedback on this as well. :)

> Dependency Manager Shell improvements
> -------------------------------------
>
>                 Key: FELIX-4294
>                 URL: https://issues.apache.org/jira/browse/FELIX-4294
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>    Affects Versions: dependencymanager-3.1.0
>            Reporter: Pierre De Rop
>            Assignee: Pierre De Rop
>            Priority: Minor
>
> This issue proposes two enhancements regarding the dependency manager shell.
> 1) display component names more consistently
> =====================================
> - some components are sometimes displayed with a "class " prefix, while others are not:
> class org.amdatu.multitenant.adapter.TenantAdapter registered
> org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=18)
registered
> For readability, the "class " could be just removed.
> - When a component does not contain any service properties, an empty "()" is displayed
after the component name
> pierre.multitenant.both.Both() registered
>  org.amdatu.multitenant.TenantLifeCycleListener(org.amdatu.tenant.binding=3) registered
> As in previous case and for readability, it makes sense to not append an empty "()" after
the component name, if it has no properties.
> 2) add "filter" and "nofilters" options for filter displayed components
> =====================================================
> By default, the  "dm"  shell command dumps all components. But sometimes, it is desirable
to display a subset of all components, 
> using a regular expression on the component name or on the component service properties.
> We can of course do this using gogo shell "grep", but the problem is that we may miss
some important informations, like the component bundle id, or the component dependencies.
> As an example, let's assume we are using the AMDATU mutli-tenancy framework. With AMDATU
MT, many internal AMDATU components are instantiated behind the scene for a given tenant bundle.
> In the following example, we have three tenant bundles, and if we type "dm", then we
are getting a long list of components, including:
>   - application tenant components: pierre.multitenant.*
>   - some internal amdatu mt components (org.amdatu.multitenant.*):
> g! dm
> [2] org.amdatu.multitenant.conf
>   org.osgi.service.cm.ManagedServiceFactory(service.pid=org.amdatu.tenant.factory) registered
>     org.amdatu.multitenant.TenantFactoryConfiguration service required available
>     org.osgi.service.log.LogService service optional available
> [3] org.amdatu.multitenant.factory
>   org.amdatu.multitenant.TenantFactoryConfiguration() registered
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.TenantLifeCycleListener service optional available
>   org.amdatu.multitenant.Tenant(service.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee,org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee,service.factoryPid=org.amdatu.tenant.factory,org.amdatu.tenant.name=bar2,felix.fileinstall.filename=file:/home/nxuser/work/osgi/amdatu/felix-framework-4.2.1/load/org.amdatu.tenant.factory-2.cfg,foo=bar)
registered
>   org.amdatu.multitenant.Tenant(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,org.amdatu.tenant.name=Platform
Tenant) registered
>   org.amdatu.multitenant.Tenant(service.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c,org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c,service.factoryPid=org.amdatu.tenant.factory,felix.fileinstall.filename=file:/home/nxuser/work/osgi/amdatu/felix-framework-4.2.1/load/org.amdatu.tenant.factory-1.cfg,foo=bar2)
registered
> [5] org.amdatu.multitenant.org.apache.felix.dependencymanager.runtime
>   class org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>     org.osgi.service.log.LogService service optional unavailable
>     active (DependencyManager-Component=*) bundle optional unavailable
>   org.amdatu.multitenant.TenantLifeCycleListener(org.amdatu.tenant.binding=3) registered
>   Adapter for interface org.amdatu.multitenant.Tenant registered
>     org.amdatu.multitenant.Tenant service optional available
>     org.osgi.service.log.LogService service optional available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=32)(org.apache.felix.dependencymanager.aspect=32))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee)(bundle.id=5))
service required available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=33)(org.apache.felix.dependencymanager.aspect=33))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)(bundle.id=5))
service required available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=34)(org.apache.felix.dependencymanager.aspect=34))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c)(bundle.id=5))
service required available
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee,bundle.id=5)
registered
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=5)
registered
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c,bundle.id=5)
registered
>   class org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>     org.osgi.service.log.LogService service optional unavailable
>     active (DependencyManager-Component=*) bundle optional unavailable
>   class org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>     org.osgi.service.log.LogService service optional unavailable
>     active (DependencyManager-Component=*) bundle optional unavailable
> [16] pierre.multitenant.tenant
>   pierre.multitenant.tenant.Tenant2() registered
>   class pierre.multitenant.tenant.Tenant1 registered
>     pierre.multitenant.tenant.Tenant2 service required available
>     org.osgi.service.log.LogService service required available
>     pierre.multitenant.both.Both service required available
>     pierre.multitenant.platform.Platform service required available
>   pierre.multitenant.tenant.Tenant2() registered
>   class pierre.multitenant.tenant.Tenant1 registered
>     pierre.multitenant.tenant.Tenant2 service required available
>     org.osgi.service.log.LogService service required available
>     pierre.multitenant.both.Both service required available
>     pierre.multitenant.platform.Platform service required available
>   org.amdatu.multitenant.TenantLifeCycleListener(org.amdatu.tenant.binding=2) registered
>   Adapter for interface org.amdatu.multitenant.Tenant with filter (!(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM))
registered
>     org.amdatu.multitenant.Tenant (!(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM))
service optional available
>     org.osgi.service.log.LogService service optional available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=32)(org.apache.felix.dependencymanager.aspect=32))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee)(bundle.id=16))
service required available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=34)(org.apache.felix.dependencymanager.aspect=34))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c)(bundle.id=16))
service required available
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee,bundle.id=16)
registered
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c,bundle.id=16)
registered
> [17] pierre.multitenant.platform
>   org.amdatu.multitenant.TenantLifeCycleListener(org.amdatu.tenant.binding=1) registered
>   Adapter for interface org.amdatu.multitenant.Tenant with filter (org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)
registered
>     org.amdatu.multitenant.Tenant (org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)
service optional available
>     org.osgi.service.log.LogService service optional available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=33)(org.apache.felix.dependencymanager.aspect=33))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)(bundle.id=17))
service required available
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=17)
registered
>   pierre.multitenant.platform.Platform() registered
>     org.osgi.service.log.LogService service required available
>     pierre.multitenant.both.Both service required available
> [18] pierre.multitenant.both
>   pierre.multitenant.both.Both() registered
>   org.amdatu.multitenant.TenantLifeCycleListener(org.amdatu.tenant.binding=3) registered
>   Adapter for interface org.amdatu.multitenant.Tenant registered
>     org.amdatu.multitenant.Tenant service optional available
>     org.osgi.service.log.LogService service optional available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=32)(org.apache.felix.dependencymanager.aspect=32))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee)(bundle.id=18))
service required available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=33)(org.apache.felix.dependencymanager.aspect=33))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)(bundle.id=18))
service required available
>   class org.amdatu.multitenant.adapter.TenantAdapter registered
>     org.amdatu.multitenant.Tenant (|(service.id=34)(org.apache.felix.dependencymanager.aspect=34))
service required available
>     org.osgi.service.log.LogService service optional available
>     org.amdatu.multitenant.adapter.BundleDataStore (&(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c)(bundle.id=18))
service required available
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.91a788f0-da4f-405d-a643-b220f4b2bcee,bundle.id=18)
registered
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=18)
registered
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.factory.f4d53487-5a51-480c-9f67-ba64d657986c,bundle.id=18)
registered
>   pierre.multitenant.both.Both() registered
>   pierre.multitenant.both.Both() registered
> So, what we would like to do is to be able to filter the displayed components with a
new filter option.
> For example: To display only the application components matching "pierre.multitenant.*:
> g! dm filter pierre.multitenant.*
> Current component filters:[pierre.multitenant.*]
> g! dm
> [16] pierre.multitenant.tenant
>   pierre.multitenant.tenant.Tenant2() registered
>   pierre.multitenant.tenant.Tenant2() registered
> [17] pierre.multitenant.platform
>   pierre.multitenant.platform.Platform() registered
>     org.osgi.service.log.LogService service required available
>     pierre.multitenant.both.Both service required available
> [18] pierre.multitenant.both
>   pierre.multitenant.both.Both() registered
>   pierre.multitenant.both.Both() registered
>   pierre.multitenant.both.Both() registered
> To display all PLATFORM tenants:
> g! dm nofilters
> g! dm filter .*pid=org.amdatu.tenant.PLATFORM.*
> g! dm
> [3] org.amdatu.multitenant.factory
>   org.amdatu.multitenant.Tenant(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,org.amdatu.tenant.name=Platform
Tenant) registered
> [5] org.amdatu.multitenant.org.apache.felix.dependencymanager.runtime
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=5)
registered
> [16] pierre.multitenant.tenant
>   Adapter for interface org.amdatu.multitenant.Tenant with filter (!(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM))
registered
>     org.amdatu.multitenant.Tenant (!(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM))
service optional available
>     org.osgi.service.log.LogService service optional available
> [17] pierre.multitenant.platform
>   Adapter for interface org.amdatu.multitenant.Tenant with filter (org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)
registered
>     org.amdatu.multitenant.Tenant (org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM)
service optional available
>     org.osgi.service.log.LogService service optional available
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=17)
registered
> [18] pierre.multitenant.both
>   org.amdatu.multitenant.adapter.BundleDataStore(org.amdatu.tenant.pid=org.amdatu.tenant.PLATFORM,bundle.id=18)
registered
> To display every components except any components having the service property "org.amdatu.tenant.name=bar2":
> g! dm nofilters
> g! dm filter !.*org.amdatu.tenant.name=bar2.*
> - Filters are cumulative: you can call "dm filter XXX" multiple times and each filter
can have multiple regex (space separated).
> - Components are displayed only if their name or their service properties are matching
at least one of the the specified filter.
> - Filters can be negated, using the special "!" prefix.
> - "dm filter" without any arguments just displays the current filters.
> - "dm nofilters" disable every previously added filter.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message