avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <paul_hamm...@yahoo.com>
Subject RE: Xcommander
Date Thu, 29 Mar 2001 21:48:45 GMT
> > What sort of refactoring required.
> I looked at the code again, and refactoring is probably the
> wrong word. It currently doesn't support all primitive types
> correctly, nor does it support RMI-style commands (I want it
> to be able to support remote objects directly). Secondly,
> it provides no security management.

RMI Commands a different command listener I'd say.

Security?  Avalon/Phoenix already provides a TLS wrapper mechanism for socket listeners right?
That would tackle privacy.  For Authernication we need a user subsystem.  James has one, FtpServer
has one.  Time for a central reference interface?  Implementations for a "Avalon", Windows,
Solaris, Linux via JNI?
> > What I am looking for
> > =====================
> > 
> > Inside Jesktop I have a 98% full functioned beanshell working.  
> > It sould be nice to use it to fire
> > commands at server components in the same VM (or an alternative VM)
> You'd still have to write the tool to parse the commands
> to java code. And when you've done that, you might want to
> leave the xml out of the picture and just execute the
> supplied commands directly...
> XML is tremendously useful as an inter-application communication
> tool, and also as a storage mechanism. The inner-app uses are
> much more limited...

Well, Although it's one VM for Jesktop, it's definately inter-application.

> To me, it sounds like you're looking for a tool that converts
> strings in the form of 'new James.AddUserCmd("Fred")' to actual
> java. 

No I have that already - Beanshell. It's a very cool comand line tool that having had syntax
parser generated by JavaCC, can takre string args and automatically turn them into Java objects.

Each Beanshell command is a bsh file.  Here is the one for "cd". It's executed like so

  bsh.help.cd = "usage: cd( path )";
	Additions by Kevin Raulerson, 
  cd( String pathname ) {
      file = pathToFile( pathname );
	  if ( file.exists() && file.isDirectory() )
	 	super.bsh.cwd = file.getCanonicalPath();
          print( "No such directory: "+pathname);

All the commands/classes to execute must be in the VM/classloader at time of execution.  Why
interested is that I will reflection style be able to fire commands to Avalon blocks that
are not
inside the sights of my current classloader.  I.e. they are a) in the same VM, but a different
classloader (Avalon separates blocks right?) or b) a differnt machine or VM.

E.g. I could create a bsh _script_ for the aforementioned James function (long suffering in
of an example on my behalf) : 

  addJamesUser( String domain, String userName ) {
    xcommandSender = this.interpreter.get("xcommand-sender");

> The most simple solution would be jPython or RMI.

JPython - to add to my list of things to look at.

RMI? Not sure it's relevant to my needs.

> Of course, I'd still like to see XCommander in widespread use,
> so don't let me stop you =)


I am reluctant to fork code though. I'd rather see the jakarta hosted Xcommander evolve.

> > Incidentally: I'd reckon a toXML() would be better than 
> > toString() on the commands.
> me too. This needs fixing...go ahead ;)

Consider it done.  I'll begin a checkout on latest versions of Avalon/Ph/C'stone.  When it's
finished in an hour I'll make the change and book it back.

Leo, could I invite you to take a look at Jesktop?  If you could download it, build it,
hot-install Beanshell, run it, then type one of the commands on
http://www.jesktop.org/portedapps.html (Beanshell), you might see what I am driving at.


Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message