Bug 45006

Summary: .class overwrite / enhancement concept
Product: JMeter - Now in Github Reporter: Ralf Hauser <hauser>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: michael.tschannen, p.mouawad
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Ralf Hauser 2008-05-15 06:53:09 UTC
as mentioned in RFE Bug 45005
that plugin would require a slightly altered SizeAssertion.java

Please add a mechanism that allows to overwrite a single .class file without the need to re-build entire jars of jmeter.

As an example, the tomcat concept where a ./class/tld/domain/... directory tree has precedence over the corresponding ./lib/*.jar would be one approach.

or the JVM's ./lib/ext/*.jar 

Other approaches are welcome too.
Comment 1 Sebb 2008-05-15 08:53:12 UTC
JMeter will pick up all jars in lib/ext

If you create your own jar, and name it so that it appears alphabetically before the JMeter jars, I think JMeter will use the classes from it in preference.

Have you tried that?
Comment 2 Michael Tschannen 2008-05-21 23:56:42 UTC
I just tried as you said (building a jar just for the size assertion and putting it into lib/ext), unfortunately it doesn't work. 

Deleting components.jar and using only a modified SizeAssertion worked without any problems. If components.jar was present, JMeter always took the standard classes (alphabetically before and after didn't work). 
Comment 3 Sebb 2008-05-22 03:57:42 UTC
OK.

In that case, I doubt that having an override for existing classes will work.

But patches / test cases welcome.

In the meantime, I suggest you create a new class with the changes.

P.S. Bug assignment is meant for developers when they start working on a bug.
Comment 4 Philippe Mouawad 2012-05-28 20:38:32 UTC
Current mechanism with JARs seems powerful enough, overriding internal classes does not seem a good idea to me.
I close issue.
Comment 5 The ASF infrastructure team 2022-09-24 20:37:41 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2112