Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 83205 invoked from network); 13 Oct 2007 02:23:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Oct 2007 02:23:30 -0000 Received: (qmail 8542 invoked by uid 500); 13 Oct 2007 02:23:18 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 8483 invoked by uid 500); 13 Oct 2007 02:23:18 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 8472 invoked by uid 99); 13 Oct 2007 02:23:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 19:23:18 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2007 02:23:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B1ECB1A9832; Fri, 12 Oct 2007 19:23:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584360 - in /directory: apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/ apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/ installers/branches/bigbang/... Date: Sat, 13 Oct 2007 02:23:01 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071013022301.B1ECB1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: akarasulu Date: Fri Oct 12 19:22:58 2007 New Revision: 584360 URL: http://svn.apache.org/viewvc?rev=584360&view=rev Log: fixing some compilation errors and some problems with tests Modified: directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java Modified: directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java?rev=584360&r1=584359&r2=584360&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java (original) +++ directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/SocketAcceptor.java Fri Oct 12 19:22:58 2007 @@ -31,7 +31,7 @@ import org.apache.mina.filter.executor.ExecutorFilter; /** - * @version $Rev:$ $Date:$ + * @version $Rev$ $Date$ * @org.apache.xbean.XBean */ public class SocketAcceptor extends org.apache.mina.transport.socket.nio.SocketAcceptor @@ -39,7 +39,7 @@ private static final int DEFAULT_THREADS = 10; - public SocketAcceptor( Executor logicExecutor) + public SocketAcceptor( Executor logicExecutor ) { super( Runtime.getRuntime().availableProcessors(), getIOExecutor()); if ( logicExecutor == null ) Modified: directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java?rev=584360&r1=584359&r2=584360&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java (original) +++ directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java Fri Oct 12 19:22:58 2007 @@ -22,7 +22,6 @@ import junit.framework.AssertionFailedError; import org.apache.commons.io.FileUtils; -import org.apache.directory.server.configuration.ApacheDS; import org.apache.directory.server.jndi.ServerContextFactory; import org.apache.directory.server.core.DirectoryService; import org.apache.directory.server.core.DefaultDirectoryService; @@ -86,7 +85,9 @@ protected static final String USER = "uid=admin,ou=system"; protected static final String PASSWORD = "secret"; protected static final String BASE = "dc=example,dc=com"; - protected static ApacheDS apacheDS; + + protected static DirectoryService directoryService; + protected static LdapServer ldapServer; /** @@ -204,15 +205,15 @@ @BeforeClass public static void setUpBeforeClass() throws Exception { - DirectoryService directoryService = new DefaultDirectoryService(); + directoryService = new DefaultDirectoryService(); doDelete( directoryService.getWorkingDirectory() ); + directoryService.setShutdownHookEnabled( false ); + directoryService.startup(); port = AvailablePortFinder.getNextAvailable( 1024 ); SocketAcceptor socketAcceptor = new SocketAcceptor( null ); - LdapServer ldapServer = new LdapServer( socketAcceptor, directoryService ); + ldapServer = new LdapServer( socketAcceptor, directoryService ); ldapServer.setIpPort( port ); - directoryService.setShutdownHookEnabled( false ); - apacheDS = new ApacheDS( directoryService, ldapServer, null ); - apacheDS.startup(); + ldapServer.start(); Hashtable env = new Hashtable(); env.put( DirectoryService.JNDI_KEY, directoryService ); @@ -226,6 +227,30 @@ /** + * Sets the system context root to null. + * + * @see junit.framework.TestCase#tearDown() + * @throws Exception if there are problems shutting down the server + */ + @AfterClass + public static void tearDownAfterClass() throws Exception + { + try + { + ldapServer.stop(); + directoryService.shutdown(); + } + catch ( Exception e ) + { + LOG.error( "Encountered exception while trying to shutdown.", e ); + } + + root = null; + doDelete( directoryService.getWorkingDirectory() ); + } + + + /** * Deletes the Eve working directory. * @param wkdir the working directory to delete * @throws IOException if the directory cannot be deleted @@ -302,29 +327,6 @@ rootDSE = new InitialLdapContext( envTest, null ); assertNotNull( rootDSE ); - } - - - /** - * Sets the system context root to null. - * - * @see junit.framework.TestCase#tearDown() - * @throws Exception if there are problems shutting down the server - */ - @AfterClass - public static void tearDownAfterClass() throws Exception - { - try - { - apacheDS.shutdown(); - } - catch ( Exception e ) - { - LOG.error( "Encountered exception while trying to shutdown.", e ); - } - - root = null; - doDelete( apacheDS.getDirectoryService().getWorkingDirectory() ); } Modified: directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java?rev=584360&r1=584359&r2=584360&view=diff ============================================================================== --- directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java (original) +++ directory/installers/branches/bigbang/apacheds-noarch/src/main/java/org/apache/directory/server/Service.java Fri Oct 12 19:22:58 2007 @@ -23,16 +23,16 @@ import org.apache.directory.daemon.DaemonApplication; import org.apache.directory.daemon.InstallationLayout; import org.apache.directory.server.configuration.ApacheDS; -import org.apache.directory.server.jndi.ServerContextFactory; +import org.apache.directory.server.core.DefaultDirectoryService; +import org.apache.directory.server.core.DirectoryService; +import org.apache.directory.server.ldap.LdapServer; +import org.apache.directory.server.protocol.shared.SocketAcceptor; import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; -import javax.naming.Context; -import javax.naming.directory.InitialDirContext; import java.io.File; -import java.util.Hashtable; /** @@ -63,7 +63,15 @@ else { LOG.info( "server: using default settings ..." ); - apacheDS = new ApacheDS(); + DirectoryService directoryService = new DefaultDirectoryService(); + directoryService.startup(); + SocketAcceptor socketAcceptor = new SocketAcceptor( null ); + LdapServer ldapServer = new LdapServer( socketAcceptor, directoryService ); + ldapServer.start(); + LdapServer ldapsServer = new LdapServer( socketAcceptor, directoryService ); + ldapsServer.setEnableLdaps( true ); + ldapsServer.start(); + apacheDS = new ApacheDS( directoryService, ldapServer, ldapsServer ); } if ( install != null )