Code example for Connection

Methods: getMetaData

			logger.debug("Checking meta-data for retrieving max length of table names"); 
		DatabaseMetaData dmd = null;
		try { 
			Connection connection = dataSource.getConnection();
			dmd = connection.getMetaData();			
			maxTableNameLength = dmd.getMaxTableNameLength();
			if (logger.isDebugEnabled()) 
				logger.debug("Support max table name length = " + maxTableNameLength);
			maxColumnNameLength = dmd.getMaxColumnNameLength();
			if (logger.isDebugEnabled()) 
				logger.debug("Support max column name length = " + maxColumnNameLength);
		} catch (SQLException e) {
			if (logger.isDebugEnabled()) 
Stop searching for code, let great code find you!  Add Codota to your java IDE