01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency.connect;
10:
11: import java.sql.Connection;
12:
13: /**
14: * @author Gennady Krizhevsky
15: */
16: public interface ConnectionManager {
17: public static final int DEFAULT_NUMBER_OF_ATTEMPTS = 5;
18: public static final int INFINITE_NUMBER_OF_ATTEMPTS = -999;
19:
20: public static final String PROP_DRIVER = "driver";
21: public static final String PROP_URL = "url";
22: public static final String PROP_USER = "user";
23: public static final String PROP_PASSWORD = "password";
24: public static final String PROP_MAX_ATTEMPTS = "max_attempts";
25:
26: /**
27: * Create new connection
28: *
29: * @return Connection
30: */
31: Connection createConnection();
32:
33: /**
34: * Destroy existiong connection which can simply close it
35: *
36: * @param connection
37: */
38: void destroyConnection(Connection connection);
39: }
|