[jboss-cvs] JBossAS SVN: r86703 - in trunk: profileservice/src/main/org/jboss/profileservice/management and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 2 17:51:50 EDT 2009


Author: scott.stark at jboss.org
Date: 2009-04-02 17:51:50 -0400 (Thu, 02 Apr 2009)
New Revision: 86703

Modified:
   trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
   trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
   trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
Log:
JBAS-6689, only dispatch updates to the runtime component if the property ActivationPolicy is IMMEDIDATE.


Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java	2009-04-02 21:45:50 UTC (rev 86702)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java	2009-04-02 21:51:50 UTC (rev 86703)
@@ -29,6 +29,7 @@
 import org.jboss.jms.server.messagecounter.MessageCounter;
 import org.jboss.jms.server.messagecounter.MessageStatistics;
 import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ActivationPolicy;
 import org.jboss.managed.api.annotation.ManagementComponent;
 import org.jboss.managed.api.annotation.ManagementObject;
 import org.jboss.managed.api.annotation.ManagementObjectID;
@@ -58,7 +59,8 @@
    @ManagementProperty(use={ViewUse.RUNTIME}, description="The destination name")
    public String getName() { return null; }   
 
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The destination's JNDI name")
+   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The destination's JNDI name",
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    @ManagementObjectID(type="Queue")
    public String getJNDIName() { return null; }
    public void setJNDIName(String arg0) throws Exception { }
@@ -99,19 +101,31 @@
    public int getMaxSize() { return 0; }
    public void setMaxSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when queue is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The in-memory message limit, can only be set when queue is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getFullSize() { return 0; }
    public void setFullSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The paging size, can only be set when queue is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The paging size, can only be set when queue is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getPageSize() { return 0; }
    public void setPageSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when queue is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The write-cache size, can only be set when queue is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getDownCacheSize() { return 0; }
    public void setDownCacheSize(int arg0) { }
 
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Is this a clustered destination?")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="Is this a clustered destination?",
+         includeInTemplate=true, readOnly=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public boolean isClustered() { return false; }
    public void setClustered(boolean arg0) { }
 

Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java	2009-04-02 21:45:50 UTC (rev 86702)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java	2009-04-02 21:51:50 UTC (rev 86703)
@@ -27,6 +27,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ActivationPolicy;
 import org.jboss.managed.api.annotation.ManagementComponent;
 import org.jboss.managed.api.annotation.ManagementObject;
 import org.jboss.managed.api.annotation.ManagementObjectID;
@@ -56,7 +57,8 @@
    @ManagementProperty(use={ViewUse.RUNTIME}, description="The destination name")
    public String getName() { return null; }   
 
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The destination's JNDI name")
+   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The destination's JNDI name",
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    @ManagementObjectID(type="Topic")
    public String getJNDIName() { return null; }
    public void setJNDIName(String arg0) throws Exception { }
@@ -88,19 +90,31 @@
    public int getMaxSize() { return 0; }
    public void setMaxSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The in-memory message limit, can only be set when topic is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The in-memory message limit, can only be set when topic is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getFullSize() { return 0; }
    public void setFullSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The paging size, can only be set when topic is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The paging size, can only be set when topic is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getPageSize() { return 0; }
    public void setPageSize(int arg0) { }
    
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The write-cache size, can only be set when topic is stopped")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="The write-cache size, can only be set when topic is stopped",
+         includeInTemplate=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public int getDownCacheSize() { return 0; }
    public void setDownCacheSize(int arg0) { }
 
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Is this a clustered destination?")
+   @ManagementProperty(use={ViewUse.CONFIGURATION},
+         description="Is this a clustered destination?",
+         includeInTemplate=true, readOnly=true,
+         activationPolicy=ActivationPolicy.DEPLOYMENT_RESTART)
    public boolean isClustered() { return false; }
    public void setClustered(boolean arg0) { }
 

Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2009-04-02 21:45:50 UTC (rev 86702)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2009-04-02 21:51:50 UTC (rev 86703)
@@ -61,6 +61,7 @@
 import org.jboss.managed.api.MutableManagedComponent;
 import org.jboss.managed.api.MutableManagedObject;
 import org.jboss.managed.api.RunState;
+import org.jboss.managed.api.annotation.ActivationPolicy;
 import org.jboss.managed.api.annotation.ManagementComponent;
 import org.jboss.managed.api.annotation.ManagementObject;
 import org.jboss.managed.api.annotation.ManagementObjectID;
@@ -1220,10 +1221,11 @@
          ctxProp.setValue(metaValue);
          // Dispatch any runtime component property values
          Object componentName = getComponentName(ctxProp);
-         if (componentName != null)
+         ActivationPolicy policy = ctxProp.getActivationPolicy();
+         if (componentName != null && policy.equals(ActivationPolicy.IMMEDIATE))
             dispatcher.set(componentName, ctxProp.getName(), metaValue);
       }
-      
+
       // Persist the changed values
       this.store.updateDeployment(compDeployment, serverComp);
       // Force reload




More information about the jboss-cvs-commits mailing list