When a test starts, all test elements are cloned. If you are storing data in an instance variable and aren't dealing with that in the cloning method, then the info will be lost.
But, don't do it in the cloning method. Better is to store the data in the AbstractTestElement property map using a JMeterProperty. This will ensure many things, such as: 1. proper support for cloning 2. proper support for JMeter functions 3. proper support for saving the data when saving the test script And, of course, it's not enough to put the data in the map, you must always retrieve it from the map whenever you need it. Ie - it's best to remove the instance variable altogether, because any use of it is essentially wrong. -Mike On Wed, 2005-01-19 at 13:01, Anil Philip wrote: > Indirectly, yes. CorbaSampler has an instance variable of CorbaInvoker, > which stores the details/data. > If createTestElement() is being called exactly once (ie. CorbaSampler is > being created exactly once) then this should not be a problem. If it is > being created more than once - then isn't that incorrect/wrong/a bug? > Thanks, > Anil > > > -----Original Message----- > From: Michael Stover [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 18, 2005 5:47 PM > To: JMeter Developers List > Subject: [Fwd: Re: sampler being created more than once??] > > > I suspect the real problem lies elsewhere - maybe the sampler being made > here isn't using the properties map from AbstractTestElement? If data > is being stored in instance variables, that won't work unless it > implements TestBean too. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Stover <[EMAIL PROTECTED]> Apache Software Foundation --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
