Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-05 Thread Guillaume Nodet
On of the reason is that there's no 1-1 mapping between a component and an
instance, especially when dealing with factories.

2017-10-04 20:12 GMT+02:00 J. Brebec :

> The component name and the status of its instances are not on the same
> line (satisfied, activated, etc). you can't with a grep command find all
> components unsatisfied, or all the components active with the same
> package/prefix..
>
>
> On 2017-10-04 19:30, David Jencks  wrote:
> > +1000 for removing the duplicated commands :-)
> >
> > Does using grep for lines not starting with space give you what you are
> interested in? The data shown is a tree and presenting it flat would
> conceal this and duplicate information.
> >
> > Thanks
> > David Jencks
> >
> > Sent from my iPhone
> >
> > > On Oct 4, 2017, at 9:03 AM, J. Brebec 
> wrote:
> > >
> > > Hello,
> > >
> > > The only thing I personnaly dislikes in the default "scr:list" command
> is that the output is on multiple lines for each component : It's hard to
> read when there is a lot of components, and it's not possible to use "grep"
> > >
> > > Regards,
> > > Jérémie
> > >
> > >> On 2017-10-04 11:02, Guillaume Nodet  wrote:
> > >> I'm working on KARAF-4785
> > >>  and
> > >> I've already fixed the completion of the native scr commands.  This
> means
> > >> that we'll have some kind of duplication of all scr commands.  Kind
> of,
> > >> because even though they are similar, the output is different.  The
> native
> > >> commands provide a deeper view of the SCR components.
> > >>
> > >> So, should I go ahead and just remove the Karaf specific commands ?
> > >>
> > >> Below is the output of the native commands and then the karaf
> commands...
> > >>
> > >> Cheers,
> > >> Guillaume
> > >>
> > >> *karaf*@root()> scr:list
> > >>
> > >> BundleId Component Name Default State
> > >>
> > >>Component Id State  PIDs (Factory PID)
> > >>
> > >> [  38]   ScrServiceMBean  enabled
> > >>
> > >>[   4] [active  ]
> > >>
> > >> [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled
> > >>
> > >>[   3] [active  ]
> > >>
> > >> [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService
> enabled
> > >>
> > >>[   5] [active  ]
> > >>
> > >> *karaf*@root()> scr:info org.ops4j.pax.web.deployer.
> internal.WarDeployer
> > >>
> > >>
> > >>
> > >> *** Bundle: org.ops4j.pax.web.pax-web-deployer (145)
> > >>
> > >> Component Description:
> > >>
> > >>  Name: org.ops4j.pax.web.deployer.internal.WarDeployer
> > >>
> > >>  Implementation Class: org.ops4j.pax.web.deployer.
> internal.WarDeployer
> > >>
> > >>  Default State: enabled
> > >>
> > >>  Activation: delayed
> > >>
> > >>  Configuration Policy: optional
> > >>
> > >>  Activate Method: activate
> > >>
> > >>  Deactivate Method: deactivate
> > >>
> > >>  Modified Method: -
> > >>
> > >>  Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]
> > >>
> > >>  Services:
> > >>
> > >>org.apache.felix.fileinstall.ArtifactUrlTransformer
> > >>
> > >>  Service Scope: singleton
> > >>
> > >>  Component Description Properties:
> > >>
> > >>  Component Configuration:
> > >>
> > >>ComponentId: 3
> > >>
> > >>State: active
> > >>
> > >>Component Configuration Properties:
> > >>
> > >>component.id = 3
> > >>
> > >>component.name = org.ops4j.pax.web.deployer.
> internal.WarDeployer
> > >>
> > >>
> > >> *karaf*@root()> scr:components
> > >>
> > >> ID │ State  │ Component Name
> > >>
> > >> ───┼┼
> > >>
> > >> 3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer
> > >>
> > >> 5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService
> > >>
> > >> *karaf*@root()> scr:details org.ops4j.pax.web.deployer.
> internal.WarDeployer
> > >>
> > >> *Component Details*
> > >>
> > >> *  Name: *org.ops4j.pax.web.deployer.
> internal.WarDeployer
> > >>
> > >> *  State   : *ACTIVE
> > >>
> > >> *References*
> > >>
> > >> *karaf*@root()>
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >> 
> > >> Guillaume Nodet
> > >>
> >
> >
> > .
> >
>



-- 

Guillaume Nodet


Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread J. Brebec
The component name and the status of its instances are not on the same line 
(satisfied, activated, etc). you can't with a grep command find all components 
unsatisfied, or all the components active with the same package/prefix..
 

On 2017-10-04 19:30, David Jencks  wrote: 
> +1000 for removing the duplicated commands :-)
> 
> Does using grep for lines not starting with space give you what you are 
> interested in? The data shown is a tree and presenting it flat would conceal 
> this and duplicate information.
> 
> Thanks
> David Jencks
> 
> Sent from my iPhone
> 
> > On Oct 4, 2017, at 9:03 AM, J. Brebec  wrote:
> > 
> > Hello,
> > 
> > The only thing I personnaly dislikes in the default "scr:list" command is 
> > that the output is on multiple lines for each component : It's hard to read 
> > when there is a lot of components, and it's not possible to use "grep"
> > 
> > Regards,
> > Jérémie
> > 
> >> On 2017-10-04 11:02, Guillaume Nodet  wrote: 
> >> I'm working on KARAF-4785
> >>  and
> >> I've already fixed the completion of the native scr commands.  This means
> >> that we'll have some kind of duplication of all scr commands.  Kind of,
> >> because even though they are similar, the output is different.  The native
> >> commands provide a deeper view of the SCR components.
> >> 
> >> So, should I go ahead and just remove the Karaf specific commands ?
> >> 
> >> Below is the output of the native commands and then the karaf commands...
> >> 
> >> Cheers,
> >> Guillaume
> >> 
> >> *karaf*@root()> scr:list
> >> 
> >> BundleId Component Name Default State
> >> 
> >>Component Id State  PIDs (Factory PID)
> >> 
> >> [  38]   ScrServiceMBean  enabled
> >> 
> >>[   4] [active  ]
> >> 
> >> [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled
> >> 
> >>[   3] [active  ]
> >> 
> >> [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService  enabled
> >> 
> >>[   5] [active  ]
> >> 
> >> *karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >> 
> >> 
> >> *** Bundle: org.ops4j.pax.web.pax-web-deployer (145)
> >> 
> >> Component Description:
> >> 
> >>  Name: org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >>  Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >>  Default State: enabled
> >> 
> >>  Activation: delayed
> >> 
> >>  Configuration Policy: optional
> >> 
> >>  Activate Method: activate
> >> 
> >>  Deactivate Method: deactivate
> >> 
> >>  Modified Method: -
> >> 
> >>  Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]
> >> 
> >>  Services:
> >> 
> >>org.apache.felix.fileinstall.ArtifactUrlTransformer
> >> 
> >>  Service Scope: singleton
> >> 
> >>  Component Description Properties:
> >> 
> >>  Component Configuration:
> >> 
> >>ComponentId: 3
> >> 
> >>State: active
> >> 
> >>Component Configuration Properties:
> >> 
> >>component.id = 3
> >> 
> >>component.name = org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >> 
> >> *karaf*@root()> scr:components
> >> 
> >> ID │ State  │ Component Name
> >> 
> >> ───┼────────┼────────────────────────────────────────────────────────
> >> 
> >> 3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >> 5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService
> >> 
> >> *karaf*@root()> scr:details org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >> *Component Details*
> >> 
> >> *  Name: *org.ops4j.pax.web.deployer.internal.WarDeployer
> >> 
> >> *  State   : *ACTIVE
> >> 
> >> *References*
> >> 
> >> *karaf*@root()>
> >> 
> >> 
> >> 
> >> 
> >> -- 
> >> 
> >> Guillaume Nodet
> >> 
> 
> 
> .
> 


Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread J. Brebec
Hello,

The only thing I personnaly dislikes in the default "scr:list" command is that 
the output is on multiple lines for each component : It's hard to read when 
there is a lot of components, and it's not possible to use "grep"

Regards,
Jérémie

On 2017-10-04 11:02, Guillaume Nodet  wrote: 
> I'm working on KARAF-4785
>  and
> I've already fixed the completion of the native scr commands.  This means
> that we'll have some kind of duplication of all scr commands.  Kind of,
> because even though they are similar, the output is different.  The native
> commands provide a deeper view of the SCR components.
> 
> So, should I go ahead and just remove the Karaf specific commands ?
> 
> Below is the output of the native commands and then the karaf commands...
> 
> Cheers,
> Guillaume
> 
> *karaf*@root()> scr:list
> 
>  BundleId Component Name Default State
> 
> Component Id State  PIDs (Factory PID)
> 
>  [  38]   ScrServiceMBean  enabled
> 
> [   4] [active  ]
> 
>  [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled
> 
> [   3] [active  ]
> 
>  [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService  enabled
> 
> [   5] [active  ]
> 
> *karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer
> 
> 
> 
> *** Bundle: org.ops4j.pax.web.pax-web-deployer (145)
> 
> Component Description:
> 
>   Name: org.ops4j.pax.web.deployer.internal.WarDeployer
> 
>   Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer
> 
>   Default State: enabled
> 
>   Activation: delayed
> 
>   Configuration Policy: optional
> 
>   Activate Method: activate
> 
>   Deactivate Method: deactivate
> 
>   Modified Method: -
> 
>   Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]
> 
>   Services:
> 
> org.apache.felix.fileinstall.ArtifactUrlTransformer
> 
>   Service Scope: singleton
> 
>   Component Description Properties:
> 
>   Component Configuration:
> 
> ComponentId: 3
> 
> State: active
> 
> Component Configuration Properties:
> 
> component.id = 3
> 
> component.name = org.ops4j.pax.web.deployer.internal.WarDeployer
> 
> 
> *karaf*@root()> scr:components
> 
> ID │ State  │ Component Name
> 
> ───┼────────┼────────────────────────────────────────────────────────
> 
> 3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer
> 
> 5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService
> 
> *karaf*@root()> scr:details org.ops4j.pax.web.deployer.internal.WarDeployer
> 
> *Component Details*
> 
> *  Name: *org.ops4j.pax.web.deployer.internal.WarDeployer
> 
> *  State   : *ACTIVE
> 
> *References*
> 
> *karaf*@root()>
> 
> 
> 
> 
> -- 
> 
> Guillaume Nodet
> 


Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread Jean-Baptiste Onofré

+1

We have the same for some other commands. For instance shell:watch has an 
implementation in Karaf but also in jline. I would also propose to keep only the 
jline commands.


Regards
JB

On 10/04/2017 11:02 AM, Guillaume Nodet wrote:

I'm working on KARAF-4785
 and
I've already fixed the completion of the native scr commands.  This means
that we'll have some kind of duplication of all scr commands.  Kind of,
because even though they are similar, the output is different.  The native
commands provide a deeper view of the SCR components.

So, should I go ahead and just remove the Karaf specific commands ?

Below is the output of the native commands and then the karaf commands...

Cheers,
Guillaume

*karaf*@root()> scr:list

  BundleId Component Name Default State

 Component Id State  PIDs (Factory PID)

  [  38]   ScrServiceMBean  enabled

 [   4] [active  ]

  [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled

 [   3] [active  ]

  [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService  enabled

 [   5] [active  ]

*karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer



*** Bundle: org.ops4j.pax.web.pax-web-deployer (145)

Component Description:

   Name: org.ops4j.pax.web.deployer.internal.WarDeployer

   Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer

   Default State: enabled

   Activation: delayed

   Configuration Policy: optional

   Activate Method: activate

   Deactivate Method: deactivate

   Modified Method: -

   Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]

   Services:

 org.apache.felix.fileinstall.ArtifactUrlTransformer

   Service Scope: singleton

   Component Description Properties:

   Component Configuration:

 ComponentId: 3

 State: active

 Component Configuration Properties:

 component.id = 3

 component.name = org.ops4j.pax.web.deployer.internal.WarDeployer


*karaf*@root()> scr:components

ID │ State  │ Component Name

───┼┼

3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer

5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService

*karaf*@root()> scr:details org.ops4j.pax.web.deployer.internal.WarDeployer

*Component Details*

*  Name: *org.ops4j.pax.web.deployer.internal.WarDeployer

*  State   : *ACTIVE

*References*

*karaf*@root()>






--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread Achim Nierbeck
+1 for removing the duplicated commands :)

2017-10-04 11:04 GMT+02:00 Christian Schneider :

> +1
>
> Christian
>
> 2017-10-04 11:02 GMT+02:00 Guillaume Nodet :
>
> > I'm working on KARAF-4785
> >  and
> > I've already fixed the completion of the native scr commands.  This means
> > that we'll have some kind of duplication of all scr commands.  Kind of,
> > because even though they are similar, the output is different.  The
> native
> > commands provide a deeper view of the SCR components.
> >
> > So, should I go ahead and just remove the Karaf specific commands ?
> >
> > Below is the output of the native commands and then the karaf commands...
> >
> > Cheers,
> > Guillaume
> >
> > *karaf*@root()> scr:list
> >
> >  BundleId Component Name Default State
> >
> > Component Id State  PIDs (Factory PID)
> >
> >  [  38]   ScrServiceMBean  enabled
> >
> > [   4] [active  ]
> >
> >  [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled
> >
> > [   3] [active  ]
> >
> >  [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService
> enabled
> >
> > [   5] [active  ]
> >
> > *karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer
> >
> >
> >
> > *** Bundle: org.ops4j.pax.web.pax-web-deployer (145)
> >
> > Component Description:
> >
> >   Name: org.ops4j.pax.web.deployer.internal.WarDeployer
> >
> >   Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer
> >
> >   Default State: enabled
> >
> >   Activation: delayed
> >
> >   Configuration Policy: optional
> >
> >   Activate Method: activate
> >
> >   Deactivate Method: deactivate
> >
> >   Modified Method: -
> >
> >   Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]
> >
> >   Services:
> >
> > org.apache.felix.fileinstall.ArtifactUrlTransformer
> >
> >   Service Scope: singleton
> >
> >   Component Description Properties:
> >
> >   Component Configuration:
> >
> > ComponentId: 3
> >
> > State: active
> >
> > Component Configuration Properties:
> >
> > component.id = 3
> >
> > component.name = org.ops4j.pax.web.deployer.internal.WarDeployer
> >
> >
> > *karaf*@root()> scr:components
> >
> > ID │ State  │ Component Name
> >
> > ───┼┼
> >
> > 3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer
> >
> > 5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService
> >
> > *karaf*@root()> scr:details org.ops4j.pax.web.deployer.
> > internal.WarDeployer
> >
> > *Component Details*
> >
> > *  Name: *org.ops4j.pax.web.deployer.
> internal.WarDeployer
> >
> > *  State   : *ACTIVE
> >
> > *References*
> >
> > *karaf*@root()>
> >
> >
> >
> >
> > --
> > 
> > Guillaume Nodet
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>  46=http%3a%2f%2fwww.liquid-reality.de>
>
> Computer Scientist
> http://www.adobe.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: [DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread Christian Schneider
+1

Christian

2017-10-04 11:02 GMT+02:00 Guillaume Nodet :

> I'm working on KARAF-4785
>  and
> I've already fixed the completion of the native scr commands.  This means
> that we'll have some kind of duplication of all scr commands.  Kind of,
> because even though they are similar, the output is different.  The native
> commands provide a deeper view of the SCR components.
>
> So, should I go ahead and just remove the Karaf specific commands ?
>
> Below is the output of the native commands and then the karaf commands...
>
> Cheers,
> Guillaume
>
> *karaf*@root()> scr:list
>
>  BundleId Component Name Default State
>
> Component Id State  PIDs (Factory PID)
>
>  [  38]   ScrServiceMBean  enabled
>
> [   4] [active  ]
>
>  [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled
>
> [   3] [active  ]
>
>  [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService  enabled
>
> [   5] [active  ]
>
> *karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer
>
>
>
> *** Bundle: org.ops4j.pax.web.pax-web-deployer (145)
>
> Component Description:
>
>   Name: org.ops4j.pax.web.deployer.internal.WarDeployer
>
>   Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer
>
>   Default State: enabled
>
>   Activation: delayed
>
>   Configuration Policy: optional
>
>   Activate Method: activate
>
>   Deactivate Method: deactivate
>
>   Modified Method: -
>
>   Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]
>
>   Services:
>
> org.apache.felix.fileinstall.ArtifactUrlTransformer
>
>   Service Scope: singleton
>
>   Component Description Properties:
>
>   Component Configuration:
>
> ComponentId: 3
>
> State: active
>
> Component Configuration Properties:
>
> component.id = 3
>
> component.name = org.ops4j.pax.web.deployer.internal.WarDeployer
>
>
> *karaf*@root()> scr:components
>
> ID │ State  │ Component Name
>
> ───┼┼
>
> 3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer
>
> 5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService
>
> *karaf*@root()> scr:details org.ops4j.pax.web.deployer.
> internal.WarDeployer
>
> *Component Details*
>
> *  Name: *org.ops4j.pax.web.deployer.internal.WarDeployer
>
> *  State   : *ACTIVE
>
> *References*
>
> *karaf*@root()>
>
>
>
>
> --
> 
> Guillaume Nodet
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de


Computer Scientist
http://www.adobe.com


[DISCUSS] Remove Karaf specific SCR commands

2017-10-04 Thread Guillaume Nodet
I'm working on KARAF-4785
 and
I've already fixed the completion of the native scr commands.  This means
that we'll have some kind of duplication of all scr commands.  Kind of,
because even though they are similar, the output is different.  The native
commands provide a deeper view of the SCR components.

So, should I go ahead and just remove the Karaf specific commands ?

Below is the output of the native commands and then the karaf commands...

Cheers,
Guillaume

*karaf*@root()> scr:list

 BundleId Component Name Default State

Component Id State  PIDs (Factory PID)

 [  38]   ScrServiceMBean  enabled

[   4] [active  ]

 [ 145]   org.ops4j.pax.web.deployer.internal.WarDeployer  enabled

[   3] [active  ]

 [ 151]   org.ops4j.pax.web.service.internal.WhiteboardDtoService  enabled

[   5] [active  ]

*karaf*@root()> scr:info org.ops4j.pax.web.deployer.internal.WarDeployer



*** Bundle: org.ops4j.pax.web.pax-web-deployer (145)

Component Description:

  Name: org.ops4j.pax.web.deployer.internal.WarDeployer

  Implementation Class: org.ops4j.pax.web.deployer.internal.WarDeployer

  Default State: enabled

  Activation: delayed

  Configuration Policy: optional

  Activate Method: activate

  Deactivate Method: deactivate

  Modified Method: -

  Configuration Pid: [org.ops4j.pax.web.deployer.internal.WarDeployer]

  Services:

org.apache.felix.fileinstall.ArtifactUrlTransformer

  Service Scope: singleton

  Component Description Properties:

  Component Configuration:

ComponentId: 3

State: active

Component Configuration Properties:

component.id = 3

component.name = org.ops4j.pax.web.deployer.internal.WarDeployer


*karaf*@root()> scr:components

ID │ State  │ Component Name

───┼┼

3  │ ACTIVE │ org.ops4j.pax.web.deployer.internal.WarDeployer

5  │ ACTIVE │ org.ops4j.pax.web.service.internal.WhiteboardDtoService

*karaf*@root()> scr:details org.ops4j.pax.web.deployer.internal.WarDeployer

*Component Details*

*  Name: *org.ops4j.pax.web.deployer.internal.WarDeployer

*  State   : *ACTIVE

*References*

*karaf*@root()>




-- 

Guillaume Nodet