directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari" <kayyag...@apache.org>
Subject Re: Review Request: ApacheDsService.start() method refactoring
Date Wed, 27 Oct 2010 11:38:20 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14/#review5
-----------------------------------------------------------

Ship it!


I would suggest that we confine the usage of beans to config reader only(even if they can
be accessed publicly), cause we need to copy the property values from bean to the corresponding
real instance (e.x DirectoryServiceBean -> DirectoryService) and this is better to it in
the reader, so we don't need this copying anywhere else to setup a service (one particular
area I see is in embedded mode, currently in embedded server we are not able to
use external config, but with the new single file LDIF based config it is now possible and
setting up a server gets easier too from a user's pov)

- Kiran


On 2010-10-27 04:24:41, Emmanuel L├ęcharny wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14/
> -----------------------------------------------------------
> 
> (Updated 2010-10-27 04:24:41)
> 
> 
> Review request for directory.
> 
> 
> Summary
> -------
> 
> I have modified the ApacheDsService start method this way :
> 
>     public void start( InstanceLayout instanceLayout ) throws Exception
>     {
>         File partitionsDir = instanceLayout.getPartitionsDirectory();
>         
>         if ( !partitionsDir.exists() )
>         {
>             LOG.info( "partition directory doesn't exist, creating {}", partitionsDir.getAbsolutePath()
);
>             partitionsDir.mkdirs();
>         }
> 
>         LOG.info( "using partition dir {}", partitionsDir.getAbsolutePath() );
>         
>         initSchemaLdifPartition( instanceLayout );
>         initConfigPartition( instanceLayout );
> 
>         // Read the configuration
>         cpReader = new ConfigPartitionReader( configPartition, partitionsDir );
>         
>         ConfigBean configBean = cpReader.readConfig( "ou=config" );
>         
>         DirectoryServiceBean directoryServiceBean = configBean.getDirectoryServiceBean(
"default" );
>         
>         // Initialize the DirectoryService now
>         DirectoryService directoryService = initDirectoryService( instanceLayout, directoryServiceBean
);
> 
>         // start the LDAP server
>         startLdap( directoryServiceBean.getLdapServerBean(), directoryService );
> 
>         // start the NTP server
>         startNtp( directoryServiceBean.getNtpServerBean(), directoryService );
> 
>         // Initialize the DNS server (Not ready yet)
>         // initDns( configBean );
> 
>         // Initialize the DHCP server (Not ready yet)
>         // initDhcp( configBean );
> 
>         // start the ChangePwd server (Not ready yet)
>         startChangePwd( directoryServiceBean.getChangePasswordServerBean(), directoryService
);
> 
>         // start the Kerberos server
>         startKerberos( directoryServiceBean.getKdcServerBean(), directoryService );
> 
>         // start the jetty http server
>         startHttpServer( directoryServiceBean.getHttpServerBean(), directoryService );
>     }
> 
> 
> Diffs
> -----
> 
> 
> Diff: https://reviews.apache.org/r/14/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Emmanuel
> 
>


Mime
View raw message