View | Details | Raw Unified | Return to bug 58786
Collapse All | Expand All

(-)build.properties (-27 / +10 lines)
Lines 139-176 Link Here
139
dnsjava.loc                 = ${maven2.repo}/dnsjava/dnsjava/${dnsjava.version}
139
dnsjava.loc                 = ${maven2.repo}/dnsjava/dnsjava/${dnsjava.version}
140
dnsjava.md5                 = 11363bd58696feae207a992da2ce7a90
140
dnsjava.md5                 = 11363bd58696feae207a992da2ce7a90
141
141
142
excalibur-instrument.version = 1.0
143
excalibur-instrument.jar    = excalibur-instrument-${excalibur-instrument.version}.jar
144
excalibur-instrument.loc    = ${maven2.repo}/excalibur-instrument/excalibur-instrument/${excalibur-instrument.version}
145
excalibur-instrument.md5    = 81BF95737C97A46836EA5F21F7C82719
146
147
excalibur-logger.version    = 1.1
142
excalibur-logger.version    = 1.1
148
excalibur-logger.jar        = excalibur-logger-${excalibur-logger.version}.jar
143
excalibur-logger.jar        = excalibur-logger-${excalibur-logger.version}.jar
149
excalibur-logger.loc        = ${maven2.repo}/excalibur-logger/excalibur-logger/${excalibur-logger.version}
144
excalibur-logger.loc        = ${maven2.repo}/excalibur-logger/excalibur-logger/${excalibur-logger.version}
150
excalibur-logger.md5        = E8246C546B7B0CAFD65947E9B80BB884
145
excalibur-logger.md5        = E8246C546B7B0CAFD65947E9B80BB884
151
146
152
excalibur-datasource.version = 2.1
153
excalibur-datasource.jar    = excalibur-datasource-${excalibur-datasource.version}.jar
154
excalibur-datasource.loc    = ${maven2.repo}/excalibur-datasource/excalibur-datasource/${excalibur-datasource.version}
155
excalibur-datasource.md5    = 7a57ccdfeda3a4f157016f5a9270a4f9
156
 
157
# pool has been split into 3 parts
158
excalibur-pool.version       = 2.1
159
excalibur-pool-api.version   = ${excalibur-pool.version}
160
excalibur-pool-api.jar       = excalibur-pool-api-${excalibur-pool-api.version}.jar
161
excalibur-pool-api.loc       = ${maven2.repo}/excalibur-pool/excalibur-pool-api/${excalibur-pool-api.version}
162
excalibur-pool-api.md5       = f9a224e1ee0896764aadbf7ddd253acc
163
164
excalibur-pool-impl.version  = ${excalibur-pool.version}
165
excalibur-pool-impl.jar      = excalibur-pool-impl-${excalibur-pool-impl.version}.jar
166
excalibur-pool-impl.loc      = ${maven2.repo}/excalibur-pool/excalibur-pool-impl/${excalibur-pool-impl.version}
167
excalibur-pool-impl.md5      = 8be9c177894998090b4662326d7f22de
168
169
excalibur-pool-instrumented.version = ${excalibur-pool.version}
170
excalibur-pool-instrumented.jar     = excalibur-pool-instrumented-${excalibur-pool-instrumented.version}.jar
171
excalibur-pool-instrumented.loc     = ${maven2.repo}/excalibur-pool/excalibur-pool-instrumented/${excalibur-pool-instrumented.version}
172
excalibur-pool-instrumented.md5     = 1b5425fe0fe63dc67da6fe995db6be31
173
174
# Freemarker
147
# Freemarker
175
freemarker.version          = 2.3.23
148
freemarker.version          = 2.3.23
176
freemarker.loc               = ${maven2.repo}/org/freemarker/freemarker/${freemarker.version}
149
freemarker.loc               = ${maven2.repo}/org/freemarker/freemarker/${freemarker.version}
Lines 312-317 Link Here
312
tika-parsers.loc            = ${maven2.repo}/org/apache/tika/tika-parsers/${tika-parsers.version}
285
tika-parsers.loc            = ${maven2.repo}/org/apache/tika/tika-parsers/${tika-parsers.version}
313
tika-parsers.md5            = 8008cfa48ebc5caa350af235c05e9b67
286
tika-parsers.md5            = 8008cfa48ebc5caa350af235c05e9b67
314
287
288
tomcat-juli.version           = 8.0.30
289
tomcat-juli.jar               = tomcat-juli-${tomcat-juli.version}.jar
290
tomcat-juli.loc               = ${maven2.repo}/org/apache/tomcat/tomcat-juli/${tomcat-juli.version}
291
tomcat-juli.md5               = d872df1032dc3a7bb9e0fe39b2db3a7d
292
293
tomcat-jdbc.version           = 8.0.30
294
tomcat-jdbc.jar               = tomcat-jdbc-${tomcat-jdbc.version}.jar
295
tomcat-jdbc.loc               = ${maven2.repo}//org/apache/tomcat/tomcat-jdbc/${tomcat-jdbc.version}
296
tomcat-jdbc.md5               = 3f440d76d14263eae15cfe394d792cec
297
315
# XStream can be found at: http://x-stream.github.io
298
# XStream can be found at: http://x-stream.github.io
316
xstream.version             = 1.4.8
299
xstream.version             = 1.4.8
317
xstream.jar                 = xstream-${xstream.version}.jar
300
xstream.jar                 = xstream-${xstream.version}.jar
(-)build.xml (-17 / +7 lines)
Lines 375-386 Link Here
375
    <include name="${lib.dir}/${commons-net.jar}"/>
375
    <include name="${lib.dir}/${commons-net.jar}"/>
