|
Hibernate example source code file (FakeDataSource.java)
The Hibernate FakeDataSource.java source code//$Id$
package org.hibernate.ejb.test.connection;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
/**
* @author Emmanuel Bernard
*/
public class FakeDataSource implements DataSource {
public Connection getConnection() throws SQLException {
throw new FakeDataSourceException( "connection" );
}
public Connection getConnection(String username, String password) throws SQLException {
throw new FakeDataSourceException( "connection with password" );
}
public PrintWriter getLogWriter() throws SQLException {
throw new FakeDataSourceException( "getLogWriter" );
}
public void setLogWriter(PrintWriter out) throws SQLException {
throw new FakeDataSourceException( "setLogWriter" );
}
public void setLoginTimeout(int seconds) throws SQLException {
throw new FakeDataSourceException( "setLoginTimeout" );
}
public int getLoginTimeout() throws SQLException {
throw new FakeDataSourceException( "getLoginTimeout" );
}
public <T> T unwrap(Class
Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate FakeDataSource.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.