wickstuff-jmx: Missing JIRA component; patch for remote JMX support

View: New views
5 Messages — Rating Filter:   Alert me  

wickstuff-jmx: Missing JIRA component; patch for remote JMX support

by Jörn Zaefferer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm working on a monitoring web application using wicket-jmx (which is
in SVN, but lacks wiki pages on wicketstuff.org and the component in
JIRA). The app to monitor is a remote application. So far wicket-jmx
does the MBeanServer lookup by itself, which I had to patch in order
to inject a MBeanServerConnection.

Attached is my patch. I had to modify the two contructors for JmxPanel
in order to inject my own JmxMBeanServerWrapper. I also had to modify
JmxMBeanServerWrapper itself to use MBeanServerConnection instead of
MBeanServer (which extends the former). MBeanServerConnection throws
IOExceptions on most methods, which I also had to catch at a few
places.

Here is some sample code to give you an idea how my modifications are used:

In my Spring JavaConfig:

public @Bean MBeanServerConnectionFactoryBean jmxClient() throws
MalformedURLException {
        MBeanServerConnectionFactoryBean factory = new
MBeanServerConnectionFactoryBean();
        factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server");
        return factory;
}

My very basic admin page:

public class Admin extends Base {
       
        @SpringBean
        private MBeanServerConnection jmxClient;
       
        public Admin() {
                add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() {
                        @Override protected Object load() {
                                return jmxClient;
                        }
                });
        }

}

I'd be happy to file this as a ticket in JIRA once the jmx component
is registered there.

Regards
Jörn

Re: wickstuff-jmx: Missing JIRA component; patch for remote JMX support

by Martijn Dashorst :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

iirc wicket-jmx has been moved to apache, and you can use the Wicket
jira tracker to report bugs:
http://issues.apache.org/jira/browse/WICKET

Martijn

On Wed, Sep 17, 2008 at 3:37 PM, Jörn Zaefferer
<joern.zaefferer@...> wrote:

> Hi,
>
> I'm working on a monitoring web application using wicket-jmx (which is
> in SVN, but lacks wiki pages on wicketstuff.org and the component in
> JIRA). The app to monitor is a remote application. So far wicket-jmx
> does the MBeanServer lookup by itself, which I had to patch in order
> to inject a MBeanServerConnection.
>
> Attached is my patch. I had to modify the two contructors for JmxPanel
> in order to inject my own JmxMBeanServerWrapper. I also had to modify
> JmxMBeanServerWrapper itself to use MBeanServerConnection instead of
> MBeanServer (which extends the former). MBeanServerConnection throws
> IOExceptions on most methods, which I also had to catch at a few
> places.
>
> Here is some sample code to give you an idea how my modifications are used:
>
> In my Spring JavaConfig:
>
> public @Bean MBeanServerConnectionFactoryBean jmxClient() throws
> MalformedURLException {
>        MBeanServerConnectionFactoryBean factory = new
> MBeanServerConnectionFactoryBean();
>        factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server");
>        return factory;
> }
>
> My very basic admin page:
>
> public class Admin extends Base {
>
>        @SpringBean
>        private MBeanServerConnection jmxClient;
>
>        public Admin() {
>                add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() {
>                        @Override protected Object load() {
>                                return jmxClient;
>                        }
>                });
>        }
>
> }
>
> I'd be happy to file this as a ticket in JIRA once the jmx component
> is registered there.
>
> Regards
> Jörn
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

Re: wickstuff-jmx: Missing JIRA component; patch for remote JMX support

by Jörn Zaefferer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay, wicketstuff-jmx got moved to wicket, but wicketstuff-jmx-panel
didn't. I guess thats the missing piece: My patch affects jmx-panel
only.

Should I create a ticket for wicket-jmx anyway?

Jörn

On Wed, Sep 17, 2008 at 4:20 PM, Martijn Dashorst
<martijn.dashorst@...> wrote:

