[Zope3-checkins] CVS: Zope3 - zserver.zcml.in:1.1 z3.py:1.6 zserver.zcml:NONE

Jim Fulton jim@zope.com
Mon, 18 Nov 2002 15:20:12 -0500


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv31951

Modified Files:
	z3.py 
Added Files:
	zserver.zcml.in 
Removed Files:
	zserver.zcml 
Log Message:
Renamed zserver.zcml to zserver.zcml.in and modified z3.py to copy
zserver.zcml.in to zserver.zcml when zserver.zcml doesn't exist.
This allows zserver.zcml to be customized without impacting cvs.


=== Added File Zope3/zserver.zcml.in ===
<zopeConfigure
   xmlns="http://namespaces.zope.org/zope"
   xmlns:startup="http://namespaces.zope.org/startup">

  <!-- Define a specific site. The name of the site is used for server
       messages only. The number of threads specifies the number of
       threads the server should maximally use. -->

  <startup:defineSite name="Zope 3 Default"
                      threads="4">

    <!-- You can choose between several storages.

         At the moment only two storages are supported:
             FileStorage - Saves data in a specified file
             MappingStorage - Saves data in a dictionary. No saving. -->

    <startup:useFileStorage file = "Data.fs" />
    <!--startup:useMappingStorage /-->


    <!-- Setup the log file.

         There are two special file names:
             STDERR - sends output to standard error
             STDOUT - sends output to standard output -->

    <startup:useLog file="STDERR" />


    <!-- Now define the servers you would like to start. All you need
    to specify is the server type. Both, the port and verbose option,
    are optional.

    The following types are currently available: 
        Browser - A standard HTML server
        XML-RPC - An XML-RPC server, for calling objects remotely
        FTP - A server to access the ZODB via the FTP protocol
    Soon:
        SOAP - An SOAP server for Zope based on ZSI

    The 'port' option specifies the port the server should run on of course.

    The 'verbose' option specifies whether any logs should be written. If
    set to false, nothing is reported. -->

     <startup:addServer type = "Browser" port = "8080" verbose="true"/>
     <startup:addServer type = "XML-RPC" port = "8081" verbose="true" />
     <startup:addServer type = "FTP" port = "8021" />

  </startup:defineSite>


</zopeConfigure>


=== Zope3/z3.py 1.5 => 1.6 ===
--- Zope3/z3.py:1.5	Thu Oct 24 11:37:02 2002
+++ Zope3/z3.py	Mon Nov 18 15:20:11 2002
@@ -48,6 +48,11 @@
     config('site.zcml')
     
     # Load server config
+    if (not os.path.exists('zserver.zcml')
+        and os.path.exists('zserver.zcml.in')
+        ):
+        open('zserver.zcml', 'w').write(open('zserver.zcml.in').read())
+        
     from Zope.Configuration.xmlconfig import XMLConfig
     XMLConfig(os.path.join(dir, 'zserver.zcml'))()
 

=== Removed File Zope3/zserver.zcml ===