To create a custom filter:
- Create the Java code and put it in a .jar file.
- Move the plugin jar to Hot Deploy directory.
Attached is a sample filter and a read me file in a zip file. The filter doesn't do anything, but it shows how to deploy a custom filter to LISA.
If you are certain that your filter is thread-safe, then you can call super.setThreadSafe(true) in the initialize method of your filter and you might get a speedup under heavy concurrent load. When a test is staged with multiple virtual users, only one java instance of your filter is created (well, one for every time you use your filter in a test case). Multiple vusers are actually multiple threads in a Simulator usingthe same filter instance but a unique testExec object, so if you do NOT update instance variables in your filter as part of thesubPreFilter or subPostFilter code then you should be good. If you want to get funky, you can override the isThreadSafe() method of FilterBaseImpl and return true or false depending on whatever criteria makes sense for your filter. Email firstname.lastname@example.org if you need more info.
In practice, if you have tests with non-zero think times and multiple vusers, you probably won't notice any difference. It's only with "fast cycle" load tests with 0 think time that filters can block other vusers.