1 17 18 package tutorial; 19 20 import org.apache.avalon.cornerstone.services.connection.ConnectionHandler; 21 import org.apache.avalon.cornerstone.services.connection. 22 ConnectionHandlerFactory; 23 import org.apache.avalon.framework.logger.Logger; 24 import org.apache.avalon.framework.logger.LogEnabled; 25 26 35 public class SimpleConnectionHandlerFactory 36 implements ConnectionHandlerFactory, LogEnabled { 37 40 private Logger m_logger; 41 42 48 public ConnectionHandler createConnectionHandler() throws Exception { 49 SimpleConnectionHandler handler = new SimpleConnectionHandler(); 50 handler.setLogger(m_logger); 51 return handler; 52 } 53 54 59 public void releaseConnectionHandler(ConnectionHandler handler) { 60 } 61 62 65 public void enableLogging(Logger logger) { 66 m_logger = logger; 67 } 68 } 69 | Popular Tags |