GSON is a great Java library for serializing and deserializing objects to and from JSON strings. When you have a list of polymorphic objects you want to serialize and deserialize, things get a bit more difficult. You have to tell
Getting metrics from the Java Virtual Machine (JVM)
Sometimes it is useful to see what the Java Virtual Machine (JVM) is doing when it is running your program. In this blog we will see how to get metrics about memory, buffers, threads and the garbage collection (gc) process
WebSocket tutorial with Java server (Jetty) and JavaScript client
WebSocket is a web technology providing full-duplex communications channels over a single TCP connection. WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. In this tutorial
Running dynamic Java code
Using a Java library called Javassist it is possible to create class files on the fly and use them in the same program that created them. Sounds funky, and it is… First download the jar file from the JBoss download
Creating a Java WebStart (JNLP) application
Java WebStart, also called Java Network Launching Protocol (JNLP), allows you to launch Java applications directly from the internet using a webbrowser. In this article we will create a simple application and all configuration files necessary to launch it through
Model View Controller (MVC) with JSP and JSTL
In this article we will create a small web application that uses the Model View Controller (MVC) pattern with Java Server Pages (JSP) and JSP Standard Template Library (JSTL). A container like Tomcat is needed to run this combination. Thanks
Changing CPU and memory settings on XenServer VMs
You can change the CPU and memory settings of XenServer virtual machines using the API. XenServer allows you to set the priority of the virtual machine CPU (called weight), set a limit on the amount of CPU the virtual machine
Installing Sun JDK 6 on Ubuntu 10.04
The Sun JDK can be installed on Ubuntu by adding a repository and installing with apt-get. The following works with the latest versions of both at the time of writing: Sun JDK 6 update 20 Ubuntu 10.04 sudo add-apt-repository “deb
Getting CPU, memory, disk and network metrics from XenServer
In a previous article we looked at getting CPU and memory metrics from XenServer. As noted in that article, as of version 5.5 of XenServer, the preferred way of getting virtual machine metrics is through HTTP calls to get RRD
Getting XenServer VM metrics in Java
XenServer is a product of Citrix that can run virtual machines on a set of physical hosts called a pool. There is an API that allows you to create programs that interact with the XenServer pool. There are some function