1 package org.apache.ojb.broker.accesslayer; 2 3 17 18 import org.apache.ojb.broker.util.factory.ConfigurableFactory; 19 20 27 public class ConnectionFactoryFactory extends ConfigurableFactory 28 { 29 private static ConnectionFactoryFactory singleton = new ConnectionFactoryFactory(); 30 private ConnectionFactory conFactory; 31 32 public synchronized static ConnectionFactoryFactory getInstance() 33 { 34 return singleton; 35 } 36 37 41 public synchronized ConnectionFactory createConnectionFactory() 42 { 43 if (conFactory == null) 44 { 45 conFactory = (ConnectionFactory) createNewInstance(); 46 } 47 return conFactory; 48 } 49 50 protected String getConfigurationKey() 51 { 52 return "ConnectionFactoryClass"; 53 } 54 } 55 | Popular Tags |