376
    <include name="${lib.dir}/${commons-pool2.jar}"/>
376
    <include name="${lib.dir}/${commons-pool2.jar}"/>
377
    <include name="${lib.dir}/${dnsjava.jar}"/>
377
    <include name="${lib.dir}/${dnsjava.jar}"/>
378
    <include name="${lib.dir}/${excalibur-datasource.jar}"/>
379
    <include name="${lib.dir}/${excalibur-instrument.jar}"/>
380
    <include name="${lib.dir}/${excalibur-logger.jar}"/>
378
    <include name="${lib.dir}/${excalibur-logger.jar}"/>
381
    <include name="${lib.dir}/${excalibur-pool-api.jar}"/>
382
    <include name="${lib.dir}/${excalibur-pool-impl.jar}"/>
383
    <include name="${lib.dir}/${excalibur-pool-instrumented.jar}"/>
384
  	<include name="${lib.dir}/${freemarker.jar}"/>
379
  	<include name="${lib.dir}/${freemarker.jar}"/>
385
    <include name="${lib.dir}/${htmllexer.jar}"/>
380
    <include name="${lib.dir}/${htmllexer.jar}"/>
386
    <include name="${lib.dir}/${htmlparser.jar}"/>
381
    <include name="${lib.dir}/${htmlparser.jar}"/>
Lines 411-416 Link Here
411
    <include name="${lib.dir}/${jtidy.jar}"/>
406
    <include name="${lib.dir}/${jtidy.jar}"/>
412
    <include name="${lib.dir}/${tika-core.jar}"/>
407
    <include name="${lib.dir}/${tika-core.jar}"/>
413
    <include name="${lib.dir}/${tika-parsers.jar}"/>
408
    <include name="${lib.dir}/${tika-parsers.jar}"/>
409
  	<include name="${lib.dir}/${tomcat-juli.jar}"/>
410
    <include name="${lib.dir}/${tomcat-jdbc.jar}"/>
414
    <include name="${lib.dir}/${xalan.jar}"/>
411
    <include name="${lib.dir}/${xalan.jar}"/>
415
    <include name="${lib.dir}/${xerces.jar}"/>
412
    <include name="${lib.dir}/${xerces.jar}"/>
416
    <include name="${lib.dir}/${xml-apis.jar}"/>
413
    <include name="${lib.dir}/${xml-apis.jar}"/>
Lines 452-463 Link Here
452
    <pathelement location="${lib.dir}/${commons-net.jar}"/>
449
    <pathelement location="${lib.dir}/${commons-net.jar}"/>
453
    <pathelement location="${lib.dir}/${commons-pool2.jar}"/>
450
    <pathelement location="${lib.dir}/${commons-pool2.jar}"/>
454
    <pathelement location="${lib.dir}/${dnsjava.jar}"/>
451
    <pathelement location="${lib.dir}/${dnsjava.jar}"/>
455
    <pathelement location="${lib.dir}/${excalibur-datasource.jar}"/>
456
    <pathelement location="${lib.dir}/${excalibur-instrument.jar}"/>
457
    <pathelement location="${lib.dir}/${excalibur-logger.jar}"/>
452
    <pathelement location="${lib.dir}/${excalibur-logger.jar}"/>
458
    <pathelement location="${lib.dir}/${excalibur-pool-api.jar}"/>
459
    <pathelement location="${lib.dir}/${excalibur-pool-impl.jar}"/>
460
    <pathelement location="${lib.dir}/${excalibur-pool-instrumented.jar}"/>
461
  	<pathelement location="${lib.dir}/${freemarker.jar}"/>
453
  	<pathelement location="${lib.dir}/${freemarker.jar}"/>
462
    <pathelement location="${lib.dir}/${htmllexer.jar}"/>
454
    <pathelement location="${lib.dir}/${htmllexer.jar}"/>
463
    <pathelement location="${lib.dir}/${htmlparser.jar}"/>
455
    <pathelement location="${lib.dir}/${htmlparser.jar}"/>
Lines 488-494 Link Here
488
    <pathelement location="${lib.dir}/${jtidy.jar}"/>
480
    <pathelement location="${lib.dir}/${jtidy.jar}"/>
489
    <pathelement location="${lib.dir}/${tika-core.jar}"/>
481
    <pathelement location="${lib.dir}/${tika-core.jar}"/>
490
    <pathelement location="${lib.dir}/${tika-parsers.jar}"/>
482
    <pathelement location="${lib.dir}/${tika-parsers.jar}"/>
491
    <pathelement location="${lib.dir}/${xalan.jar}"/>
483
    <pathelement location="${lib.dir}/${tomcat-juli.jar}"/>
484
    <pathelement location="${lib.dir}/${tomcat-jdbc.jar}"/>
485
  	<pathelement location="${lib.dir}/${xalan.jar}"/>
492
    <pathelement location="${lib.dir}/${xerces.jar}"/>
486
    <pathelement location="${lib.dir}/${xerces.jar}"/>
493
    <pathelement location="${lib.dir}/${xml-apis.jar}"/>
487
    <pathelement location="${lib.dir}/${xml-apis.jar}"/>
494
    <pathelement location="${lib.dir}/${xmlgraphics-commons.jar}"/>
488
    <pathelement location="${lib.dir}/${xmlgraphics-commons.jar}"/>
Lines 2853-2864 Link Here
2853
        <process_jarfile jarname="commons-net"/>
2847
        <process_jarfile jarname="commons-net"/>
2854
    	<process_jarfile jarname="commons-pool2"/>
2848
    	<process_jarfile jarname="commons-pool2"/>
2855
        <process_jarfile jarname="dnsjava"/>
2849
        <process_jarfile jarname="dnsjava"/>
