while booting the jboss server we want to check the license.So We changed org.jboss.Main class method main as
public static void main(final String[] args) throws Exception
{
Runnable worker = new Runnable() {
public void run()
{
try
{
Verifier verifier= Verifier.getVerifier();//class to verify licnese
verifier.verifyLicenseKey();
Main main = new Main();
main.boot(args);
}
catch (Exception e)
{
System.err.println("Failed to boot JBoss:");
e.printStackTrace();
}
}
};
ThreadGroup threads = new ThreadGroup("jboss");
new Thread(threads, worker, "main").start();
}