You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by dj...@apache.org on 2007/10/13 01:51:05 UTC

svn commit: r584338 - /directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java

Author: djencks
Date: Fri Oct 12 16:50:56 2007
New Revision: 584338

URL: http://svn.apache.org/viewvc?rev=584338&view=rev
Log:
if we have ldap servers, start them

Modified:
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java

Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=584338&r1=584337&r2=584338&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Fri Oct 12 16:50:56 2007
@@ -107,6 +107,14 @@
         {
             directoryService.startup();
         }
+        if ( ldapServer != null && ! ldapServer.isStarted() )
+        {
+            ldapServer.start();
+        }
+        if ( ldapsServer != null && ! ldapsServer.isStarted() )
+        {
+            ldapsServer.start();
+        }
 
 /*
         if ( ldapServer == null )
@@ -119,10 +127,6 @@
             ldapsServer = new LdapServer( tcpAcceptor );
         }
 
-        if ( ! ldapServer.isStarted() )
-        {
-            ldapServer.start();
-        }
 
         if ( ldapsServer != null && ! ldapsServer.isStarted() )
         {
@@ -134,24 +138,27 @@
 
     public boolean isStarted()
     {
-        return true;
-//        return ldapServer.isStarted() || ldapsServer.isStarted();
+        if (ldapServer != null || ldapsServer != null)
+        {
+             return (ldapServer != null && ldapServer.isStarted()) || (ldapsServer != null && ldapsServer.isStarted());
+        }
+        return directoryService.isStarted();
     }
     
 
     public void shutdown() throws NamingException
     {
-/*
-        if ( ldapServer.isStarted() )
+        if ( ldapServer != null && ldapServer.isStarted() )
         {
             ldapServer.stop();
         }
 
-        if ( ldapsServer.isStarted() )
+        if ( ldapsServer != null && ldapsServer.isStarted() )
         {
             ldapsServer.stop();
         }
 
+/*
         logicExecutor.shutdown();
         for (;;) {
             try {