directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r329157 - /directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
Date Fri, 28 Oct 2005 08:36:08 GMT
Author: akarasulu
Date: Fri Oct 28 01:36:05 2005
New Revision: 329157

URL: http://svn.apache.org/viewcvs?rev=329157&view=rev
Log:
protect services starting after others that may fail to start

Modified:
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?rev=329157&r1=329156&r2=329157&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
Fri Oct 28 01:36:05 2005
@@ -129,22 +129,43 @@
 
             if ( cfg.isEnableKerberos() )
             {
-                KdcConfiguration kdcConfiguration = new KdcConfiguration( env, LoadStrategy.PROPS
);
-                PrincipalStore kdcStore = new JndiPrincipalStoreImpl( kdcConfiguration, this
);
-                kdcServer = new KerberosServer( kdcConfiguration, minaRegistry, kdcStore
);
+                try
+                {
+                    KdcConfiguration kdcConfiguration = new KdcConfiguration( env, LoadStrategy.PROPS
);
+                    PrincipalStore kdcStore = new JndiPrincipalStoreImpl( kdcConfiguration,
this );
+                    kdcServer = new KerberosServer( kdcConfiguration, minaRegistry, kdcStore
);
+                }
+                catch ( Throwable t )
+                {
+                    log.error( "Failed to start the Kerberos service", t );
+                }
             }
 
             if ( cfg.isEnableChangePassword() )
             {
-                ChangePasswordConfiguration changePasswordConfiguration = new ChangePasswordConfiguration(
env, LoadStrategy.PROPS );
-                PrincipalStore store = new JndiPrincipalStoreImpl( changePasswordConfiguration,
this );
-                changePasswordServer = new ChangePasswordServer( changePasswordConfiguration,
minaRegistry, store );
+                try
+                {
+                    ChangePasswordConfiguration changePasswordConfiguration = new ChangePasswordConfiguration(
env, LoadStrategy.PROPS );
+                    PrincipalStore store = new JndiPrincipalStoreImpl( changePasswordConfiguration,
this );
+                    changePasswordServer = new ChangePasswordServer( changePasswordConfiguration,
minaRegistry, store );
+                }
+                catch ( Throwable t )
+                {
+                    log.error( "Failed to start the Change Password service", t );
+                }
             }
 
             if ( cfg.isEnableNtp() )
             {
-                NtpConfiguration ntpConfig = new NtpConfiguration( env, LoadStrategy.PROPS
);
-                ntpServer = new NtpServer( ntpConfig, minaRegistry );
+                try
+                {
+                    NtpConfiguration ntpConfig = new NtpConfiguration( env, LoadStrategy.PROPS
);
+                    ntpServer = new NtpServer( ntpConfig, minaRegistry );
+                }
+                catch ( Throwable t )
+                {
+                    log.error( "Failed to start the NTP service", t );
+                }
             }
         }
     }



Mime
View raw message