avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: jakarta-avalon-apps/ftpserver/src/conf ftp-assembly.xml ftp-config.xml ftp-db.sql
Date Wed, 06 Mar 2002 13:57:09 GMT
rana_b      02/03/06 05:57:09

  Modified:    ftpserver/src/conf ftp-assembly.xml ftp-config.xml
                        ftp-db.sql
  Log:
  second stage of refactoring
  
  Revision  Changes    Path
  1.8       +18 -51    jakarta-avalon-apps/ftpserver/src/conf/ftp-assembly.xml
  
  Index: ftp-assembly.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/conf/ftp-assembly.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ftp-assembly.xml	7 Jan 2002 22:49:37 -0000	1.7
  +++ ftp-assembly.xml	6 Mar 2002 13:57:09 -0000	1.8
  @@ -7,67 +7,34 @@
   -->
   <assembly>
   
  -  <!-- The Storage block -->
  -  <block class="org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager"
  -         name="objectstorage" />
  - 
     <!-- The ThreadManager block -->
  -  <block class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager" 
  -         name="thread-manager" />
  +  <block class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager" name="thread-manager"
/>
    
     <!-- The Connection Manager block -->
  -  <block class="org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager"
  -         name="connections">
  -    <provide name="thread-manager" 
  -             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
  +  <block class="org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager"
name="connections">
  +      <provide name="thread-manager" role="org.apache.avalon.cornerstone.services.threads.ThreadManager"
/>
     </block>
   
     <!-- The Socket Manager block -->
     <block class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager" name="sockets"/>
   
  -  <!-- The TimeScheduler block -->
  -  <block class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler"
  -         name="scheduler">
  -    <provide name="thread-manager" 
  -             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
  -  </block>
  -  
  +  <!-- The Storage block -->
  +  <block class="org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager"
name="objectstorage" />
     
  -  <!-- FTP SERVER BLOCKS -->
  +  <!-- user manager block -->
  +  <block class="org.apache.avalon.ftpserver.usermanager.DefaultUserManager" name="user-manager">
  +    <provide name="objectstorage" role="org.apache.avalon.cornerstone.services.store.Store"/>
  +  </block>  
   
  -  <block name="ftp-hub" class="org.apache.avalon.ftpserver.blocks.hub.DefaultHub"/>
  -  
  -  <block name="ftp-cfg" class="org.apache.avalon.ftpserver.blocks.config.DefaultConfig">
  -    <provide name="ftp-hub"     role="org.apache.avalon.ftpserver.services.FtpHub"/>
       
  -    <provide name="ftp-ip-rstr"   role="org.apache.avalon.ftpserver.interfaces.IpRestrictor"/>
  -    <provide name="ftp-stats"     role="org.apache.avalon.ftpserver.interfaces.FtpStatistics"/>
   
  -  </block> 
  +  <!-- ip restrictor block -->
  +  <block class="org.apache.avalon.ftpserver.ip.IpRestrictor" name="ip-restrictor"/>
   
  -  <block name="ftp-server" class="org.apache.avalon.ftpserver.blocks.server.DefaultFtpServer">
  -    <provide name="sockets"       role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
  -    <provide name="connections"   role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
/>	  	 
  -    <provide name="ftp-cfg"       role="org.apache.avalon.ftpserver.services.FtpConfigService"/>
  -    <provide name="ftp-uhandler"  role="org.apache.avalon.ftpserver.interfaces.UserHandler"/>
  -    <provide name="ftp-ip-rstr"   role="org.apache.avalon.ftpserver.interfaces.IpRestrictor"/>
  -  </block> 
  -  
  -  <block name="ftp-umanager" class="org.apache.avalon.ftpserver.blocks.usermanager.props.PropertiesUserManager">
  -    <provide name="ftp-hub"     role="org.apache.avalon.ftpserver.services.FtpHub"/>
       
  -    <provide name="objectstorage" role="org.apache.avalon.cornerstone.services.store.Store"/>
   
  -  </block>    
  -  
  -  <block name="ftp-uhandler" class="org.apache.avalon.ftpserver.blocks.usermanager.DefaultUserHandler">
  -    <provide name="ftp-hub"     role="org.apache.avalon.ftpserver.services.FtpHub"/>
         
  -    <provide name="scheduler"     role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
  -    <provide name="ftp-umanager"  role="org.apache.avalon.ftpserver.services.UserManager"/>
   
  -  </block> 
  -  
  -  <block name="ftp-stats" class="org.apache.avalon.ftpserver.blocks.stats.DefaultFtpStatistics">
  -    <provide name="ftp-hub"     role="org.apache.avalon.ftpserver.services.FtpHub"/>
       
  -  </block>   
  -  
  -  <block name="ftp-ip-rstr" class="org.apache.avalon.ftpserver.blocks.iprestrictor.DefaultIpRestrictor">
  -    <provide name="objectstorage" role="org.apache.avalon.cornerstone.services.store.Store"/>

  -  </block> 
  +  <!-- Ftp server block -->
  +  <block class="org.apache.avalon.ftpserver.FtpServerImpl" name="ftp-server" >
  +      <provide name="sockets"       role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
  +      <provide name="connections"   role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
