On Wed, Mar 11, 2009 at 4:35 PM, smullins7 <[email protected]> wrote:
>
> No spring is not creating my endpoint that's probably the problem.  Right
> now, my custom component creates my custom endpoint.  For the time being I
> might just register the mbeans myself but I was hoping for a less invasive
> way to expose these mbeans.
>
> I would love to help out, do you have a suggested approach to this problem?
> Just briefly digging around the DefaultCamelContext and
> InstrumentationLifecycleStrategy it looks like whenever an endpoint is
> requested is requested from a uri, the InstrumentationLifecycleStrategy
> class will wrap that endpoint in a ManagedEndpoint and register the
> ManagedEndpoint with the mbeanserver.  Maybe there's a way to check if the
> endpoint is a MangedResource; if it is then register the endpoint, if its
> not then wrap it in a MangedEndpoint?
yeah sounds like a good idea: The JDK has API for checking for annotations

But I would assume a normal instanceof also would do the trick?
instanceof ManagedResource

>
>
> James.Strachan wrote:
>>
>> 2009/3/10 smullins7 <[email protected]>:
>>>
>>> Hey thanks for the quick reply, I should have said what I've already
>>> tried,
>>> using Spring JMX wiring does not work.  I add the annotations on my
>>> custom
>>> endpoint, then I wire in the mbean server, assembler, etc and i don't see
>>> my
>>> custom endpoint - I still only see the camel mbeans.  I tried using the
>>> <jmxAgent> in my camelContext to specify my mbean server domain but that
>>> had
>>> no affect.
>>>
>>> My endpoint should not be spring wired, my custom component will create
>>> the
>>> endpoint so only my component is spring wired.
>>
>> Are you letting spring create the endpoint instances? I think you will
>> need to if you want to use Spring's JMX stuff right? Either that or
>> you might wanna register the endpoints directly with JMX yourself?
>>
>> It could be we could refactor the endpoint instrumentation code to
>> make it easier to create custom mbeans; fancy taking a stab?
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Adding-custom-mbeans-to-camel-JMX-mbeanserver-tp22421517p22457739.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to