title: How can I get data from JDBC + Java to Javascript with Vert.x?
body: <p>I'm a noob with vertx, but I have already created the JDBC connection manager using a java class where I can print data from the result set: </p>
  
  <pre><code>ConnectionManager cm=ConnectionManager.getInstance();
  Connection conn = cm.getConnection();
  try {
      Statement stmt=conn.createStatement();
      try {
          ResultSet rs =
          stmt.executeQuery("select username, password from users");              
          try {
              if (rs.next()){
                  System.out.println(rs.getString(1));
              }
          } finally {
              rs.close();
          }
  
      } finally {
          stmt.close();
      }
  
  } finally {
      conn.close();
  }
  </code></pre>
  
  <p>Now I want to connect my vertx javascript app to this java class. I can't seem to get an idea where to start. I found a few sources from Google Groups, but none of them seem to shed some light:</p>
  
  <p><strong>Loading JDBC Drivers from JavaScript</strong>
  <a href="https://groups.google.com/forum/?fromgroups#!topic/vertx/_oJQaeH07Sg" rel="nofollow">https://groups.google.com/forum/?fromgroups#!topic/vertx/_oJQaeH07Sg</a></p>
  
  <p><strong>Executing Java from Javascript</strong>
  <a href="https://groups.google.com/forum/#!msg/vertx/VyZj2yqqGTM/tvnTg4T55kMJ" rel="nofollow">https://groups.google.com/forum/#!msg/vertx/VyZj2yqqGTM/tvnTg4T55kMJ</a></p>
  
  <p>I've also found a jdbc-persistor for Vert.x:</p>
  
  <p><strong>JDBC-persistor</strong>
  <a href="https://github.com/timyates/mod-jdbc-persistor/" rel="nofollow">https://github.com/timyates/mod-jdbc-persistor/</a></p>
  
  <p>I'm still trying to understand how to use it with my app. I will post whatever information I can share after, but for now, can anyone help me with this (persistor or direct java communication)? Thanks.</p>