Integrating Java Ringtones Using NON WEB APPLICATIONS

Is it true that a java melody can only be integrated with Java EE web applications?

I would like it to track my application, which is built using the jpos platform, i.e. jpos if mbeans are. Is it possible to integrate it using jpos (mBeans) application?

+4
source share
3 answers

The Melody Advanced User Java user guide has a section explaining how to control a stand-alone application that does not support webapp / no-server:

Embedding JavaMelody in a standalone application

To display JavaMelody analysis in a browser, the tip should include a Jetty server. To do this, you need to create the "EmbeddedServer" class and run it from the application: EmbeddedServer.start(8080, parameters);

+1
source

You can use javamelody to monitor almost everything, it just might be a little harder to integrate it.

0
source

If you use EJB, all you have to do is add the melody ringtone files, and then to the eja-jar.xml file that you use:

 ... <interceptors> <interceptor> <interceptor-class>net.bull.javamelody.MonitoringInterceptor</interceptor-class> </interceptor> </interceptors> <assembly-descriptor> <interceptor-binding> <ejb-name>*</ejb-name> <interceptor-class>net.bull.javamelody.MonitoringInterceptor</interceptor-class> </interceptor-binding> </assembly-descriptor> .... 
0
source

Source: https://habr.com/ru/post/1432201/


All Articles