I forgot a detail.
I want to make this implementation only with Java language, exactly, to determine the use of CPU by the Java process of the JBoss server.
I believe that now my doubt was more understandable.
* In this example (http://www.javaworld.com/javaqa/2002-11/01-qa-1108-cpu_p.html) they consider a solution with C and JNI. But I want to make only with Java.
Thank you very much for your help.