You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Duana Stanley <st...@gmail.com> on 2006/04/06 08:53:02 UTC

How to bundle your own message resources when extending?

Hello

I wrote an extension Jmeter sampler to send UDP messages.  I haven't
done any Java GUI programming so I got a bit confused by the following
tutorials although they were useful to some degree:

http://www.jajakarta.org/jmeter/1.7/en/extending/JMeter%20Extension%20Scenario.html#sampler
http://svn.apache.org/repos/asf/jakarta/jmeter/trunk/xdocs/extending/jmeter_tutorial.pdf

I wrote my extension by copying the classes for the TCPSampler (thank
you open source) and placed my jar in lib/ext.  It works fine but I
had to modify src/core/.../resources/messages.properties to include my
GUI labels.  It means I can't just drop in my jar into lib/ext of any
jmeter installation.

Is there a way to include my own resource bundle without having to do this?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to bundle your own message resources when extending?

Posted by sebb <se...@gmail.com>.
No need to add any new messages unless you want to support multiple
languages - you can implement getStaticLabel() instead of
getLabelResource().

Another solution is to use the TestBean approach, which has its own
property files.
See Example2.java under the examples directory tree.

I updated the version in SVN branch 2.1 recently so it actually works...

S.
On 06/04/06, Duana Stanley <st...@gmail.com> wrote:
> Hello
>
> I wrote an extension Jmeter sampler to send UDP messages.  I haven't
> done any Java GUI programming so I got a bit confused by the following
> tutorials although they were useful to some degree:
>
> http://www.jajakarta.org/jmeter/1.7/en/extending/JMeter%20Extension%20Scenario.html#sampler
> http://svn.apache.org/repos/asf/jakarta/jmeter/trunk/xdocs/extending/jmeter_tutorial.pdf
>
> I wrote my extension by copying the classes for the TCPSampler (thank
> you open source) and placed my jar in lib/ext.  It works fine but I
> had to modify src/core/.../resources/messages.properties to include my
> GUI labels.  It means I can't just drop in my jar into lib/ext of any
> jmeter installation.
>
> Is there a way to include my own resource bundle without having to do this?
>
> Thanks
>
> ---------------------------------------------------------------------
> 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