All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.jooby.internal.quartz.ConnectionProviderImpl Maven / Gradle / Ivy

There is a newer version: 3.5.3
Show newest version
/*
 * Jooby https://jooby.io
 * Apache License Version 2.0 https://jooby.io/LICENSE.txt
 * Copyright 2014 Edgar Espina
 */
package io.jooby.internal.quartz;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import org.quartz.utils.ConnectionProvider;

public class ConnectionProviderImpl implements ConnectionProvider {

  private final DataSource dataSource;

  public ConnectionProviderImpl(final DataSource dataSource) {
    this.dataSource = dataSource;
  }

  @Override
  public Connection getConnection() throws SQLException {
    return dataSource.getConnection();
  }

  @Override
  public void shutdown() throws SQLException {
    // NOOP
  }

  @Override
  public void initialize() throws SQLException {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy