Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/testfiles/JDBC_TESTS.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath">../lib/opt/hsqldb-2.4.0.jar</stringProp>
<stringProp name="TestPlan.user_define_classpath">../lib/opt/hsqldb-2.7.4.jar</stringProp>
</TestPlan>
<hashTree>
<JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="JDBC Connection Configuration" enabled="true">
Expand Down
28 changes: 28 additions & 0 deletions gradle/verification-keyring.keys
Original file line number Diff line number Diff line change
Expand Up @@ -6813,6 +6813,34 @@ Dw==
=QOGP
-----END PGP PUBLIC KEY BLOCK-----

pub 4CC08E7F47C3EC76
uid Brett Wooldridge (Sonatype) <brett.wooldridge@gmail.com>

sub 4D3FB07DD9F19B56
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFI4+QsBCAC1+xCdhXj0MuViNA21Pno8bHunP0UIZQmC9BNl7dVuUC8/rg9V
1dlZyXF8SNycOKqT461m41H5VNBmwt64OIuJiUcUreVSs07iLzpn8mQPwyTaRZYd
YlZns5V/3ukfGYUVCWScMdc8WaJwTVxfRwNhnJ2/QbAcIZDypwAd0P03ofpvnt/8
YqvVyzpJqNTDLFjLpEcditVn4EioVVMcvUu4YVwmUSdBjrMLp0xC8PvbyWiw4dCA
T4C2zFycrr4M2legiZv/N6Tw0fPRE/EALYtIhgLSeqx5Pg9ku/KA6zMraFovnMDM
haJ9+ZsCPxd9JaJ021C9I7EXDA+W5t+DPODDABEBAAG0OEJyZXR0IFdvb2xkcmlk
Z2UgKFNvbmF0eXBlKSA8YnJldHQud29vbGRyaWRnZUBnbWFpbC5jb20+uQENBFI4
+QsBCAD0Xrq6nXmqubsB+XdgLof14wH7UIw693FUUndKcK+LVaMe7dP8F1Emkorf
YvwTOKQy6L+rUOm23MHuxxwB+msIpMX3WCzFGSq1WjYPd6wVj47yP/wqqhIqQO3q
tUeOVlyTwy8KccrAkXpDjkTlZ0cVP2lqNo6gRTypkvmHYgLYzNNV1GJm+v+t4sm4
jMepvKLl11/gUNLHx2VpL37w1i6Mm53iiW2GXGin1gPSWB3FtspMLAQdE2Xk0yRk
s+eUJ5e8oj3eJD5w4b3fqsWFCmK8q+/5uPK3Po2xe1oSmpHBm38MFUAxErtabNrB
EioSC5wNER0DhB4gEKVUXLyIDXUDABEBAAGJAR8EGAECAAkFAlI4+QsCGwwACgkQ
TMCOf0fD7HYHrgf9F4p3sWyNApGF8V1GEQEyGUPtfxNd0N1Jzd10MCh470fiBjaQ
IebkCEhneiNBAOWK52HxAlWRINAAa7fVJ8XpmzTbTLDLL1ZrEI//21ZQ3gUxCRgr
shy7lEV1fNJTuZadBbOU/+1L2Bbz9zu7Vju+9DU5sr3c5Byu/E+l/o1i/DvymoFA
OOepAO4IxpEV/ma4d8KYaWhSSb7UgwMjAkPt3YsnxQAnNbApZenVo+NLO+2XRAbd
BzEtRoazqYje0BzSewiTyXruVKK7Ineo6tRWyOMvdYhnoz5EZejp3gkaBmE4U0aa
qOSJ1UKXf8amAyQGcdIzRNx+3apFHn0h2yaMug==
=mIr1
-----END PGP PUBLIC KEY BLOCK-----

pub 4E066E0459CD109B
uid Henri Biestro (CODE SIGNING KEY) <henrib@apache.org>

Expand Down
1 change: 1 addition & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
<trusting group="^org[.]eclipse[.]jetty($|([.].*))" regex="true"/>
</trusted-key>
<trusted-key id="F3184BCD55F4D016E30D4C9BF42E87F9665015C9" group="org.jsoup"/>
<trusted-key id="F3A90E6B10E809F851AB4FC54CC08E7F47C3EC76" group="com.zaxxer" name="HikariCP" version="7.0.2"/>
<trusted-key id="F5FEBA84EB26C56457B2CF819E31AB27445478DB" group="org.infinispan"/>
<trusted-key id="FA77DCFEF2EE6EB2DEBEDD2C012579464D01C06A">
<trusting group="org.apache"/>
Expand Down
4 changes: 0 additions & 4 deletions lib/aareadme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@ tika-1.21
http://tika.apache.org/
- Regular Expression Extractor

commons-dbcp2-2.5.0 (org.apache.commons.dbcp2)
--------------------------
- DataSourceElement (JDBC)

Saxon-HE-9.9.1-5 (net.sf.saxon)
--------------------------
- XPath2Extractor (XML)
Expand Down
2 changes: 1 addition & 1 deletion src/bom-thirdparty/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dependencies {
api("com.miglayout:miglayout-swing:5.3")
api("com.sun.activation:javax.activation:1.2.0")
api("com.thoughtworks.xstream:xstream:1.4.21")
api("com.zaxxer:HikariCP:7.0.2")
api("commons-codec:commons-codec:1.19.0")
api("commons-collections:commons-collections:3.2.2")
api("commons-io:commons-io:2.20.0")
Expand Down Expand Up @@ -90,7 +91,6 @@ dependencies {
api("net.sf.saxon:Saxon-HE:12.9")
api("org.apache-extras.beanshell:bsh:2.0b6")
api("org.apache.commons:commons-collections4:4.5.0")
api("org.apache.commons:commons-dbcp2:2.9.0")
api("org.apache.commons:commons-jexl3:3.5.0")
api("org.apache.commons:commons-jexl:2.1.1")
api("org.apache.commons:commons-lang3:3.19.0") {
Expand Down
2 changes: 1 addition & 1 deletion src/dist-check/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {

extraTestDependencies(platform(projects.src.bomThirdparty))
extraTestDependencies(platform(projects.src.bomTesting))
extraTestDependencies("org.hsqldb:hsqldb::jdk8")
extraTestDependencies("org.hsqldb:hsqldb")
extraTestDependencies("org.apache.mina:mina-core")
extraTestDependencies("org.apache.ftpserver:ftplet-api")
extraTestDependencies("org.apache.ftpserver:ftpserver-core")
Expand Down
1 change: 1 addition & 0 deletions src/dist/src/dist/expected_release_jars.csv
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
223993,groovy-xml-5.0.2.jar
126373,hamcrest-3.0.jar
2403,hamcrest-core-3.0.jar
172312,HikariCP-7.0.2.jar
181512,httpasyncclient-4.1.5.jar
785639,httpclient-4.5.14.jar
327891,httpcore-4.4.16.jar
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/jdbc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
dependencies {
api(projects.src.core)

implementation("org.apache.commons:commons-dbcp2")
implementation("com.zaxxer:HikariCP")
implementation("commons-io:commons-io") {
because("IOUtils")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,11 @@ protected byte[] execute(Connection conn, SampleResult sample) throws SQLExcepti
try (Statement stmt = conn.createStatement()) {
setQueryTimeout(stmt, getIntegerQueryTimeout());
configureMaxRows(stmt);
ResultSet rs = null;
try {
rs = stmt.executeQuery(getQuery());
try (ResultSet rs = stmt.executeQuery(getQuery())) {
sample.latencyEnd();
return getStringFromResultSet(rs).getBytes(ENCODING);
} finally {
close(rs);
commitTransaction(conn);
}
}
} else if (CALLABLE.equals(currentQueryType)) {
Expand All @@ -186,6 +184,8 @@ protected byte[] execute(Connection conn, SampleResult sample) throws SQLExcepti
sample.latencyEnd();
String sb = resultSetsToString(cstmt,hasResultSet, out);
return sb.getBytes(ENCODING);
} finally {
commitTransaction(conn);
}
} else if (UPDATE.equals(currentQueryType)) {
try (Statement stmt = conn.createStatement()) {
Expand All @@ -195,18 +195,18 @@ protected byte[] execute(Connection conn, SampleResult sample) throws SQLExcepti
int updateCount = stmt.getUpdateCount();
String results = updateCount + " updates";
return results.getBytes(ENCODING);
} finally {
commitTransaction(conn);
}
} else if (PREPARED_SELECT.equals(currentQueryType)) {
try (PreparedStatement pstmt = getPreparedStatement(conn)) {
setArguments(pstmt);
configureMaxRows(pstmt);
ResultSet rs = null;
try {
rs = pstmt.executeQuery();
try (ResultSet rs = pstmt.executeQuery()) {
sample.latencyEnd();
return getStringFromResultSet(rs).getBytes(ENCODING);
} finally {
close(rs);
commitTransaction(conn);
}
}
} else if (PREPARED_UPDATE.equals(currentQueryType)) {
Expand All @@ -216,6 +216,8 @@ protected byte[] execute(Connection conn, SampleResult sample) throws SQLExcepti
sample.latencyEnd();
String sb = resultSetsToString(pstmt,false,null);
return sb.getBytes(ENCODING);
} finally {
commitTransaction(conn);
}
} else if (ROLLBACK.equals(currentQueryType)){
conn.rollback();
Expand All @@ -238,6 +240,13 @@ protected byte[] execute(Connection conn, SampleResult sample) throws SQLExcepti
}
}

private static void commitTransaction(Connection conn) throws SQLException {
if (!conn.getAutoCommit()) {
// HikariCP rollsback the transaction when a dirty connection returns back to the pool, so we commit it explicitly
conn.commit();
}
}

private void configureMaxRows(Statement stmt) throws SQLException {
int maxRows = getIntegerResultSetMaxRows();
if (maxRows >= 0) {
Expand Down
Loading
Loading