Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 81223 invoked from network); 12 Jun 2004 14:36:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Jun 2004 14:36:49 -0000 Received: (qmail 33491 invoked by uid 500); 12 Jun 2004 14:36:45 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 33294 invoked by uid 500); 12 Jun 2004 14:36:43 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 32928 invoked by uid 99); 12 Jun 2004 14:36:41 -0000 Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 12 Jun 2004 07:36:41 -0700 Received: (qmail 81199 invoked from network); 12 Jun 2004 14:36:38 -0000 Received: from localhost.hyperreal.org (HELO ?127.0.0.1?) (127.0.0.1) by localhost.hyperreal.org with SMTP; 12 Jun 2004 14:36:38 -0000 Message-ID: <40CB1535.1010504@apache.org> Date: Sat, 12 Jun 2004 16:37:41 +0200 From: Armin Waibel User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: [Proposal] Get rid of singletons Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: localhost.hyperreal.org 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi all, OJB currently use a couple of classes/factories implemented as singletons: - MetadataManager - ObjectCacheFactory - ConnectionFactoryFactory - ConnectionManagerFactory - JdbcAccessFactory - StatementManagerFactory - StatementsForClassFactory - SequenceManagerFactory - ... and more I think it will be better to manage all factories within one main class (OJB 1.1). OJB use two main classes PersistenceBroker and PersistenceBrokerFactory, so I propose to manage all factories within PBF: PBF.getMetadataManager() PBF.getObjectCacheFactory() ... + setter methods this allows us to control and manage all factories from one central class, replace factories,... What do you think? regards, Armin --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org