2856
        <process_jarfile jarname="excalibur-datasource"/>
2857
        <process_jarfile jarname="excalibur-instrument"/>
2858
        <process_jarfile jarname="excalibur-logger"/>
2850
        <process_jarfile jarname="excalibur-logger"/>
2859
        <process_jarfile jarname="excalibur-pool-api"/>
2860
        <process_jarfile jarname="excalibur-pool-impl"/>
2861
        <process_jarfile jarname="excalibur-pool-instrumented"/>
2862
        <process_jarfile jarname="freemarker"/>
2851
        <process_jarfile jarname="freemarker"/>
2863
        <process_jarfile jarname="htmllexer"/>
2852
        <process_jarfile jarname="htmllexer"/>
2864
        <process_jarfile jarname="htmlparser"/>
2853
        <process_jarfile jarname="htmlparser"/>
Lines 2889-2894 Link Here
2889
        <process_jarfile jarname="jtidy"/>
2878
        <process_jarfile jarname="jtidy"/>
2890
        <process_jarfile jarname="tika-core"/>
2879
        <process_jarfile jarname="tika-core"/>
2891
        <process_jarfile jarname="tika-parsers"/>
2880
        <process_jarfile jarname="tika-parsers"/>
2881
        <process_jarfile jarname="tomcat-juli"/>
2882
        <process_jarfile jarname="tomcat-jdbc"/>
2892
        <process_jarfile jarname="velocity"   dest.dir="${lib.doc}"/>
2883
        <process_jarfile jarname="velocity"   dest.dir="${lib.doc}"/>
2893
        <process_jarfile jarname="commons-lang" dest.dir="${lib.doc}"/>
2884
        <process_jarfile jarname="commons-lang" dest.dir="${lib.doc}"/>
2894
        <process_jarfile jarname="xalan"/>
2885
        <process_jarfile jarname="xalan"/>
Lines 2925-2931 Link Here
2925
        <delete verbose="true">
2916
        <delete verbose="true">
2926
          <fileset dir="${lib.api}" includes="bcmail-jdk15-*.jar bcprov-jdk15-*.jar"/>
2917
          <fileset dir="${lib.api}" includes="bcmail-jdk15-*.jar bcprov-jdk15-*.jar"/>
2927
          <!-- tidy up old pool jar -->
2918
          <!-- tidy up old pool jar -->
2928
          <fileset dir="${lib.dir}" includes="excalibur-pool-1.2.jar"/>
2929
        </delete>
2919
        </delete>
2930
        <antcall target="_process_all_jars">
2920
        <antcall target="_process_all_jars">
2931
            <param name="_get_file" value="true"/>
2921
            <param name="_get_file" value="true"/>
(-)eclipse.classpath (-5 lines)
Lines 58-69 Link Here
58
	<classpathentry kind="lib" path="lib/commons-net-3.4.jar"/>
58
	<classpathentry kind="lib" path="lib/commons-net-3.4.jar"/>
59
	<classpathentry kind="lib" path="lib/commons-pool2-2.4.2.jar"/>
59
	<classpathentry kind="lib" path="lib/commons-pool2-2.4.2.jar"/>
60
	<classpathentry kind="lib" path="lib/dnsjava-2.1.7.jar"/>
60
	<classpathentry kind="lib" path="lib/dnsjava-2.1.7.jar"/>
61
	<classpathentry kind="lib" path="lib/excalibur-datasource-2.1.jar"/>
62
	<classpathentry kind="lib" path="lib/excalibur-instrument-1.0.jar"/>
63
	<classpathentry kind="lib" path="lib/excalibur-logger-1.1.jar"/>
61
	<classpathentry kind="lib" path="lib/excalibur-logger-1.1.jar"/>
64
	<classpathentry kind="lib" path="lib/excalibur-pool-api-2.1.jar"/>
65
	<classpathentry kind="lib" path="lib/excalibur-pool-impl-2.1.jar"/>
66
	<classpathentry kind="lib" path="lib/excalibur-pool-instrumented-2.1.jar"/>
67
	<classpathentry kind="lib" path="lib/freemarker-2.3.23.jar"/>
62
	<classpathentry kind="lib" path="lib/freemarker-2.3.23.jar"/>
68
	<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.1.1.jar"/>
63
	<classpathentry kind="lib" path="lib/geronimo-jms_1.1_spec-1.1.1.jar"/>
69
	<classpathentry kind="lib" path="lib/htmllexer-2.1.jar"/>
64
	<classpathentry kind="lib" path="lib/htmllexer-2.1.jar"/>
