Tabnine Logo
WebServer.getConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
getConnection
method
in
org.h2.server.web.WebServer

Best Java code snippets using org.h2.server.web.WebServer.getConnection (Showing top 8 results out of 315)

origin: com.h2database/h2

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";
  }
}
origin: com.h2database/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
origin: com.h2database/com.springsource.org.h2

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";
  }
}
origin: com.eventsourcing/h2

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";
  }
}
origin: org.wowtools/h2

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";
  }
}
origin: com.h2database/com.springsource.org.h2

boolean isH2 = url.startsWith("jdbc:h2:");
try {
  Connection conn = server.getConnection(driver, url, user, password, this);
  session.setConnection(conn);
  session.put("url", url);
origin: org.wowtools/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
origin: com.eventsourcing/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
org.h2.server.webWebServergetConnection

Javadoc

Open a database connection.

Popular methods of WebServer

  • <init>
  • getSession
    Get the web session object for the given session id.
  • init
  • addSession
    Create a session with a given connection.
  • getAllowOthers
  • getFile
    Read the given file from the file system or from the resources.
  • getStartDateTime
  • setAllowChunked
  • setAllowOthers
  • createNewSession
    Create a new web session id and object.
  • generateSessionId
  • getPort
  • generateSessionId,
  • getPort,
  • getSSL,
  • getSessions,
  • getSetting,
  • getSettingNames,
  • getSettings,
  • loadProperties,
  • readTranslations

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Permission (java.security)
    Legacy security code; do not use.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • JCheckBox (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now