> iirc wicket-jmx has been moved to apache, and you can use the Wicket
> jira tracker to report bugs:
> http://issues.apache.org/jira/browse/WICKET
>
> Martijn
>
> On Wed, Sep 17, 2008 at 3:37 PM, Jörn Zaefferer
> <joern.zaefferer@...> wrote:
>> Hi,
>>
>> I'm working on a monitoring web application using wicket-jmx (which is
>> in SVN, but lacks wiki pages on wicketstuff.org and the component in
>> JIRA). The app to monitor is a remote application. So far wicket-jmx
>> does the MBeanServer lookup by itself, which I had to patch in order
>> to inject a MBeanServerConnection.
>>
>> Attached is my patch. I had to modify the two contructors for JmxPanel
>> in order to inject my own JmxMBeanServerWrapper. I also had to modify
>> JmxMBeanServerWrapper itself to use MBeanServerConnection instead of
>> MBeanServer (which extends the former). MBeanServerConnection throws
>> IOExceptions on most methods, which I also had to catch at a few
>> places.
>>
>> Here is some sample code to give you an idea how my modifications are used:
>>
>> In my Spring JavaConfig:
>>
>> public @Bean MBeanServerConnectionFactoryBean jmxClient() throws
>> MalformedURLException {
>>        MBeanServerConnectionFactoryBean factory = new
>> MBeanServerConnectionFactoryBean();
>>        factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server");
>>        return factory;
>> }
>>
>> My very basic admin page:
>>
>> public class Admin extends Base {
>>
>>        @SpringBean
>>        private MBeanServerConnection jmxClient;
>>
>>        public Admin() {
>>                add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() {
>>                        @Override protected Object load() {
>>                                return jmxClient;
>>                        }
>>                });
>>        }
>>
>> }
>>
>> I'd be happy to file this as a ticket in JIRA once the jmx component
>> is registered there.
>>
>> Regards
>> Jörn
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>

Re: wickstuff-jmx: Missing JIRA component; patch for remote JMX support

by Martijn Dashorst :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I remember having a vote of integrating jmxpanel into wicket-jmx [1],
but it seems it never made it through.

But go ahead and make a wicket-jmx ticket.

Martijn

[1] http://www.nabble.com/Integrate-wicket-contrib-jmx-panel-into-wicket-jmx-td14778294.html#a14778294

On Wed, Sep 17, 2008 at 5:47 PM, Jörn Zaefferer
<joern.zaefferer@...> wrote:

> Okay, wicketstuff-jmx got moved to wicket, but wicketstuff-jmx-panel
> didn't. I guess thats the missing piece: My patch affects jmx-panel
> only.
>
> Should I create a ticket for wicket-jmx anyway?
>
> Jörn
>
> On Wed, Sep 17, 2008 at 4:20 PM, Martijn Dashorst
> <martijn.dashorst@...> wrote:
>> iirc wicket-jmx has been moved to apache, and you can use the Wicket
>> jira tracker to report bugs:
>> http://issues.apache.org/jira/browse/WICKET
>>
>> Martijn
>>
>> On Wed, Sep 17, 2008 at 3:37 PM, Jörn Zaefferer
>> <joern.zaefferer@...> wrote:
>>> Hi,
>>>
>>> I'm working on a monitoring web application using wicket-jmx (which is
>>> in SVN, but lacks wiki pages on wicketstuff.org and the component in
>>> JIRA). The app to monitor is a remote application. So far wicket-jmx
>>> does the MBeanServer lookup by itself, which I had to patch in order
>>> to inject a MBeanServerConnection.
>>>
>>> Attached is my patch. I had to modify the two contructors for JmxPanel
>>> in order to inject my own JmxMBeanServerWrapper. I also had to modify
>>> JmxMBeanServerWrapper itself to use MBeanServerConnection instead of
>>> MBeanServer (which extends the former). MBeanServerConnection throws
>>> IOExceptions on most methods, which I also had to catch at a few
>>> places.
>>>
>>> Here is some sample code to give you an idea how my modifications are used:
>>>
>>> In my Spring JavaConfig:
>>>
>>> public @Bean MBeanServerConnectionFactoryBean jmxClient() throws
>>> MalformedURLException {
>>>        MBeanServerConnectionFactoryBean factory = new
>>> MBeanServerConnectionFactoryBean();
>>>        factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server");
>>>        return factory;
>>> }
>>>
>>> My very basic admin page:
>>>
>>> public class Admin extends Base {
>>>
>>>        @SpringBean
>>>        private MBeanServerConnection jmxClient;
>>>
>>>        public Admin() {
>>>                add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() {
>>>                        @Override protected Object load() {
>>>                                return jmxClient;
>>>                        }
>>>                });
>>>        }
>>>
>>> }
>>>
>>> I'd be happy to file this as a ticket in JIRA once the jmx component
>>> is registered there.
>>>
>>> Regards
>>> Jörn
>>>
>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> Apache Wicket 1.3.4 is released
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