(-)lib/aareadme.txt (-12 / +8 lines)
Lines 91-112 Link Here
91
http://www.dnsjava.org/download/
91
http://www.dnsjava.org/download/
92
- DNSCacheManager
92
- DNSCacheManager
93
93
94
excalibur-datasource-1.1.1 (org.apache.avalon.excalibur.datasource)
95
--------------------------
96
- DataSourceElement (JDBC)
97
98
excalibur-instrument-1.0 (org.apache.excalibur.instrument)
99
------------------------
100
- used by excalibur-datasource
101
102
excalibur-logger-1.1 (org.apache.avalon.excalibur.logger)
94
excalibur-logger-1.1 (org.apache.avalon.excalibur.logger)
103
--------------------
95
--------------------
104
- LoggingManager
96
- LoggingManager
105
97
106
excalibur-pool-1.2 (org.apache.avalon.excalibur.pool)
107
------------------
108
- used by excalibur-datasource
109
110
freemarker-2.3.23.jar
98
freemarker-2.3.23.jar
111
----------------------
99
----------------------
112
- used by Report/Dashboard feature
100
- used by Report/Dashboard feature
Lines 227-232 Link Here
227
http://tika.apache.org/
215
http://tika.apache.org/
228
- Regular Expression Extractor
216
- Regular Expression Extractor
229
217
218
tomcat-juli-8.0.30 (org.apache.juli)
219
--------------------------
220
- used by tomcat-jdbc
221
222
tomcat-jdbc-8.0.30 (org.apache.tomcat.jdbc)
223
--------------------------
224
- DataSourceElement (JDBC)
225
230
velocity-1.7
226
velocity-1.7
231
--------------
227
--------------
232
http://velocity.apache.org/download.cgi
228
http://velocity.apache.org/download.cgi
(-)licenses/bin/README.txt (-5 / +2 lines)
Lines 16-27 Link Here
16
commons-math3-3.5.jar
16
commons-math3-3.5.jar
17
commons-net-3.4.jar
17
commons-net-3.4.jar
18
commons-pool2-2.4.2.jar
18
commons-pool2-2.4.2.jar
19
excalibur-datasource-2.1.jar
20
excalibur-instrument-1.0.jar
21
excalibur-logger-1.1.jar
19
excalibur-logger-1.1.jar
22
excalibur-pool-api-2.1.jar
23
excalibur-pool-impl-2.1.jar
24
excalibur-pool-instrumented-2.1.jar
25
geronimo-jms_1.1_spec-1.1.1.jar
20
geronimo-jms_1.1_spec-1.1.1.jar
26
httpclient-4.5.1.jar
21
httpclient-4.5.1.jar
27
httpcore-4.4.4.jar
22
httpcore-4.4.4.jar
Lines 33-38 Link Here
33
soap-2.3.1.jar
28
soap-2.3.1.jar
34
tika-core-1.11.jar
29
tika-core-1.11.jar
35
tika-parsers-1.11.jar
30
tika-parsers-1.11.jar
31
tomcat-juli-8.0.30.jar
32
tomcat-jdbc-8.0.30.jar
36
xalan-2.7.2.jar
33
xalan-2.7.2.jar
37
xercesImpl-2.11.0.jar
34
xercesImpl-2.11.0.jar
38
xml-apis-1.4.01.jar
35
xml-apis-1.4.01.jar
(-)res/maven/ApacheJMeter_parent.pom (-41 / +12 lines)
Lines 70-82 Link Here
70
      <commons-net.version>3.4</commons-net.version>
70
      <commons-net.version>3.4</commons-net.version>
71
      <commons-pool2.version>2.4.2</commons-pool2.version>
71
      <commons-pool2.version>2.4.2</commons-pool2.version>
72
      <dnsjava.version>2.1.7</dnsjava.version>
72
      <dnsjava.version>2.1.7</dnsjava.version>
73
      <excalibur-datasource.version>2.1</excalibur-datasource.version>
74
      <excalibur-instrument.version>1.0</excalibur-instrument.version>
75
      <excalibur-logger.version>1.1</excalibur-logger.version>
73
      <excalibur-logger.version>1.1</excalibur-logger.version>
76
      <excalibur-pool.version>2.1</excalibur-pool.version>
77
      <excalibur-pool-api.version>${excalibur-pool.version}</excalibur-pool-api.version>
78
      <excalibur-pool-impl.version>${excalibur-pool.version}</excalibur-pool-impl.version>
79
      <excalibur-pool-instrumented.version>${excalibur-pool.version}</excalibur-pool-instrumented.version>
80
      <freemarker.version>2.3.23</freemarker.version>
74
      <freemarker.version>2.3.23</freemarker.version>
81
      <htmlparser.version>2.1</htmlparser.version>
75
      <htmlparser.version>2.1</htmlparser.version>
82
      <httpclient.version>4.5.1</httpclient.version>
76
      <httpclient.version>4.5.1</httpclient.version>
Lines 102-107 Link Here
102
      <jtidy.version>r938</jtidy.version>
96
      <jtidy.version>r938</jtidy.version>
103
      <tika-core.version>1.11</tika-core.version>
97
      <tika-core.version>1.11</tika-core.version>
104
      <tika-parsers.version>1.11</tika-parsers.version>
98
      <tika-parsers.version>1.11</tika-parsers.version>
99
      <tomcat-juli.version>8.0.30</tomcat-juli.version>
100
      <tomcat-jdbc.version>8.0.30</tomcat-jdbc.version>
105
      <xstream.version>1.4.8</xstream.version>
101
      <xstream.version>1.4.8</xstream.version>
106
      <xalan.version>2.7.2</xalan.version>
102
      <xalan.version>2.7.2</xalan.version>
107
      <serializer.version>2.7.2</serializer.version>
103
      <serializer.version>2.7.2</serializer.version>
Lines 205-250 Link Here
205
        <version>${dnsjava.version}</version>
201
        <version>${dnsjava.version}</version>
206
      </dependency>
202
      </dependency>
207
      <dependency>
203
      <dependency>
208
        <groupId>excalibur-datasource</groupId>
209
        <artifactId>excalibur-datasource</artifactId>
210
        <version>${excalibur-datasource.version}</version>
211
        <exclusions>
212
            <exclusion>
213
                <groupId>excalibur-fortress</groupId>
214
                <artifactId>excalibur-fortress-container-api</artifactId>
215
            </exclusion>
216
            <exclusion>
217
                <groupId>excalibur-fortress</groupId>
218
                <artifactId>excalibur-fortress-meta</artifactId>
219
            </exclusion>
220
        </exclusions>
221
      </dependency>
222
      <dependency>
223
        <groupId>excalibur-instrument</groupId>
224
        <artifactId>excalibur-instrument</artifactId>
225
        <version>${excalibur-instrument.version}</version>
