jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject user.classpath, search_path and many jar files
Date Fri, 09 Aug 2013 19:45:23 GMT
I have a situation where the user.classpath contains many jar files
(about 100). Listing all of the jar files is tedious, difficult to
maintain and not in any place where one can configure user.classpath
possible or easy because of line length restrictions.

Looking at the code I saw that in some places jar files lying in
directories configured for class search are automatically also searched,
but sometimes not.

There are three cases:

- not auto-searching the jar files:

o.a.jmeter.JMeter start() calls updateClassLoader() calls updatePath()
for search_paths and user.classpath. updatePath() calls
NewDriver.addPath() for each path contained in those settings. Finally
NewDriver.addPath() adds them to the system property "java.class.path"
without listing all jar files contained in directories.

So the class loader itself does not know about such jar files.

- auto-searching such jar files in ClassFinder.findClassesThatExtend()
using search_paths for JMeter extension:

In findClassesThatExtend() a call to addJarsInPath() will automatically
add all jar files found in a configured directory.

- auto-searching jar files in user.classpath for JUnit setup:

In JUnitTestSamplerGui the user.classpath property is used to search for
classes extending Test or TestCase but the search is based on
ClassFinder, so will automatically search through jar files.

I propose to also add the jar files in the first case, the updatePath
setting up the class loader. I guess the only concern would be the speed
of class loading? IMHO if there are only few such jar files, then there
should be no problem and if there are many such jar files, then not
needing to configure them all is really helpful. So the remaining case
is if there are many jar files auto-detected which are not really
needed. That means it might make sense to make the behavior configurable
with default the old behavior.




View raw message