You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2007/10/03 18:34:51 UTC

[jira] Created: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Make CommandDescriptor optional and make Command stateless
----------------------------------------------------------

                 Key: GSHELL-35
                 URL: https://issues.apache.org/jira/browse/GSHELL-35
             Project: GShell
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: API, Core
    Affects Versions: 1.0-alpha-1
            Reporter: Guillaume Nodet
            Assignee: Guillaume Nodet




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532532 ] 

Jason Dillon commented on GSHELL-35:
------------------------------------

Um... and I specifically did not want to create command instances to query things like id/description, since construction of commands cold potentially pull in/initialize other classes... which is why the CommandDescriptor was used, and the command was only constructed upon execution.  Your changes will cause *all* command instances to be constructed if the help command is used, which is *not* desirable.


> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532577 ] 

Guillaume Nodet commented on GSHELL-35:
---------------------------------------

Did you see my changes ?
I still use the CommandDescriptor but wrap it inside a Command, so the real commands won't be created until actually executed.
Also, the command are now stateless because there is no more call to init().
Previously, one need to call
   command.init(context)
   command.execute(args)

This means that a single command is not thread safe (because the context is a state stored in the command itself).
Now, you just need to call:
   command.execute(context, args)

Please take a deeper look at the changes before reverting them (if you considered doing so), as I don't think any of your concerns is actually true.

> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532526 ] 

Jason Dillon commented on GSHELL-35:
------------------------------------

I don't quite see how this makes commands stateless.  I've also moved the descriptor bits completely to core and removed its dependency on plexus... so I'll have to reconcile what you've changed.

> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532578 ] 

Guillaume Nodet commented on GSHELL-35:
---------------------------------------

Additional note: the CommandDescriptor is still used but only as a plexus specific thing, as the command itself now contains the id / description.

> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Jason Dillon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532528 ] 

Jason Dillon commented on GSHELL-35:
------------------------------------

Also, the annotations are _hints_ to generate the commands.xml descriptor... It should be valid to provide a class w/o annotations and a commands.xml descriptor and have things work normally.

> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GSHELL-35) Make CommandDescriptor optional and make Command stateless

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GSHELL-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved GSHELL-35.
-----------------------------------

    Resolution: Fixed

Sending        gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
Sending        gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
Sending        gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
Sending        gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/layout/DefaultLayoutManager.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/layout/LayoutManager.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java
Adding         gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PlexusCommandWrapper.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java
Sending        gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java
Transmitting file data ...........
Committed revision 581649.

> Make CommandDescriptor optional and make Command stateless
> ----------------------------------------------------------
>
>                 Key: GSHELL-35
>                 URL: https://issues.apache.org/jira/browse/GSHELL-35
>             Project: GShell
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: API, Core
>    Affects Versions: 1.0-alpha-1
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.