You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Barrie Treloar <ba...@gmail.com> on 2011/04/13 09:02:44 UTC
JavaSamplerContext has no access to the JMeterContext - is this by design?
I was looking for a way to find out the ThreadGroup name and google
shows that you can pull this out of BeanShell via
${__BeanShell(ctx.getThreadGroup().getName())}
Is there a reason why JavaSamplerContext doesn't have access to the
JMeterContext?
Is it because Java can call the methods directly, i.e.
JMeterContextService.getContext().getThreadGroup().getName();
Would it make sense to include this in JavaSamplerContext?
Cheers
Barrie
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: JavaSamplerContext has no access to the JMeterContext - is this
by design?
Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Apr 13, 2011 at 9:14 PM, sebb <se...@gmail.com> wrote:
> On 13 April 2011 08:02, Barrie Treloar <ba...@gmail.com> wrote:
>> I was looking for a way to find out the ThreadGroup name and google
>> shows that you can pull this out of BeanShell via
>> ${__BeanShell(ctx.getThreadGroup().getName())}
>>
>> Is there a reason why JavaSamplerContext doesn't have access to the
>> JMeterContext?
>>
>> Is it because Java can call the methods directly, i.e.
>> JMeterContextService.getContext().getThreadGroup().getName();
>
> Yes.
>
>> Would it make sense to include this in JavaSamplerContext?
>
> Can't see the point.
Other than it wasn't obvious to a n00b like me and it was only by
looking at the code could I figure out what I needed.
I understand I'm a minority since we are using the Java samplers, and
I'm happy that google will archive this for future reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: JavaSamplerContext has no access to the JMeterContext - is this
by design?
Posted by sebb <se...@gmail.com>.
On 13 April 2011 08:02, Barrie Treloar <ba...@gmail.com> wrote:
> I was looking for a way to find out the ThreadGroup name and google
> shows that you can pull this out of BeanShell via
> ${__BeanShell(ctx.getThreadGroup().getName())}
>
> Is there a reason why JavaSamplerContext doesn't have access to the
> JMeterContext?
>
> Is it because Java can call the methods directly, i.e.
> JMeterContextService.getContext().getThreadGroup().getName();
Yes.
> Would it make sense to include this in JavaSamplerContext?
Can't see the point.
> Cheers
> Barrie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org