This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Comment

ControlBus class was removed in favor of special instance if ServiceActivatingHandler (see ExpressionControlBusFactoryBean)

Why do you need it?

I'm just trying out everything in the reference I was looking for a way to programmatically send a command. I saw one of the examples here. It has a reference over the Control Bus. So I looked at the Spring Integration API

The Control Bus uses the same messaging mechanism used by the application data, but uses separate channels to transmit data that is relevant to the management of components involved in the message flow.

Then, you simply need to get a handle to the 'controlInput' MessageChannel instance in order to send it messages. That can be done through dependency injection, or you may prefer to use a Gateway proxy to hide the Messaging API from your code behind a simple interface. That 'input-channel' can even be some other component's 'output-channel', or it can be the target of a @Publisher annotation. The bottom line: it's just a normal Message Channel.

Comment

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?

Comment

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.