title: Open connection on first create only, sqlDriver
body: <p>I have a performance issue with sqlConnexion with android. Problem is, I open the connexion for each request i make on the server. I would prefer to open it once, when the user first log in.</p>
  
  <p>here is some of the code:</p>
  
  <pre><code>    public void onClick(View v) {
      // Perform action on click
      new Thread(new Runnable() {
          public void run() {
              Statement statement;
              try {
               *//This would be better to instantiate connexion at first...*
                  connexion =   DriverManager.getConnection(url,     "login",    
                          "pass");//Not true login of course...
                  statement = connexion.createStatement();
                  ResultSet resultat = statement
                          .executeQuery("SELECT name  FROM users;");
  
                  while (resultat.next()) {
                      resultId = resultat.getString("name");
                  }
              } catch (SQLException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      }).start();
  </code></pre>
  
  <p>If I place the <code>DriverManager</code> in a method, I get an error from server.
  In another class, I get <code>NullPointerException</code>.</p>
  
  <p>I know working with json parser may be a better aproach, but I'm starting to learn, and Java/Android are more than enought too give me headeache for now...</p>