/>
  +      <provide name="ip-restrictor" role="org.apache.avalon.ftpserver.ip.IpRestrictorInterface"
/>
  +      <provide name="user-manager"  role="org.apache.avalon.ftpserver.usermanager.UserManagerInterface"
/>
  +  </block>
   
   </assembly>
  
  
  
  1.11      +94 -99    jakarta-avalon-apps/ftpserver/src/conf/ftp-config.xml
  
  Index: ftp-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/conf/ftp-config.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ftp-config.xml	7 Jan 2002 22:49:37 -0000	1.10
  +++ ftp-config.xml	6 Mar 2002 13:57:09 -0000	1.11
  @@ -6,8 +6,76 @@
   
   -->
   <config>
  +  
  +
  +  <!-- thread manager configuration -->
  +  <thread-manager>
  +      <thread-group>
  +        <name>default</name>
  +
  +        <!-- normal priority = 5, max-priority = 10 -->
  +        <priority>5</priority> 
  +
  +        <!-- are threads deamon threads ? -->
  +        <is-daemon>false</is-daemon>
  +
  +        <max-threads>40</max-threads>
  +        <!-- these are ignored at the moment but will be fixed in later revisions -->
  +        <min-threads>20</min-threads>
  +        <min-spare-threads>20</min-spare-threads>
  +      </thread-group>
  +  </thread-manager>
  +
  +  
  +  <!-- socket configuration -->
  +  <sockets>
  +      <server-sockets>
  +        <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"
/>
  +      </server-sockets>
  +
  +      <client-sockets>
  +        <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"
/>
  +      </client-sockets>
  +  </sockets>
  +
  +
  +  <!-- ftp server specific configuration -->
  +  <ftp-server>
  +    
  +    <!-- FTP server address-->
  +    <ftp-host>127.0.0.1</ftp-host>
  +
  +    <!-- FTP port -->
  +    <ftp-port>21</ftp-port>
  +
  +    <!-- maximum number of ftp client connections -->
  +    <max-connection>20</max-connection>    
  +
  +    <!-- maximum number of anonymous connections -->
  +    <anonymous-max-connection>10</anonymous-max-connection>
  +
  +    <!-- does it allow anonymous connection -->
  +    <anonymous-login-allowed>true</anonymous-login-allowed>    
  +
  +    <!-- does it allow remote administration -->
  +    <remote-admin-allowed>true</remote-admin-allowed>   
  +
  +    <!-- port number to be used for remote administration --> 
  +    <remote-admin-port>1099</remote-admin-port>   
  +
  +    <!-- poll interval in seconds to kick out idle users and reload user manager if
necessary--> 
  +    <poll-interval>120</poll-interval>    
  +
  +    <!-- default idle timeout in second -->
  +    <default-idle-time>300</default-idle-time>    
   
  -  <!-- The Storage block .... needed by various -->
  +    <!-- default user root directory -->
  +    <default-user-root>C:/</default-user-root>    
  +
  +  </ftp-server>
  +  
  +  
  +  <!-- the storage block configuration -->
     <objectstorage>
         <repositories>
           <repository class="org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Object_Repository">
  @@ -39,107 +107,34 @@
         </repositories>
     </objectstorage>
   
  -  <thread-manager>
  -      <thread-group>
  -        <name>default</name>
  -
  -        <!-- normal priority == 5, max-priority = 10 -->
  -        <priority>5</priority> 
  -
  -        <!-- are threads deamon threads ? -->
  -        <is-daemon>false</is-daemon>
  -
  -        <max-threads>40</max-threads>
  -        <!-- these are ignored at the moment but will be fixed in later revisions -->
  -        <min-threads>20</min-threads>
  -        <min-spare-threads>20</min-spare-threads>
  -      </thread-group>
  -  </thread-manager>
  -
  -  <sockets>
  -      <server-sockets>
  -        <factory name="plain"
  -                 class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"
/>
  -      </server-sockets>
  -
  -      <client-sockets>
  -        <factory name="plain"
  -                 class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"
/>
  -      </client-sockets>
  -  </sockets>
  -
  -  <ftp-server>
   
  -    <!-- used by Socket Manager -->
  -    <ftp-port>21</ftp-port>
  -    <ftp-host>127.0.0.1</ftp-host>
  -    <ftphandler>
  -       <connectiontimeout> 360000 </connectiontimeout>
  -    </ftphandler>
  -
  -
  -    <!-- used by ftpserver config -->
  -    <connection>
  -      <max>20</max>
  -      <anonymous-max>10</anonymous-max>
  -      <anonymous-allowed>true</anonymous-allowed>
  -      <rmi-port>1099</rmi-port>
  -      <remote-admin-allowed>true</remote-admin-allowed>
  -      <idle-max>300</idle-max>
  -      <poll-period>120</poll-period>
  -    </connection>
  - 
  -
  -  </ftp-server>
  -  
  -  <ftp-hub/>
  -
  -    <!-- property based user manager -->
  -  <ftp-umanager>    
  +  <!-- user manager configuration -->
  +  <user-manager>
  +    
  +    <!-- default file object store based user manager -->
       <repository destinationURL="file://./FtpUserManagerStore/"
                   type="OBJECT"
                   model="SYNCHRONOUS">
  -    </repository>   
  -    <user-manager>
  -      <class>org.apache.avalon.ftpserver.usermanager.PropertiesUserManager</class>
  -    </user-manager>          
  -  </ftp-umanager>    
  -
  -
  -    <!-- database based user manager
  -  <ftp-umanager>
  -    <user-manager>
  -      <class>org.apache.avalon.ftpserver.usermanager.DbUserManager</class>
  -      <driver>org.gjt.mm.mysql.Driver</driver>
  -      <url>jdbc:mysql://localhost/ftpDB</url>
  -      <user>root</user>
  -      <password>admin</password>
  -    </user-manager>       
  -  </ftp-umanager>    
  -    -->    
  -
  -    <!-- ldap based user manager
  -  <ftp-umanager>      
  -    <user-manager>
  -      <class>org.apache.avalon.ftpserver.usermanager.LdapUserManager</class>
  -      <url>ldap://localhost:389</url>
  -      <root>o=apache.org</root>
  -      <admin>cn=Directory Manager</admin>
  -      <password>password</password>
  -      <authentication>simple</authentication>
  -    </user-manager>
  -  </ftp-umanager>    
  -    -->   
  -
  -  <ftp-cfg></ftp-cfg>
  -  <ftp-uhandler>
  -  </ftp-uhandler>
  -  <ftp-stats></ftp-stats>
  -  <ftp-ip-rstr>
  -    <repository destinationURL="file://./IpRestrictorStore/"
  -                type="OBJECT"
  -                model="SYNCHRONOUS">
  -    </repository>  
  -  </ftp-ip-rstr>
  +    </repository>
  +
  +    <!-- property file based user manager     
  +    <encrypt>false</encrypt>    
  +    -->
  +
  +    <!-- Database based user manager 
  +    <driver>oracle.jdbc.driver.OracleDriver</driver>
  +    <url>jdbc:oracle:thin:@dbserver:1521:ftp</url>
  +    <user>scott</user>
  +    <password>tiger</password>
  +    -->
  +
  +    <!-- LDAP based user manager 
  +    <url>ldap://localhost:389</url>
  +    <root>o=apache.org</root>
  +    <admin>cn=Directory Manager</admin>
  +    <password>password</password>
  +    <authentication>simple</authentication>
  +    -->
  +  </user-manager>
   
   </config>
  
  
  
  1.3       +10 -10    jakarta-avalon-apps/ftpserver/src/conf/ftp-db.sql
  
  Index: ftp-db.sql
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/conf/ftp-db.sql,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ftp-db.sql	23 Sep 2001 22:44:13 -0000	1.2
  +++ ftp-db.sql	6 Mar 2002 13:57:09 -0000	1.3
  @@ -1,10 +1,10 @@
  -CREATE TABLE USER (      
  -     NAME CHAR(32) NOT NULL PRIMARY KEY,       
  -     PASSWORD CHAR(32) NOT NULL,      
  -     HOME CHAR(128) NOT NULL,             
  -     ENABLED CHAR(8) NOT NULL,    
  -     WRITE_PERM CHAR(8) NOT NULL,       
  -     IDLE_TIME INT NOT NULL,             
  -     UPLOAD_RATE INT NOT NULL,             
  -     DOWNLOAD_RATE INT NOT NULL
  - )
  +CREATE TABLE FTP_USER (      
  +   LOGIN_ID VARCHAR(64) NOT NULL PRIMARY KEY,       
  +   PASSWORD VARCHAR(64),      
  +   HOME_DIR VARCHAR(128) NOT NULL,             
  +   ENABLED VARCHAR(8) NOT NULL,    
  +   WRITE_PERM VARCHAR(8) NOT NULL,       
  +   IDLE_TIME INT NOT NULL,             
  +   UPLOAD_RATE INT NOT NULL,             
  +   DOWNLOAD_RATE INT NOT NULL
  +)
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message