Hi all,
I have written a MBean service that deploys ok, however, it does not seem that the start method is being fired.
Here is the code.
IntaglioUserServerServiceMBean.class and IntaglioUserServerService.class are put into a jar file and deployed into the ...\server\default\lib directory
The intaglio-service.xml is deployed to the ..\server\default\deploy directory
I am expecting the System.out.println("\n\n\n Starting the IntaglioUserServer...\n\n\n\n");
to fire and I am not seeing it.
Why???
package com.intaglio.userserver.startup;
import org.jboss.system.ServiceMBean;
public interface IntaglioUserServerServiceMBean extends ServiceMBean {
}
package com.intaglio.userserver.startup;
import org.jboss.system.ServiceMBeanSupport;
public class IntaglioUserServerService extends ServiceMBeanSupport implements IntaglioUserServerServiceMBean {
public String getName() {
return "com.intaglio.userserver.startup:service=IntaglioUserServerStartup";
}
public int getState() {
return 0;
}
public String getStateString() {
return null;
}
public void jbossInternalLifecycle(String arg0) throws Exception {
}
public void create() throws Exception {
}
public void start() throws Exception {
System.out.println("\n\n\n Starting the IntaglioUserServer...\n\n\n\n");
}
public void stop() {
}
public void destroy() {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
public void jbossInternalLifecycle(String arg0) throws Exception {
}
?
You should only override "startService" not "start" etc.