Web services for Java EE 5 in Glassfish (4)

02:00AM jun 05, 2007 en categoria Java por Enrique Rodriguez Lasterra

Etiquetas:


I finish the series destined to web services in glassfish with monitorization. Glassfish offers multiple options of monitoring that allow us to know the statusof our server. In case the status is not the awaited one, we will have a valuable information to change the configuration of the server and/or our code.

By default these options come deactivated so the first step will be to activate them. Inside the admin console on Web services menu, select the Service and  go to the eyelash of Monitor-> Configuration.

Eyelash of configuration of the Monitor of Web Services in Glassfish

On this screen we change the monitoring level to High and click save. From this moment the calls to the Web service will be monitored. We start our application client, and execute several times the JSP that realizes the call to the Web service.
As turned out in the eyelash Mesagges we see a list with all the calls realized by our client of the Web service. For each call we can see the time of response, the size, the IP address of the client, and if the response has been success or not.

List of messages towards the Web service monitored by Glassfish

If we select one of these messages, clicking on the date, we go to the screen with all the information about the message. On this screen in addition to the previous information we can see the HTTP headers that client has sent, or the error messages produced by the response. Also if we click in the buttons View Request XML/View Response XML we can see the in /out XML messages. This could be very useful in development phase of the application.

Properties of a message monitored by Glassfish XML of next message to the Web service monitored by Glassfish

Finally, the monitor of Web services offers us a very useful general statistics. Information related to the times of response or the throughput measured in requests per seconds, tell us the capacity and limits of our Web services.

Statistics of a Web service monitored by Glassfish

We are going to give one more step in the monitoring gaining access to the menu configuration, to the paragraph Monitoring. On this screen we see all the services that we can monitor in Glassfish. For our example is enought to activate HTTP Service and Web Container and JVM.

Activation General services of Monitoring

As soon as the services of monitoring were activated, we see in the list of messages a link called Call Flow. Across this link we can visualize how the time was consumed by differens services of the Glassfish internal architecture.

Linkage Call Flow in list of messages of Web Service Glasfish Linkage Call Flow in list of messages of Web Service Glasfish

In the menu Application Server-> Monitor we can see these and other options of monitoring of which it is possible to stand out:

  • Statistics of warning and error level messages in the logs files of the server.

    EEstadísticas of messages of warning level and error in the files of logs of the servant

  • Situation of the Runtime enviroment throught JMX variables.

    Situation of the environment (Runtime)

 You will agree with me that it's a small luxury to have all these options by default when we work with Glassfish. I will continue fishing, the next stop can be cluster or grizzly ... I will ask the pillow

Comentarios:

Enviar un comentario:
Los comentarios han sido deshabilitados.