Re: wickstuff-jmx: Missing JIRA component; patch for remote JMX support

by Jörn Zaefferer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay, done: https://issues.apache.org/jira/browse/WICKET-1841

On Wed, Sep 17, 2008 at 5:52 PM, Martijn Dashorst
<martijn.dashorst@...> wrote:

> I remember having a vote of integrating jmxpanel into wicket-jmx [1],
> but it seems it never made it through.
>
> But go ahead and make a wicket-jmx ticket.
>
> Martijn
>
> [1] http://www.nabble.com/Integrate-wicket-contrib-jmx-panel-into-wicket-jmx-td14778294.html#a14778294
>
> On Wed, Sep 17, 2008 at 5:47 PM, Jörn Zaefferer
> <joern.zaefferer@...> wrote:
>> Okay, wicketstuff-jmx got moved to wicket, but wicketstuff-jmx-panel
>> didn't. I guess thats the missing piece: My patch affects jmx-panel
>> only.
>>
>> Should I create a ticket for wicket-jmx anyway?
>>
>> Jörn
>>
>> On Wed, Sep 17, 2008 at 4:20 PM, Martijn Dashorst
>> <martijn.dashorst@...> wrote:
>>> iirc wicket-jmx has been moved to apache, and you can use the Wicket
>>> jira tracker to report bugs:
>>> http://issues.apache.org/jira/browse/WICKET
>>>
>>> Martijn
>>>
>>> On Wed, Sep 17, 2008 at 3:37 PM, Jörn Zaefferer
>>> <joern.zaefferer@...> wrote:
>>>> Hi,
>>>>
>>>> I'm working on a monitoring web application using wicket-jmx (which is
>>>> in SVN, but lacks wiki pages on wicketstuff.org and the component in
>>>> JIRA). The app to monitor is a remote application. So far wicket-jmx
>>>> does the MBeanServer lookup by itself, which I had to patch in order
>>>> to inject a MBeanServerConnection.
>>>>
>>>> Attached is my patch. I had to modify the two contructors for JmxPanel
>>>> in order to inject my own JmxMBeanServerWrapper. I also had to modify
>>>> JmxMBeanServerWrapper itself to use MBeanServerConnection instead of
>>>> MBeanServer (which extends the former). MBeanServerConnection throws
>>>> IOExceptions on most methods, which I also had to catch at a few
>>>> places.
>>>>
>>>> Here is some sample code to give you an idea how my modifications are used:
>>>>
>>>> In my Spring JavaConfig:
>>>>
>>>> public @Bean MBeanServerConnectionFactoryBean jmxClient() throws
>>>> MalformedURLException {
>>>>        MBeanServerConnectionFactoryBean factory = new
>>>> MBeanServerConnectionFactoryBean();
>>>>        factory.setServiceUrl("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server");
>>>>        return factory;
>>>> }
>>>>
>>>> My very basic admin page:
>>>>
>>>> public class Admin extends Base {
>>>>
>>>>        @SpringBean
>>>>        private MBeanServerConnection jmxClient;
>>>>
>>>>        public Admin() {
>>>>                add(new JmxPanel("jmx", JmxPanelRenderer.Tree, new JmxMBeanServerWrapper() {
>>>>                        @Override protected Object load() {
>>>>                                return jmxClient;
>>>>                        }
>>>>                });
>>>>        }
>>>>
>>>> }
>>>>
>>>> I'd be happy to file this as a ticket in JIRA once the jmx component
>>>> is registered there.
>>>>
>>>> Regards
>>>> Jörn
>>>>
>>>
>>>
>>>
>>> --
>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>> Apache Wicket 1.3.4 is released
>>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
LightInTheBox - Buy quality products at wholesale price!