Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.unique.support.orm.connection;
 
 
 
 public class SingleThreadConnectionHolder {
 
	public static Connection getConnection(DataSource dataSourcethrows SQLException {
		return getConnectionHolder().getConnection(dataSource);
	}
	public static void removeConnection(DataSource dataSource) {
	}
	private static ConnectionHolder getConnectionHolder() {
		ConnectionHolder connectionHolder = .get();
		if (connectionHolder == null) {
			connectionHolder = new ConnectionHolder();
			.set(connectionHolder);
		}
		return connectionHolder;
	}
New to GrepCode? Check out our FAQ X