226
      </dependency>
227
      <dependency>
228
        <groupId>excalibur-logger</groupId>
204
        <groupId>excalibur-logger</groupId>
229
        <artifactId>excalibur-logger</artifactId>
205
        <artifactId>excalibur-logger</artifactId>
230
        <version>${excalibur-logger.version}</version>
206
        <version>${excalibur-logger.version}</version>
231
      </dependency>
207
      </dependency>
232
      <dependency>
208
      <dependency>
233
        <groupId>excalibur-pool</groupId>
234
        <artifactId>excalibur-pool-api</artifactId>
235
        <version>${excalibur-pool-api.version}</version>
236
      </dependency>
237
      <dependency>
238
        <groupId>excalibur-pool</groupId>
239
        <artifactId>excalibur-pool-impl</artifactId>
240
        <version>${excalibur-pool-impl.version}</version>
241
      </dependency>
242
      <dependency>
243
        <groupId>excalibur-pool</groupId>
244
        <artifactId>excalibur-pool-instrumented</artifactId>
245
        <version>${excalibur-pool-instrumented.version}</version>
246
      </dependency>
247
      <dependency>
248
        <groupId>org.htmlparser</groupId>
209
        <groupId>org.htmlparser</groupId>
249
        <artifactId>htmllexer</artifactId>
210
        <artifactId>htmllexer</artifactId>
250
        <version>${htmlparser.version}</version>
211
        <version>${htmlparser.version}</version>
Lines 327-332 Link Here
327
        <version>${tika-parsers.version}</version>
288
        <version>${tika-parsers.version}</version>
328
      </dependency>
289
      </dependency>
329
      <dependency>
290
      <dependency>
291
        <groupId>org.apache.tomcat</groupId>
292
        <artifactId>tomcat-juli</artifactId>
293
        <version>${tomcat-juli.version}</version>
294
      </dependency>
295
      <dependency>
296
        <groupId>org.apache.tomcat</groupId>
297
        <artifactId>tomcat-jdbc</artifactId>
298
        <version>${tomcat-jdbc.version}</version>
299
      </dependency>
300
      <dependency>
330
        <groupId>com.thoughtworks.xstream</groupId>
301
        <groupId>com.thoughtworks.xstream</groupId>
331
        <artifactId>xstream</artifactId>
302
        <artifactId>xstream</artifactId>
332
        <version>${xstream.version}</version>
303
        <version>${xstream.version}</version>
(-)src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java (-81 / +84 lines)
Lines 24-35 Link Here
24
import java.util.Map;
24
import java.util.Map;
25
import java.util.Set;
25
import java.util.Set;
26
26
27
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
28
import org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource;
29
import org.apache.avalon.framework.configuration.Configuration;
30
import org.apache.avalon.framework.configuration.ConfigurationException;
31
import org.apache.avalon.framework.configuration.DefaultConfiguration;
32
import org.apache.avalon.framework.logger.LogKitLogger;
33
import org.apache.jmeter.config.ConfigElement;
27
import org.apache.jmeter.config.ConfigElement;
34
import org.apache.jmeter.testbeans.TestBean;
28
import org.apache.jmeter.testbeans.TestBean;
35
import org.apache.jmeter.testbeans.TestBeanHelper;
29
import org.apache.jmeter.testbeans.TestBeanHelper;
Lines 40-67 Link Here
40
import org.apache.jorphan.logging.LoggingManager;
34
import org.apache.jorphan.logging.LoggingManager;
41
import org.apache.jorphan.util.JOrphanUtils;
35
import org.apache.jorphan.util.JOrphanUtils;
42
import org.apache.log.Logger;
36
import org.apache.log.Logger;
37
import org.apache.tomcat.jdbc.pool.DataSource;
38
import org.apache.tomcat.jdbc.pool.DataSourceProxy;
39
import org.apache.tomcat.jdbc.pool.PoolProperties;
43
40
44
public class DataSourceElement extends AbstractTestElement
41
public class DataSourceElement extends AbstractTestElement
45
    implements ConfigElement, TestStateListener, TestBean
