Forum Discussion

antonismandilas's avatar
antonismandilas
New Contributor
15 years ago

[Resolved] Component Async Message handling

Dear all,

I am trying to create a generator object, which will generate traffic based on received messages.

I have created a message handler and i want to execute method

"trigger"

from generator component.

But what ever i try to do i get the following exception:

roovy.lang.MissingMethodException: No signature of method: com.eviware.loadui.groovy.GroovyContextSupport.triger() is applicable for argument types: () values: []
Possible solutions: grep(java.lang.Object), print(java.lang.Object), print(java.io.PrintWriter), printf(java.lang.String, [Ljava.lang.Object;), printf(java.lang.String, java.lang.Object), wait()
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at GroovyTCPServerChatMessageReceiver$_run_closure6.doCall(GroovyTCPServerChatMessageReceiver:89)
at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)

I am not very used to groovy, so maybe it is a very simple issue.

If i understand correctly when the async message arrives it is handled in the context of Groovy.

But how can a get a reference or maybe store the reference in my handler for the component starting the message handler?

Thanks a lot for your help

Best regards,
Antony Mandilas

2 Replies

  • Hello Antony!

    I'm not entirely sure that this answers all your questions, but here goes:

    Question 1:
    Groovy.lang.MissingMethodException: No signature of method: com.eviware.loadui.groovy.GroovyContextSupport.triger() is applicable for argument types: () values: []
    You misspelled the method name trigger.

    Question 2:
    Yes, messages are handled in the context of Groovy (with backend support by Java).

    Question 3:
    Maybe this example will answer your question:

    println( "Listing all connections from triggerTerminal:" )
    for( c in triggerTerminal.connections )
    println( "Connection: From + " c.inputTerminal.terminalHolder + " to " + c.outputTerminal.terminalHolder )



    Please let me know if something is unclear

    /Henrik
    eviware.com
  • Hey Henrik,

    I feel so stupid

    Thanks a lot for your help.

    It was just a misspelling.

    To describe you a bit what i am trying to do. We have a custom network TCP protocol which works more or less as JMS.

    I have created one component that launches subscribers broadcasting messages and a another component that also launches subscribers that receive messages.

    My aim is to measure round trip times for messages broadcasted.

    The component I had the problem was the second one, which is a generator component, created heartbeats based on the received messages.

    I don't know if this the best way to load test this type of infrastructure.

    The good thing is that now both components work fine

    Thanks again,

    Antony Mandilas