On 23/01/07, Richard Gaywood <[EMAIL PROTECTED]> wrote:
On 1/23/07, sebb <[EMAIL PROTECTED]> wrote:
> Unless you need i18n, just implement the getLabel() method.

Aha, yes, having looked at the superclass implementation I now see that is
the way forwards here.

> > I can see my JAR file on the classpath, but nothing else of note.
>
> It should appear in the GUI if you have got the class structure correct.


Which I clearly do not. Harumph.

I've now switched to doing my jar compilation from within Ant, whereas
previously I was using Eclipse which resulted in all sorts of build output
folders/up-to-date JAR containing out-of-date Class hilarity. Adding a new

I find it easiest to create a new project, and add the JMeter jars to
the classpath.

See extras/addons* for some info ...

Or just add the files to the existing tree structure initially.

When you have got them working, move them to a separate project as above.

top-level set of classes within the jakarta-jmeter-2.2 folder structure
alongside core,components,functions etc seems to have cleared that up. I've
also had a side tour through how all the right-click popup menus are build
(answer for future googlenauts: through elegant reflection in
org.apache.jmeter.gui.util.MenuFactory.java).

Now, however, with my fresh Jar file on the classpath for JMeter at runtime
I can see two "Transaction Controller" instances in the Logic Controllers
menu. If I add them both to a test plan, save it, and inspect the JMX I see:

      <hashTree>
        <TransactionController
guiclass="org.apache.jmeter.control.gui.FailingTransactionControllerGui"
testclass="TransactionController" testname="Tra
nsaction Controller" enabled="true"/>
        <hashTree/>
        <TransactionController
guiclass="TransactionControllerGui"
testclass="TransactionController" testname="Transaction
Controller" enabled="true"/>
        <hashTree/>
      </hashTree>

Obviously, the second is the normal JMeter Transaction Controller and is OK,
but the first is my new one and it's broken. My GUI class is somehow
registered against the old Transaction Controller class.

I've stared and stared at this code and I cannot see why this is happening.
I've attached both files, but it seems to me the important bit is in
FailingTransactionControllerGui:

    /* Implements JMeterGUIComponent.createTestElement ()
*/
    public TestElement createTestElement() {
        FailingTransactionController lc = new
FailingTransactionController();
        configureTestElement(lc);
        return lc;
    }

What is wrong with this bit of code?  Why is my testclass assoiciated with
this guiclass incorrect?

Mangled jars?

I added your source files to the component tree and rebuilt JMeter,
and it seems to create the correct JMX entries:

     <hashTree>
       <org.apache.jmeter.control.FailingTransactionController
guiclass="org.apache.jmeter.control.gui.FailingTransactionControllerGui"
testclass="org.apache.jmeter.control.FailingTransactionController"
testname="Failing Transaction Controller" enabled="true"/>
       <hashTree/>
       <TransactionController guiclass="TransactionControllerGui"
testclass="TransactionController" testname="Transaction Controller"
enabled="true"/>
       <hashTree/>
     </hashTree>

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

Reply via email to