42
    implements ConfigElement, TestStateListener, TestBean {
46
    {
47
    private static final Logger log = LoggingManager.getLoggerForClass();
43
    private static final Logger log = LoggingManager.getLoggerForClass();
48
44
49
    private static final long serialVersionUID = 233L;
45
    private static final long serialVersionUID = 234L;
50
46
51
    private transient String dataSource, driver, dbUrl, username, password, checkQuery, poolMax, connectionAge, timeout,
47
    private transient String dataSource;
52
            trimInterval,transactionIsolation;
48
    private transient String driver;
49
    private transient String dbUrl;
50
    private transient String username;
51
    private transient String password;
52
    private transient String checkQuery;
53
    private transient String poolMax;
54
    private transient String connectionAge;
55
    private transient String timeout;
56
    private transient String trimInterval;
57
    private transient String transactionIsolation;
53
58
54
    private transient boolean keepAlive, autocommit;
59
    private transient boolean keepAlive;
60
    private transient boolean autocommit;
55
61
56
    /*
62
    /*
57
     *  The datasource is set up by testStarted and cleared by testEnded.
63
     *  The datasource is set up by testStarted and cleared by testEnded.
58
     *  These are called from different threads, so access must be synchronized.
64
     *  These are called from different threads, so access must be synchronized.
59
     *  The same instance is called in each case.
65
     *  The same instance is called in each case.
60
    */
66
    */
61
    private transient ResourceLimitingJdbcDataSource excaliburSource;
67
    private transient DataSource tomcatPoolDataSource;
62
68
63
    // Keep a record of the pre-thread pools so that they can be disposed of at the end of a test
69
    // Keep a record of the pre-thread pools so that they can be disposed of at the end of a test
64
    private transient Set<ResourceLimitingJdbcDataSource> perThreadPoolSet;
70
    private transient Set<DataSource> perThreadPoolSet;
65
71
66
    public DataSourceElement() {
72
    public DataSourceElement() {
67
    }
73
    }
Lines 69-83 Link Here
69
    @Override
75
    @Override
70
    public void testEnded() {
76
    public void testEnded() {
71
        synchronized (this) {
77
        synchronized (this) {
72
            if (excaliburSource != null) {
78
            if (tomcatPoolDataSource != null) {
73
                excaliburSource.dispose();
79
                tomcatPoolDataSource.close(true);
74
            }
80
            }
75
            excaliburSource = null;
81
            tomcatPoolDataSource = null;
76
        }
82
        }
77
        if (perThreadPoolSet != null) {// in case
83
        if (perThreadPoolSet != null) {// in case
78
            for(ResourceLimitingJdbcDataSource dsc : perThreadPoolSet){
84
            for(DataSource dsc : perThreadPoolSet){
79
                log.debug("Disposing pool: "+dsc.getInstrumentableName()+" @"+System.identityHashCode(dsc));
85
                log.debug("Closing pool: "+dsc.getName()+" @"+System.identityHashCode(dsc));
80
                dsc.dispose();
86
                dsc.close(true);
81
            }
87
            }
82
            perThreadPoolSet=null;
88
            perThreadPoolSet=null;
83
        }
89
        }
Lines 100-113 Link Here
100
            log.error("JDBC data source already defined for: "+poolName);
106
            log.error("JDBC data source already defined for: "+poolName);
101
        } else {
107
        } else {
102
            String maxPool = getPoolMax();
108
            String maxPool = getPoolMax();
103
            perThreadPoolSet = Collections.synchronizedSet(new HashSet<ResourceLimitingJdbcDataSource>());
109
            perThreadPoolSet = Collections.synchronizedSet(new HashSet<DataSource>());
104
            if (maxPool.equals("0")){ // i.e. if we want per thread pooling
110
            if (maxPool.equals("0")){ // i.e. if we want per thread pooling
105
                variables.putObject(poolName, new DataSourceComponentImpl()); // pool will be created later
111
                variables.putObject(poolName, new DataSourceComponentImpl()); // pool will be created later
106
            } else {
112
            } else {
107
                ResourceLimitingJdbcDataSource src=initPool(maxPool);
113
                DataSource src=initPool(maxPool);
108
                synchronized(this){
114
                synchronized(this){
109
                    excaliburSource = src;
115
                    tomcatPoolDataSource = src;
110
                    variables.putObject(poolName, new DataSourceComponentImpl(excaliburSource));
116
                    variables.putObject(poolName, new DataSourceComponentImpl(tomcatPoolDataSource));
111
                }
117
                }
112
            }
118
            }
113
        }
119
        }
Lines 122-128 Link Here
122
    public Object clone() {
128
    public Object clone() {
123
        DataSourceElement el = (DataSourceElement) super.clone();
129
        DataSourceElement el = (DataSourceElement) super.clone();
124
        synchronized (this) {
130
        synchronized (this) {
125
            el.excaliburSource = excaliburSource;
131
            el.tomcatPoolDataSource = tomcatPoolDataSource;
126
            el.perThreadPoolSet = perThreadPoolSet;            
132
            el.perThreadPoolSet = perThreadPoolSet;            
127
        }
133
        }
128
        return el;
134
        return el;
Lines 140-147 Link Here
140
        if (poolObject == null) {
146
        if (poolObject == null) {
141
            throw new SQLException("No pool found named: '" + poolName + "', ensure Variable Name matches Variable Name of JDBC Connection Configuration");
147
            throw new SQLException("No pool found named: '" + poolName + "', ensure Variable Name matches Variable Name of JDBC Connection Configuration");
142
        } else {
148
        } else {
143
            if(poolObject instanceof DataSourceComponent) {
149
            if(poolObject instanceof DataSourceProxy) {
144
                DataSourceComponent pool = (DataSourceComponent) poolObject;
150
                DataSourceProxy pool = (DataSourceProxy) poolObject;
145
                return pool.getConnection();    
151
                return pool.getConnection();    
146
            } else {
152
            } else {
147
                String errorMsg = "Found object stored under variable:'"+poolName
153
                String errorMsg = "Found object stored under variable:'"+poolName
Lines 156-165 Link Here
156
     * Set up the DataSource - maxPool is a parameter, so the same code can
162
     * Set up the DataSource - maxPool is a parameter, so the same code can
157
     * also be used for setting up the per-thread pools.
163
     * also be used for setting up the per-thread pools.
158
    */
164
    */
159
    private ResourceLimitingJdbcDataSource initPool(String maxPool) {
165
    private DataSource initPool(String maxPool) {
160
        ResourceLimitingJdbcDataSource source = null;
166
        PoolProperties poolProperties = new PoolProperties();
161
        source = new ResourceLimitingJdbcDataSource();
162
        DefaultConfiguration config = new DefaultConfiguration("rl-jdbc"); // $NON-NLS-1$
163
167
164
        if (log.isDebugEnabled()) {
168
        if (log.isDebugEnabled()) {
165
            StringBuilder sb = new StringBuilder(40);
169
            StringBuilder sb = new StringBuilder(40);
Lines 173-189 Link Here
173
            sb.append(isAutocommit());
177
            sb.append(isAutocommit());
174
            log.debug(sb.toString());
178
            log.debug(sb.toString());
175
        }
179
        }
176
        DefaultConfiguration poolController = new DefaultConfiguration("pool-controller"); // $NON-NLS-1$
180
        poolProperties.setJmxEnabled(true);
177
        poolController.setAttribute("max", maxPool); // $NON-NLS-1$
181
        int poolSize = Integer.parseInt(maxPool);
178
        poolController.setAttribute("max-strict", "true"); // $NON-NLS-1$ $NON-NLS-2$
182
        poolProperties.setMinIdle(0);
179
        poolController.setAttribute("blocking", "true"); // $NON-NLS-1$ $NON-NLS-2$
183
        poolProperties.setInitialSize(poolSize);
180
        poolController.setAttribute("timeout", getTimeout()); // $NON-NLS-1$
184
        poolProperties.setMaxIdle(poolSize);
181
        poolController.setAttribute("trim-interval", getTrimInterval()); // $NON-NLS-1$
185
        poolProperties.setMaxActive(poolSize);
182
        config.addChild(poolController);
186
        poolProperties.setMaxWait(Integer.parseInt(getTimeout()));
183
187
184
        DefaultConfiguration autoCommit = new DefaultConfiguration("auto-commit"); // $NON-NLS-1$
188
        poolProperties.setDefaultAutoCommit(Boolean.valueOf(isAutocommit()));
185
        autoCommit.setValue(String.valueOf(isAutocommit()));
186
        config.addChild(autoCommit);
187
189
188
        if (log.isDebugEnabled()) {
190
        if (log.isDebugEnabled()) {
189
            StringBuilder sb = new StringBuilder(40);
191
            StringBuilder sb = new StringBuilder(40);
Lines 195-205 Link Here
195
            sb.append(getCheckQuery());
197
            sb.append(getCheckQuery());
196
            log.debug(sb.toString());
198
            log.debug(sb.toString());
197
        }
199
        }
198
        DefaultConfiguration cfgKeepAlive = new DefaultConfiguration("keep-alive"); // $NON-NLS-1$
200
        poolProperties.setTestOnBorrow(false);
199
        cfgKeepAlive.setAttribute("disable", String.valueOf(!isKeepAlive())); // $NON-NLS-1$
201
        poolProperties.setTestOnReturn(false);
200
        cfgKeepAlive.setAttribute("age", getConnectionAge()); // $NON-NLS-1$
202
        poolProperties.setTestOnConnect(false);
201
        cfgKeepAlive.setValue(getCheckQuery());
203
202
        poolController.addChild(cfgKeepAlive);
204
        if(isKeepAlive()) {
205
            poolProperties.setTestWhileIdle(true);
206
            poolProperties.setValidationQuery(getCheckQuery());
207
            // Not sure it is equivalent
208
            poolProperties.setMaxAge(Integer.parseInt(getConnectionAge()));            
209
            poolProperties.setTimeBetweenEvictionRunsMillis(Integer.parseInt(getTrimInterval()));
210
        }
211
212
        int transactionIsolation = DataSourceElementBeanInfo.getTransactionIsolationMode(getTransactionIsolation());
213
        if (transactionIsolation >= 0) {
214
            poolProperties.setDefaultTransactionIsolation(transactionIsolation);
215
        }
203
216
204
        String _username = getUsername();
217
        String _username = getUsername();
205
        if (log.isDebugEnabled()) {
218
        if (log.isDebugEnabled()) {
Lines 212-249 Link Here
212
            sb.append(_username);
225
            sb.append(_username);
213
            log.debug(sb.toString());
226
            log.debug(sb.toString());
214
        }
227
        }
215
        DefaultConfiguration cfgDriver = new DefaultConfiguration("driver"); // $NON-NLS-1$
228
        poolProperties.setDriverClassName(getDriver());
216
        cfgDriver.setValue(getDriver());
229
        poolProperties.setUrl(getDbUrl());
217
        config.addChild(cfgDriver);
218
        DefaultConfiguration cfgDbUrl = new DefaultConfiguration("dburl"); // $NON-NLS-1$
219
        cfgDbUrl.setValue(getDbUrl());
220
        config.addChild(cfgDbUrl);
221
230
222
        if (_username.length() > 0){
231
        if (_username.length() > 0){
223
            DefaultConfiguration cfgUsername = new DefaultConfiguration("user"); // $NON-NLS-1$
232
            poolProperties.setUsername(_username);
224
            cfgUsername.setValue(_username);
233
            poolProperties.setPassword(getPassword());
225
            config.addChild(cfgUsername);
226
            DefaultConfiguration cfgPassword = new DefaultConfiguration("password"); // $NON-NLS-1$
227
            cfgPassword.setValue(getPassword());
228
            config.addChild(cfgPassword);
229
        }
234
        }
230
235
231
        // log is required to ensure errors are available
236
        // log is required to ensure errors are available
232
        source.enableLogging(new LogKitLogger(log));
237
        //source.enableLogging(new LogKitLogger(log));
233
        try {
238
        DataSource dataSource = new DataSource();
234
            source.configure(config);
239
        if(log.isDebugEnabled()) {
235
            source.setInstrumentableName(getDataSource());
240
            log.debug("PoolConfiguration:"+poolProperties);
236
        } catch (ConfigurationException e) {
237
            log.error("Could not configure datasource for pool: "+getDataSource(),e);
238
        }
241
        }
239
        return source;
242
        dataSource.setPoolProperties(poolProperties);
243
        return dataSource;
240
    }
244
    }
241
245
242
    // used to hold per-thread singleton connection pools
246
    // used to hold per-thread singleton connection pools
243
    private static final ThreadLocal<Map<String, ResourceLimitingJdbcDataSource>> perThreadPoolMap =
247
    private static final ThreadLocal<Map<String, DataSource>> perThreadPoolMap =
244
        new ThreadLocal<Map<String, ResourceLimitingJdbcDataSource>>(){
248
        new ThreadLocal<Map<String, DataSource>>(){
245
        @Override
249
        @Override
246
        protected Map<String, ResourceLimitingJdbcDataSource> initialValue() {
250
        protected Map<String, DataSource> initialValue() {
247
            return new HashMap<>();
251
            return new HashMap<>();
248
        }
252
        }
249
    };
253
    };
Lines 253-283 Link Here
253
     * and per-thread pools.
257
     * and per-thread pools.
254
     *
258
     *
255
     */
259
     */
256
    private class DataSourceComponentImpl implements DataSourceComponent{
260
    private class DataSourceComponentImpl extends DataSourceProxy {
257
261
258
        private final ResourceLimitingJdbcDataSource sharedDSC;
262
        private final DataSource sharedDSC;
259
263
260
        DataSourceComponentImpl(){
264
        DataSourceComponentImpl(){
261
            sharedDSC=null;
265
            sharedDSC=null;
262
        }
266
        }
263
267
264
        DataSourceComponentImpl(ResourceLimitingJdbcDataSource p_dsc){
268
        DataSourceComponentImpl(DataSource p_dsc){
265
            sharedDSC=p_dsc;
269
            sharedDSC=p_dsc;
266
        }
270
        }
267
271
268
        @Override
272
        @Override
269
        public Connection getConnection() throws SQLException {
273
        public Connection getConnection() throws SQLException {
270
            Connection conn = null;
274
            Connection conn = null;
271
            ResourceLimitingJdbcDataSource dsc = null;
275
            DataSource dsc = null;
272
            if (sharedDSC != null){ // i.e. shared pool
276
            if (sharedDSC != null){ // i.e. shared pool
273
                dsc = sharedDSC;
277
                dsc = sharedDSC;
274
            } else {
278
            } else {
275
                Map<String, ResourceLimitingJdbcDataSource> poolMap = perThreadPoolMap.get();
279
                Map<String, DataSource> poolMap = perThreadPoolMap.get();
276
                dsc = poolMap.get(getDataSource());
280
                dsc = poolMap.get(getDataSourceName());
277
                if (dsc == null){
281
                if (dsc == null){
278
                    dsc = initPool("1");
282
                    dsc = initPool("1");
279
                    poolMap.put(getDataSource(),dsc);
283
                    poolMap.put(getDataSourceName(),dsc);
280
                    log.debug("Storing pool: "+dsc.getInstrumentableName()+" @"+System.identityHashCode(dsc));
284
                    log.debug("Storing pool: "+dsc.getName()+" @"+System.identityHashCode(dsc));
281
                    perThreadPoolSet.add(dsc);
285
                    perThreadPoolSet.add(dsc);
282
                }
286
                }
283
            }
287
            }
Lines 298-308 Link Here
298
            }
302
            }
299
            return conn;
303
            return conn;
300
        }
304
        }
301
302
        @Override
303
        public void configure(Configuration arg0) throws ConfigurationException {
304
        }
305
306
    }
305
    }
307
306
308
    @Override
307
    @Override
Lines 358-363 Link Here
358
    public void setDataSource(String dataSource) {
357
    public void setDataSource(String dataSource) {
359
        this.dataSource = dataSource;
358
        this.dataSource = dataSource;
360
    }
359
    }
360
    
361
    private String getDataSourceName() {
362
        return getDataSource();
363
    }
361
364
362
    /**
365
    /**
363
     * @return Returns the dbUrl.
366
     * @return Returns the dbUrl.
(-)xdocs/usermanual/component_reference.xml (-1 / +1 lines)
Lines 4143-4149 Link Here
4143
        </property>
4143
        </property>
4144
        <property name="Pool timeout" required="Yes">Pool throws an error if the timeout period is exceeded in the 
4144
        <property name="Pool timeout" required="Yes">Pool throws an error if the timeout period is exceeded in the 
4145
        process of trying to retrieve a connection</property>
4145
        process of trying to retrieve a connection</property>
4146
        <property name="Idle Cleanup Interval (ms)" required="Yes">This is used to specify how long idle connections will be maintained in the pool before being closed. For a complete explanation on how this works, see <a href="http://excalibur.apache.org/apidocs/org/apache/avalon/excalibur/pool/ResourceLimitingPool.html#trim%28%29">ResourceLimitingPool.trim()</a> (Defaults to "<code>60000</code>", 1 minute)</property>
4146
        <property name="Idle Cleanup Interval (ms)" required="Yes">This is used to specify how long idle connections will be maintained in the pool before being closed. (Defaults to "<code>60000</code>", 1 minute)</property>
4147
        <property name="Auto Commit" required="Yes">Turn auto commit on or off for the connections.</property>
4147
        <property name="Auto Commit" required="Yes">Turn auto commit on or off for the connections.</property>
4148
        <property name="Keep-alive" required="Yes">The keep-alive is used enable a mechanism to monitor the health of connections. If a connection has not been used for Max Connection Age (ms) then before returning the connection from a call to <code>getConnection()</code>, the connection is first used to ping the database to make sure that it is still alive. 
4148
        <property name="Keep-alive" required="Yes">The keep-alive is used enable a mechanism to monitor the health of connections. If a connection has not been used for Max Connection Age (ms) then before returning the connection from a call to <code>getConnection()</code>, the connection is first used to ping the database to make sure that it is still alive. 
4149
        Setting the age allows the 5 second age to be overridden. Validation Query will be used to test it.</property>
4149
        Setting the age allows the 5 second age to be overridden. Validation Query will be used to test it.</property>

Return to bug 58786