[jboss-user] [JBoss AOP] - Re: AOP integration with JMX question
I see. I'll think about these two approaches. Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004972#4004972 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004972 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: AOP integration with JMX question
Hmm, What you mention is a problem with JMX, there is no "proper" way to work around this. One way to enforce that the values can only be set by your aspect would be to have your aspect set/clear a value in a ThreadLocal surrounding the call to invocation.invokeNext() and in the increaseCount() method of your MBean check for the exsistance of that value in the ThreadLocal. If called by the JMX console, i.e. not from the aspecy that ThreadLocal value will not exist, so it is a noop. Alternatively, you could use the aspect instance as a parameter to the increaseCount method, which would make it impossible to invoke via the console. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004893#4004893 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004893 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: AOP integration with JMX question
Thanks, but could you be more specific about what you mean when you say: anonymous wrote : "... plain aspect delegate onto an MBean ..." I tried the following: In my aspect I make this call: server.invoke(statsMBean, "increaseCount", null,null); , which works fine, but the problem is that in order to be able to call the increaseCountmethod from my aspect I need to expose it in the -xmbean.xml, which in turn makes it available to the user in the JMX console, i.e the user can increase the count from the JMX console. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004818#4004818 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004818 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: AOP integration with JMX question
"bossy" wrote : | My question is - is it possible to do write an Ascpect XMBean and if so - where should I look for more details. | Not really, but it should be possible to have your plain aspect delegate onto an MBean that can be used to store/display the stats? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004796#4004796 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004796 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user