private void startTomcatInstance(int instancenum)
throws Exception
{
String jndi = getJNDIUrl(instancenum);
getLog().debug("JNDI URL Obtained= " + jndi);
JBossRMIAdaptorHelper server = new JBossRMIAdaptorHelper(jndi);
//Get the MBeanInfo for the Tomcat MBean
ObjectName name = new ObjectName("jboss.web:service=WebServer");
MBeanInfo info = server.getMBeanInfo(name);
System.out.println("Tomcat MBean:" + info.getClassName());
getLog().debug("Going to start tomcat ");
//Going to stop the Tomcat Instance
server.invokeOperation(name, "start", null, null);
this.sleepThread(10);
server.invokeOperation(name, "startConnectors", null, null);
}