I'm guessing the problem is that you didn't implement the clone() method.  As a 
result, since everything gets cloned before getting to the engine, your using the 
inherited clone() method, which returns a GenericController, I think.  You need to 
implement a clone() method to return your custom GenerativeController.  Take a 
look at org.apache.jmeter.protocol.http.control.HttpTestSample as an example.

-Mike

On 15 May 2002 at 15:00, Geoff Fortytwo wrote:

> I've been able to successfully add a new sampler to JMeter. I start jmeter 
> and add a new thread group to the Test Plan. I then open up the thread 
> group and add my new sampler which is listed in the "Generative Controller" 
> menu. I then add a "Graph Results" listener to the thread group. I then 
> click "Start" from the "Run" menu. No exceptions are output into the 
> console window that JMeter was run from, but it doesn't output any of the 
> log statements that I have in every method of the sampler. It just outputs 
> "getName" indicating it is calling my class derived from 
> AbstractGenerativeController, but it isn't calling the createEntry() method.
> 
> The org.apache.jmeter.samplers.Sampler derived class is called SpecialSampler.
> 
> Here's the AbstractGenerativeController derived class (I've removed all the 
> logging statements to make the code clearer).
> 
> public class SpecialTestSampler
>        extends AbstractGenerativeController
>        implements Serializable
> {
>       public Class getGuiClass() {
>               return SpecialTestGui.class;
>       }
> 
>       public String getName() {
>               return name;
>       }
>       public void setName(String name) {
>               this.name=name;
>       }
> 
>       public Collection getAddList() {
>               return java.util.Collections.EMPTY_LIST;
>       }
> 
>       public String getClassLabel() {
>               return "speciality class";
>       }
> 
>       public void uncompile() {
>               super.uncompile();
>       }
> 
>       public void addJMeterComponent(JMeterComponentModel child) {
>       }
> 
>       protected Entry createEntry() {
>               Entry entry = new Entry();
>               entry.setSamplerClass(SpecialSampler.class);
>               return entry;
>       }
> 
>       private String name;
> }
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to