2 * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.aaa.datastore.h2;
10 import java.sql.Connection;
11 import javax.sql.DataSource;
14 * Provider of JDBC Connections.
15 * Essentially a much simplified {@link DataSource}.
17 * @author Michael Vorburger
19 public interface ConnectionProvider {
24 * @return a connection from this Factory; it may be a brand new one
25 * obtained from the JDBC Driver, or an existing open one, if it
26 * hasn't previously been closed
27 * @throws StoreException
28 * if no Connection could be obtained
30 Connection getConnection() throws StoreException;