Author: agomes Date: Sun Sep 3 19:23:34 2017 New Revision: 1807161 URL: http://svn.apache.org/viewvc?rev=1807161&view=rev Log: Add a list for "JDBC Connection Configuration" "JDBC Driver class" attribut.
Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/images/screenshots/jdbc-config/jdbc-conn-config.png jmeter/trunk/xdocs/usermanual/component_reference.xml Modified: jmeter/trunk/bin/jmeter.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1807161&r1=1807160&r2=1807161&view=diff ============================================================================== --- jmeter/trunk/bin/jmeter.properties (original) +++ jmeter/trunk/bin/jmeter.properties Sun Sep 3 19:23:34 2017 @@ -717,6 +717,7 @@ wmlParser.types=text/vnd.wap.wml # Database validation query # based in https://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases list jdbc.config.check.query=select 1 from INFORMATION_SCHEMA.SYSTEM_USERS|select 1 from dual|select 1 from sysibm.sysdummy1|select 1|select 1 from rdb$database +jdbc.config.jdbc.driver.class=com.mysql.jdbc.Driver|org.postgresql.Driver|oracle.jdbc.OracleDriver|com.ingres.jdbc.IngresDriver|com.microsoft.sqlserver.jdbc.SQLServerDriver|com.microsoft.jdbc.sqlserver.SQLServerDriver|org.apache.derby.jdbc.ClientDriver|org.hsqldb.jdbc.JDBCDriver|com.ibm.db2.jcc.DB2Driver|org.apache.derby.jdbc.ClientDriver|org.h2.Driver|org.firebirdsql.jdbc.FBDrivery|org.mariadb.jdbc.Driver|org.sqlite.JDBC|net.sourceforge.jtds.jdbc.Driver #--------------------------------------------------------------------------- # OS Process Sampler configuration Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java?rev=1807161&r1=1807160&r2=1807161&view=diff ============================================================================== --- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java (original) +++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElementBeanInfo.java Sun Sep 3 19:23:34 2017 @@ -95,9 +95,10 @@ public class DataSourceElementBeanInfo e p = property("dbUrl"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); - p = property("driver"); + p = property("driver", TypeEditor.ComboStringEditor); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); + p.setValue(TAGS, getListJDBCDriverClass()); p = property("username"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); @@ -135,4 +136,13 @@ public class DataSourceElementBeanInfo e } return -1; } + + /** + * Get the list of JDBC driver classname for the main databases + * @return a String[] with the list of JDBC driver classname + */ + private String[] getListJDBCDriverClass() { + return JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.jdbc.driver.class", ""), "|"); //$NON-NLS-1$ + } + } Modified: jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1807161&r1=1807160&r2=1807161&view=diff ============================================================================== --- jmeter/trunk/xdocs/changes.xml [utf-8] (original) +++ jmeter/trunk/xdocs/changes.xml [utf-8] Sun Sep 3 19:23:34 2017 @@ -105,6 +105,7 @@ Incorporated feed back about unclear doc <li>JDBC Connection Configuration : Set Max Number of Connections to <code>0</code> by default</li> <li>JDBC Connection Configuration : Set "Validation Query" to <code>empty</code> by default to use isValid method of JDBC driver</li> <li>JDBC Connection Configuration : Add a list for main databases validation queries for "Validation Query" attribute</li> + <li>JDBC Connection Configuration : Add a list for main databases JDBC driver class name for "JDBC Driver class" attribute</li> </ul> <h3>Controllers</h3> Modified: jmeter/trunk/xdocs/images/screenshots/jdbc-config/jdbc-conn-config.png URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/jdbc-config/jdbc-conn-config.png?rev=1807161&r1=1807160&r2=1807161&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1807161&r1=1807160&r2=1807161&view=diff ============================================================================== --- jmeter/trunk/xdocs/usermanual/component_reference.xml (original) +++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sun Sep 3 19:23:34 2017 @@ -3989,7 +3989,7 @@ instead. (see figures 12 and 13).</p> </component> <component name="JDBC Connection Configuration" index="§-num;.4.10" - width="474" height="458" screenshot="jdbc-config/jdbc-conn-config.png"> + width="697" height="656" screenshot="jdbc-config/jdbc-conn-config.png"> <description>Creates a database connection (used by <complink name="JDBC Request"/>Sampler) from the supplied JDBC Connection settings. The connection may be optionally pooled between threads. Otherwise each thread gets its own connection. @@ -4047,7 +4047,25 @@ instead. (see figures 12 and 13).</p> </property> <property name="Database URL" required="Yes">JDBC Connection string for the database.</property> <property name="JDBC Driver class" required="Yes">Fully qualified name of driver class. (Must be in - JMeter's classpath - easiest to copy <code>.jar</code> file into JMeter's <code>/lib</code> directory).</property> + JMeter's classpath - easiest to copy <code>.jar</code> file into JMeter's <code>/lib</code> directory). + <p>The list of the validation queries can be configured with <code>jdbc.config.jdbc.driver.class</code> property and are by default:</p> + <dl> + <dt>hsqldb</dt><dd>org.hsqldb.jdbc.JDBCDriver</dd> + <dt>Oracle</dt><dd>oracle.jdbc.OracleDriver</dd> + <dt>DB2</dt><dd>com.ibm.db2.jcc.DB2Driver</dd> + <dt>MySQL</dt><dd>com.mysql.jdbc.Driver</dd> + <dt>Microsoft SQL Server (MS JDBC driver)</dt><dd>com.microsoft.sqlserver.jdbc.SQLServerDriver or com.microsoft.jdbc.sqlserver.SQLServerDriver</dd> + <dt>PostgreSQL</dt><dd>org.postgresql.Driver</dd> + <dt>Ingres</dt><dd>com.ingres.jdbc.IngresDriver</dd> + <dt>Derby</dt><dd>org.apache.derby.jdbc.ClientDriver</dd> + <dt>H2</dt><dd>org.h2.Driver</dd> + <dt>Firebird</dt><dd>org.firebirdsql.jdbc.FBDrivery</dd> + <dt>Apache Derby</dt><dd>org.apache.derby.jdbc.ClientDriver</dd> + <dt>MariaDB</dt><dd>org.mariadb.jdbc.Driver</dd> + <dt>SQLite</dt><dd>org.sqlite.JDBC</dd> + <dt>Sybase AES</dt><dd>net.sourceforge.jtds.jdbc.Driver</dd> + </dl> + </property> <property name="Username" required="No">Name of user to connect as.</property> <property name="Password" required="No">Password to connect with. (N.B. this is stored unencrypted in the test plan)</property> </properties>