[teiid-commits] teiid SVN: r2211 - trunk/jboss-integration/src/main/java/org/teiid/jboss.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Wed Jun 9 12:37:31 EDT 2010
Author: rareddy
Date: 2010-06-09 12:37:31 -0400 (Wed, 09 Jun 2010)
New Revision: 2211
Modified:
trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossLifeCycleListener.java
Log:
TEIID-1117: Capturing the Shutdown event of the container using a JMX notification, and used that to determine the shutdown based undeploy vs a undeploy based on the user activity. Then managed the cached directories based on these events.
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossLifeCycleListener.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossLifeCycleListener.java 2010-06-09 14:45:23 UTC (rev 2210)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/JBossLifeCycleListener.java 2010-06-09 16:37:31 UTC (rev 2211)
@@ -29,12 +29,15 @@
import javax.management.NotificationListener;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.Server;
import org.jboss.system.ServiceMBeanSupport;
import org.teiid.deployers.ContainerLifeCycleListener;
public class JBossLifeCycleListener extends ServiceMBeanSupport implements NotificationListener, ContainerLifeCycleListener{
+ public final String START_NOTIFICATION_TYPE = "org.jboss.system.server.started"; //$NON-NLS-1$
+ /** The JMX notification event type sent on begin of the server shutdown */
+ public final String STOP_NOTIFICATION_TYPE = "org.jboss.system.server.stopped"; //$NON-NLS-1$
+
private boolean shutdownInProgress = false;
public JBossLifeCycleListener() {
@@ -52,10 +55,10 @@
@Override
public void handleNotification(Notification msg, Object handback) {
String type = msg.getType();
- if (type.equals(Server.START_NOTIFICATION_TYPE)) {
+ if (type.equals(START_NOTIFICATION_TYPE)) {
}
- if (type.equals(Server.STOP_NOTIFICATION_TYPE)) {
+ if (type.equals(STOP_NOTIFICATION_TYPE)) {
shutdownInProgress = true;
}
}
More information about the teiid-commits
mailing list