private String login() { String driver = attributes.getProperty("driver", ""); String url = attributes.getProperty("url", ""); String user = attributes.getProperty("user", ""); String password = attributes.getProperty("password", ""); session.put("autoCommit", "checked"); session.put("autoComplete", "1"); session.put("maxrows", "1000"); boolean isH2 = url.startsWith("jdbc:h2:"); try { Connection conn = server.getConnection(driver, url, user, password); session.setConnection(conn); session.put("url", url); session.put("user", user); session.remove("error"); settingSave(); return "frame.jsp"; } catch (Exception e) { session.put("error", getLoginError(e, isH2)); return "login.jsp"; } }
Connection conn; try { conn = server.getConnection(driver, url, user, password); } finally { prof.stopCollecting();
private String test() { String driver = attributes.getProperty("driver", ""); String url = attributes.getProperty("url", ""); String user = attributes.getProperty("user", ""); String password = attributes.getProperty("password", ""); session.put("driver", driver); session.put("url", url); session.put("user", user); boolean isH2 = url.startsWith("jdbc:h2:"); try { Connection conn = server.getConnection(driver, url, user, password, this); JdbcUtils.closeSilently(conn); session.put("error", "${text.login.testSuccessful}"); return "login.jsp"; } catch (Exception e) { session.put("error", getLoginError(e, isH2)); return "login.jsp"; } }
private String login() { String driver = attributes.getProperty("driver", ""); String url = attributes.getProperty("url", ""); String user = attributes.getProperty("user", ""); String password = attributes.getProperty("password", ""); session.put("autoCommit", "checked"); session.put("autoComplete", "1"); session.put("maxrows", "1000"); boolean isH2 = url.startsWith("jdbc:h2:"); try { Connection conn = server.getConnection(driver, url, user, password); session.setConnection(conn); session.put("url", url); session.put("user", user); session.remove("error"); settingSave(); return "frame.jsp"; } catch (Exception e) { session.put("error", getLoginError(e, isH2)); return "login.jsp"; } }
private String login() { String driver = attributes.getProperty("driver", ""); String url = attributes.getProperty("url", ""); String user = attributes.getProperty("user", ""); String password = attributes.getProperty("password", ""); session.put("autoCommit", "checked"); session.put("autoComplete", "1"); session.put("maxrows", "1000"); boolean isH2 = url.startsWith("jdbc:h2:"); try { Connection conn = server.getConnection(driver, url, user, password); session.setConnection(conn); session.put("url", url); session.put("user", user); session.remove("error"); settingSave(); return "frame.jsp"; } catch (Exception e) { session.put("error", getLoginError(e, isH2)); return "login.jsp"; } }
boolean isH2 = url.startsWith("jdbc:h2:"); try { Connection conn = server.getConnection(driver, url, user, password, this); session.setConnection(conn); session.put("url", url);
Connection conn; try { conn = server.getConnection(driver, url, user, password); } finally { prof.stopCollecting();
Connection conn; try { conn = server.getConnection(driver, url, user, password); } finally { prof.stopCollecting();