admin@glassfish.java.net

Re: Getting started with CLI

From: Paul M Davies (Oracle) <"Paul>
Date: Fri, 21 May 2010 08:46:41 -0700

Hi,

You might find some useful information in Extending the asadmin Utility
<http://docs.sun.com/app/docs/doc/820-7727/ghmrd?a=view> in the v3
Add-On Component Development Guide, which steps you through the process
of adding an asadmin subcommand by implementing the AdminCommand
interface. However, as this information applies to v3, there's nothing
about adding a CRUD subcommand.

Regards,
-Paul


On 05/21/10 08:33, Yamini K B wrote:
> Hi,
>
> I'm trying to port one of the v2 commands onto v3. This is the first
> time I'm writing a command in v3 and have some general questions:
>
> 1. Is there any document regarding the practices to be followed while
> writing commands? Looks like the v3 CLI spec
> <https://glassfish.dev.java.net/nonav/v3/admin/planning/j109/admin-cli.html>
> wasn't updated for the final release and it mainly talks about
> features that were dropped. I've seen the v3 engineer's guide
> <http://wiki.glassfish.java.net/Wiki.jsp?page=V3EngineersGuide#section-V3EngineersGuide-6AdminCLI>
> CLI section, but that too contains a very simple example.
>
> 2. Where can I find documentation for the various annotations?
>
> 3. From what I understand, there are 2 ways to introduce a command,
> one is by implementing the AdminCommand interface and other is writing
> a CRUD command, is that correct?
>
> 4. How/when to implement CRUD commands?
>
> 5. Whats the best way to debug any command? I made some changes in the
> config beans and now DAS isn't even starting, it just hangs after the
> launcher message. I'm at loss as to where to look! (Changing felix log
> level and admin logging to finest doesn't help since its in the very
> intial stage of startup)
>
> 6. While porting a v2 command, I presume both the files,
> supported-legacy-command-names/unsupported-legacy-command-names need
> to be updated. Is that correct?
>
> Thanks,
> -Yamini
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net For
> additional commands, e-mail: admin-help_at_glassfish.dev.java.net


-- 
Paul Davies, Principal Technical Writer, Oracle Corporation.
http://blogs.sun.com/techscribe/