Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A03ED109E8 for ; Tue, 26 Nov 2013 21:33:35 +0000 (UTC) Received: (qmail 82662 invoked by uid 500); 26 Nov 2013 21:33:35 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 82607 invoked by uid 500); 26 Nov 2013 21:33:35 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 82599 invoked by uid 99); 26 Nov 2013 21:33:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 21:33:35 +0000 Date: Tue, 26 Nov 2013 21:33:35 +0000 (UTC) From: "Kevin Minder (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DIRSERVER-1920) Refactor DefaultDirectoryServiceFactory/DefaultDirectoryService for extensability MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSERVER-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13833096#comment-13833096 ] Kevin Minder commented on DIRSERVER-1920: ----------------------------------------- Motivation for doing this was to be able to create these two simple extension to eliminate some startup warnings The prevents an WARNing about the shutdown hook not being registered. {code} public class SimpleDirectoryServiceFactory extends DefaultDirectoryServiceFactory { protected DirectoryService createDirectoryService() { DirectoryService result; try { result = new SimpleDirectoryService(); } catch( Exception e ) { throw new RuntimeException( e ); } return result; } } {code} This prevents startup warnings about the default admin password needing to be changed. {code} public class SimpleDirectoryService extends DefaultDirectoryService { public SimpleDirectoryService() throws Exception { } protected void showSecurityWarnings() throws Exception { // NoOp - This prevents confusing warnings from being output. } } {code} > Refactor DefaultDirectoryServiceFactory/DefaultDirectoryService for extensability > --------------------------------------------------------------------------------- > > Key: DIRSERVER-1920 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1920 > Project: Directory ApacheDS > Issue Type: Improvement > Components: core > Affects Versions: 2.0.0-M15 > Reporter: Kevin Minder > Attachments: DIRSERVER_1920__Refactor_DefaultDirectoryServiceFactory_DefaultDirectoryService_for_extensability.patch > > > Enhance the extensibility and reusability of > apacheds/apacheds/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java > apacheds/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java > For DefaultDirectoryServiceFactory create overridable methods for the creation of the DirectoryService and PartitionFactory. > For DefaultDirectoryService make showSecuirtyWarnings to allow control for that behavior in subclasses. -- This message was sent by Atlassian JIRA (v6.1#6144)