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

net.hasor.db.solon.integration.DynamicConnectionImpl Maven / Gradle / Ivy

There is a newer version: 2.9.4
Show newest version
package net.hasor.db.solon.integration;

import net.hasor.db.jdbc.DynamicConnection;
import org.noear.solon.data.tran.TranUtils;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author noear
 * @see 1.6
 */
public class DynamicConnectionImpl implements DynamicConnection {
    private DataSource dataSource;

    public DynamicConnectionImpl(DataSource dataSource) {
        this.dataSource = dataSource;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy