Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: ControlBus - Missing and Incorrect Reference

  1. #11
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    124

    Default

    Skram, I got it working as well. The problem is that i can not call stop() and start() methods on the <jdbc:inbound-channel-adapter> and I'm experiencing the following exception:

    Code:
    Caused by: org.springframework.expression.EvaluationException: The method 'public final void org.springframework.integration.endpoint.AbstractEndpoint.start()' is not supported by this command processor. If using the Control Bus, consider adding @ManagedOperation or @ManagedAttribute.
    	at org.springframework.integration.handler.ExpressionCommandMessageProcessor$ExpressionCommandMethodResolver.validateMethod(ExpressionCommandMessageProcessor.java:100)
    	at org.springframework.integration.handler.ExpressionCommandMessageProcessor$ExpressionCommandMethodResolver.resolve(ExpressionCommandMessageProcessor.java:81)
    	at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:174)
    Is there any other way to call start() and stop() methods on inbound channel adapters?

    Thanks.

  2. #12
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Unfortunately this is a bug which I am about to fix
    https://jira.springsource.org/browse/INT-1735

    Should be available with tonight's nightly build and in SI 2.0.2

  3. #13
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    124

    Default

    Hi Oleg,

    Thanks for fixing this. I've got additional question regarding the AbstractEndpoint and Control Bus functionality. Is there any way to get the status of a given component by calling the isRunning() method. I would like to know if the component is running or not.

    BTW, When the SI 2.0.2 is expected to be released?

    Regards,
    Krzysztof

  4. #14
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Yes, isRunning() is a Lifecycle method so you should have no issues if using snapshot build which includes the fix.

    We are *planning* to release 2.0.2 by the end of January

  5. #15
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    124

    Default

    Right I can call isRunning() method but the question is how can I receive the return value (true/false) from the given AbstractEndpoint?

    I did define two channels:

    Code:
    <control-bus input-channel="controlBusInputChannel"
    		output-channel="controlBusOutputChannel" />
    and I'm sending the message

    Code:
    Message<String> operation = MessageBuilder.withPayload("@" + componentId + ".isRunning()").build();
    		controlBusInputChannel.send(operation);
    I assume that result will be send to the output-channel (controlBusOutputChannel) then how could it be retrieved?

    Thanks,
    Krzysztof

  6. #16
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Simply get the payload of the Message form the output-channel. Is that what you are asking?

  7. #17
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    124

    Default

    Thanks. I defined ServiceActivator that gets payload from the message.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •