Hi sebb,

The beanshell.init.file approach worked like a charm.

Thanks!

Esteban

-----Original Message-----
From: sebb [mailto:seb...@gmail.com]
Sent: Sábado, 07 de Noviembre de 2009 11:55 a.m.
To: JMeter Developers List
Subject: Re: Exposing run info with JMX

On 06/11/2009, Esteban Sancho <esteban.san...@globant.com> wrote:
> Hi folks,
>
>  I've already written a MBean to expose the number of active threads
>  (virtual users) but had little luck finding a hook to register this
MBean
>  during startup. The only way I found so far to register the bean
properly
>  and obtain the right info from JMeterContextService was in a sampler
but
>  it's not exactly what we're looking for.
>
>  We need this MBean to run in all slaves for a remote monitoring console
to
>  be able to correlate client and server resource consumption with the
>  number of active users. The sampler approach seems to fail short here.
>
>  Other option we've tried was to create a wrapper for MainDriver to
>  register the MBean before or after main() execution but had problems
with
>  the dynamic class loader used by JMeter.
>
>  The perfect solution would be some kind of simple plugin (non-gui)
invoked
>  during JMeter startup. Is there any way to do this currently? If not,
>  could you please point me in the right direction to implement it?

You can define the property

beanshell.init.file=<beanshell script file>

which will invoke a BeanShell script at startup, and use the script to
call your code.

Or you could create e.g. a Config test element, and implement the
TestListener interface (or even just use a static block).

>  Thanks,
>
>  Esteban
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
>  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to