How should a Bean service invoke a Camel route service in FSW ?

Solution Verified - Updated -

Issue

  • We have a simple project which consists of a Bean service which uses a second service which is implemented with Camel(Java). We invoke the camel service the same way we would invoke any other Bean service:
@Service(BeanService.class)
public class BeanServiceBean implements BeanService {

    @Inject @Reference
    private CamelService camelService;

    @Override
    public String execute(String x) {
        return camelService.acceptMessage(x);
    }
}
  • This works if CamelService is implemented with a Bean but not when we replace the Bean implementation with a Camel implementation.
  • We looked at the quickstarts but haven't found one with this same configuration. The quickstarts show Camel service invoked by other Camel services or from a Composite Reference.

  • When we run a unit test, and get to the service call, we get an exception of:

A service reference to service 'CamelService' is not bound into this client proxy instance. 
  • We would expect to be able to run the unit test and have an assertion failure, not an exception.

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0 Beta

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In