Re: Configuration file format

"Lachezar Dobrev" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Organization LSN Software and telecommunication systems
Message-ID <00a901c39df6$ce7510c0$6f02a8c0@Sijaiko>
  Hi back.

> Hi all,
>
> after discussing with Lachezar on this list I came up with
> the format below for the configuration file.
>
> The attribute 'port' for the 'configuration' element is a
> server socket used to shutdown the configuration from remote.
>
> A simple client like this does the job:
>
> Socket socket = new Socket((String)null, 8872);
> socket.getOutputStream().write("shutdown".getBytes());
> socket.close();
>
> It can be easily written in a public static void
> main(String[]) of a Shutdown class.
>
> Comments are very welcome.
  Well...
  How about securing this shutdown socket?
  I wouldn't want anyone else to be able to shutdown my server. Right?
  Something like:

<configuration port="xyz" command="24rgfisg7346">

  Then... What do you think of having the ability to not only stop the
loader, but to also restart it? Hm?

> Simon
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <configuration port="8872">
>    <startup>
>       <create
>          classname="javax.management.timer.Timer"
>          objectname="services:type=timer"
>          loadername="null" />
>       <call
>          objectname="services:type=timer"
>          operation="start" />
>
>       <object objectid="obj1">
>          <new classname="com.acme.ObjectNumberOne">
>             <arg type="int">50</arg>
>          </new>
>       </object>
>
>       <register objectname=":key1=value1,key2=value2">
>          <arg type="java.lang.Object" refobjectid="obj1"/>
>       </register>
>
>       <create
>          classname="mx4j.adaptor.http.HttpAdaptor"
>          objectname="connectors:type=http"
>          loadername="null" />
>       <create
>          classname="mx4j.adaptor.http.XSLTProcessor"
>          objectname="connectors:type=http,processor=xslt"
>          loadername="null" />
>       <call
>          objectname="connectors:type=http"
>          attribute="ProcessorNameString">
>          <arg type="string">connectors:type=http,processor=xslt</arg>
>       </call>
>       <call objectname="connectors:type=http" operation="start" />
>    </startup>
>
>    <shutdown>
>       <call objectname="connectors:type=http" operation="stop" />
>       <unregister objectname="connectors:type=http" />
>       <unregister objectname="connectors:type=http,processor=xslt" />
>
>       <unregister objectname=":key1=value1,key2=value2" />
>
>       <call objectname="services:type=timer" operation="stop" />
>       <unregister objectname="services:type=timer" />
>
>    </shutdown>
>
> </configuration>

  Ahmmm... How about this:
  <configuration>
    <classpath>
      <url  ref="http://my.server.com/classes/"/>

      <!-- RELATIVE TO SCRIPT FILE -->
      <file ref="libs/jarfile.jar"/>

      <!-- RELATIVE TO SCRIPT FILE -->
      <file ref="classes"/>

      <!-- RELATIVE TO SCRIPT FILE -->
      <dir  ref="libs/plugins/" match="*.plugin.jar"/>
    </classpath>
    <startup>
    ....
  </configuration>

  Then the loader can have an MLet classloader instantiated and use it to
instantiate beans that do not have the loader specified i.e.:
       <create
          classname="com.mycomp.MyWorker
          objectname="JOB:type=worker" />


  In any case I would love to see this. Is it in the CVS?

  Lachezar.





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.