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

jodd.db.DbSessionProvider Maven / Gradle / Ivy

Go to download

Jodd DB is efficient and thin database facade; DbOom is convenient database object mapper.

There is a newer version: 6.0.0
Show newest version
// Copyright (c) 2003-2012, Jodd Team (jodd.org). All Rights Reserved.

package jodd.db;

/**
 * Provide {@link DbSession} when requested by {@link DbQuery}.
 * Important: DbSessionProvider implementations
 * should NOT create new db sessions! DbSession should
 * be already created and somehow assigned to DbSessionProvider
 * implementation. User must control session opening and closing,
 * and not DbSessionProvider, as we can not figure
 * weather connection should be closed after closing a query;
 * or still hold on open for the next query.
 */
public interface DbSessionProvider {

	/**
	 * Returns {@link DbSession}. May throws an exception
	 * if session can not be provided.
	 */
	DbSession getDbSession();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy