io.jooby.internal.quartz.ConnectionProviderImpl Maven / Gradle / Ivy
/*
* 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