title: Setting JDBC Properties Using DataSource
body: <p>I am connecting to a mysql database using the DataSource object.</p>
  
  <pre><code>DataSource mysql = (DataSource) context.lookup("jdbc/MySQLDataSource");
  Connection conn = mysql.getConnection();
  </code></pre>
  
  <p>I want to set the property</p>
  
  <pre><code>rewriteBatchedStatements=true
  </code></pre>
  
  <p>for when I am doing some batch uploads. I have seen examples how to do this when people are using a driver manager like below: </p>
  
  <pre><code>String myConnectionString =
      "jdbc:mysql://localhost:3307/mydb?" +
      "useUnicode=true&amp;characterEncoding=UTF-8" +
      "&amp;rewriteBatchedStatements=true";
  try (Connection con = DriverManager.getConnection(myConnectionString, "root", "whatever"))
  </code></pre>
  
  <p>How do I go about setting this property using the DataSource?</p>