state = STARTING;
// Notifying the MBEan server that we're starting
notification = new AttributeChangeNotification
(this, sequenceNumber++, System.currentTimeMillis(),
"Starting " + NAME, "State", "java.lang.Integer",
new Integer(STOPPED), new Integer(STARTING));
sendNotification(notification);
try {
embedded.start();
state = STARTED;
notification = new AttributeChangeNotification
(this, sequenceNumber++, System.currentTimeMillis(),
"Started " + NAME, "State", "java.lang.Integer",
new Integer(STARTING), new Integer(STARTED));
sendNotification(notification);
} catch (Throwable t) {
state = STOPPED;
notification = new AttributeChangeNotification
(this, sequenceNumber++, System.currentTimeMillis(),
"Stopped " + NAME, "State", "java.lang.Integer",
new Integer(STARTING), new Integer(STOPPED));
sendNotification(notification);
}