Hi all,

I am trying to enable a simple processor to be JMX enabled and visible in
JConsole.

I have read http://camel.apache.org/camel-jmx.html and defined my processor
as follows (simplified it a bit): 

@ManagedResource(description = "Managed Processor" )
public class MyProcessor implements Processor, ManagementAware<MyProcessor>,
Service {

    @ManagedAttribute
    public String getFoo() {
        return "bar";
    }
    @Override
    public Object getManagedObject(MyProcessor arg0) {
        return this;
    }
    @Override
    public void process(Exchange exchange) throws Exception {}
    @Override
     public void start() throws Exception {}
     @Override
     public void stop() throws Exception {}
}

The problem is that I can't see my processor in JConsole, I can connect to
camel context and see all the running
components/endpoints/processors/services etc... but I don't see my own
processor listed. 

The processor is registered as a bean in my spring xml config simply as:
<bean id="myprocessor" class="MyProcessor"></bean>

The processor is working in my routes. 

Am I missing something?

I am using: JDK 1.6, Camel 2.1, Spring 2.5.6

I really appreciate any help you can provide!



-- 
View this message in context: 
http://old.nabble.com/Using-custom-processor-with-JMX-and-JConsole-tp27772716p27772716.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to