I've customized Glassbox to also monitor my service layer. It works fine, although there are a couple of things I would like to ask:
1. jconsole is showing the jmx mbean under Glassbox > stats > "undefined" > "operation(type ServiceProcessingMonitor; ..)". How do I get it to change "undefined" to my application name? I notice that in the web troubleshooter the application is also shown as "undefined".
2. At startup I get the following warning for all of the classes I've configured for Glassbox to monitor:
- [WebappClassLoader@127f0b26] warning at com.test.MyService.java:228::0 can not implement lazyTjp at joinpoint method-execution(com.test.MyService.test()) because of advice conflicts, see secondary locations to find conflicting advice [Xlint:multipleAdviceStoppingLazyTjp]
see also: glassbox/monitor/MethodMonitor.aj:50::0
see also: glassbox/monitor/MethodMonitor.aj:62::0
- Any idea what the warning problem is?
Cheers
Chico
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For your first question, I think Glassbox take the <display-name> of the "web.xml", but I'm not really sure about this. Maybie you can try...
Can you explain me how did you customized Glassbox to monitor your service layer?
I try to monitor web service methods, but in JConsole, I only see CXFServlet operations, but not my business webservice methods.
I tried to add an 'aop.xml' file like this one :
Out of the box, Glassbox only recognizes application names from servlet contexts. If you have a service layer that isn't accessed through servlets in its process, you need to call responseFactory.setApplication(name) in your monitor so Glassbox will know the application name.
The second warning is unimportant - you can ignore it. It just means that having multiple monitor advices apply to a single line of code prevents a small runtime optimization for AspectJ. You can also suppress it by editing the META-INF/Xlint.properties file in the Glassbox monitor.jar aop.xml to change this line:
multipleAdviceStoppingLazyTjp=warning
to:
multipleAdviceStoppingLazyTjp=ignore
Ron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've customized Glassbox to also monitor my service layer. It works fine, although there are a couple of things I would like to ask:
1. jconsole is showing the jmx mbean under Glassbox > stats > "undefined" > "operation(type ServiceProcessingMonitor; ..)". How do I get it to change "undefined" to my application name? I notice that in the web troubleshooter the application is also shown as "undefined".
2. At startup I get the following warning for all of the classes I've configured for Glassbox to monitor:
- [WebappClassLoader@127f0b26] warning at com.test.MyService.java:228::0 can not implement lazyTjp at joinpoint method-execution(com.test.MyService.test()) because of advice conflicts, see secondary locations to find conflicting advice [Xlint:multipleAdviceStoppingLazyTjp]
see also: glassbox/monitor/MethodMonitor.aj:50::0
see also: glassbox/monitor/MethodMonitor.aj:62::0
- Any idea what the warning problem is?
Cheers
Chico
Hello,
For your first question, I think Glassbox take the <display-name> of the "web.xml", but I'm not really sure about this. Maybie you can try...
Can you explain me how did you customized Glassbox to monitor your service layer?
I try to monitor web service methods, but in JConsole, I only see CXFServlet operations, but not my business webservice methods.
I tried to add an 'aop.xml' file like this one :
<aspectj>
<weaver>
<include within="com.myco.services..*"/>
</weaver>
<aspects>
<concrete-aspect name="MonitorMyCoService" extends="glassbox.monitor.MethodMonitor">
<pointcut name="monitoredMethods"
expression="execution(* com.myco.services.*.*())"/>
</concrete-aspect>
</aspects>
</aspectj>
but it doesn't work.
Did you do the same?
I'm using Tomcat 6
Thanks
Mickael
Hi Chico,
Out of the box, Glassbox only recognizes application names from servlet contexts. If you have a service layer that isn't accessed through servlets in its process, you need to call responseFactory.setApplication(name) in your monitor so Glassbox will know the application name.
The second warning is unimportant - you can ignore it. It just means that having multiple monitor advices apply to a single line of code prevents a small runtime optimization for AspectJ. You can also suppress it by editing the META-INF/Xlint.properties file in the Glassbox monitor.jar aop.xml to change this line:
multipleAdviceStoppingLazyTjp=warning
to:
multipleAdviceStoppingLazyTjp=ignore
Ron
Make that glassboxMonitor.jar not monitor.jar (sorry I was typing too quickly).