planView.include(renderRequest, renderResponse);
}
private static String attemptConnect(PortletRequest request, PoolData data) throws SQLException, IllegalAccessException, InstantiationException {
Class driverClass = attemptDriverLoad(request, data);
Driver driver = (Driver) driverClass.newInstance();
if(driver.acceptsURL(data.url)) {
Properties props = new Properties();
if(data.user != null) {
props.put("user", data.user);
}
if(data.password != null) {
props.put("password", data.password);
}
Connection con = null;
try {
con = driver.connect(data.url, props);
final DatabaseMetaData metaData = con.getMetaData();
return metaData.getDatabaseProductName()+" "+metaData.getDatabaseProductVersion();
} finally {
if(con != null) try{con.close();}catch(SQLException e) {}
}