title: How to get driver class name (not driver name) from jdbc connection
body: <p>I have a context.xml file in the below format</p>
  
  <pre><code>&lt;Context shallowOutput="true" path="/"&gt;
  &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
  
    &lt;Resource name="jdbc/myDataSource"
          auth="Container"
          type="javax.sql.DataSource"
          factory="org.apache.commons.dbcp.BasicDataSourceFactory"
          driverClassName="oracle.jdbc.driver.OracleDriver"
          username="OMITTED"
          password="OMITTED"
          url="OMITTED"
          maxActive="20"
          maxIdle="10"
          maxWait="-1"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>From this contex.xml I need to get my Driver CLASS name.</p>
  
  <p>Everytime I try like </p>
  
  <p><code>DataSource ds = (DataSource)context.lookup("java:/jdbc/myDataSource")</code> </p>
  
  <p>and try to like get the the Driver Class name from the connection using </p>
  
  <p><code>ds.getConnection().getMetatData().getDriverName()</code></p>
  
  <p>It is returning just
  <strong><em>Oracle JDBC Driver</em></strong>  instead of the class name <strong>oracle.jdbc.driver.OracleDriver</strong></p>
  
  <p>How can I get the class name from the context.</p>