[jboss-cvs] JBossAS SVN: r70467 - trunk/profileservice/src/main/org/jboss/profileservice/management.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 6 01:42:51 EST 2008


Author: scott.stark at jboss.org
Date: 2008-03-06 01:42:51 -0500 (Thu, 06 Mar 2008)
New Revision: 70467

Modified:
   trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
   trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties
Log:
Only attempt to update properties with ViewUse.CONFIGURATION

Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2008-03-06 06:42:25 UTC (rev 70466)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2008-03-06 06:42:51 UTC (rev 70467)
@@ -828,10 +828,18 @@
       ManagedDeployment compMD = managedDeployments.get(md.getName());
       log.debug("updateComponent, profile="+activeProfile+", deploymentName="+name+", phase="+phase+", :"+compMD);
       ManagedComponent serverComp = compMD.getComponent(comp.getName());
+      if(serverComp == null)
+      {
+         formatter.applyPattern(i18n.getString("ManagementView.InvalidComponentName")); //$NON-NLS-1$
+         Object[] args = {comp.getName(), md.getName()};
+         String msg = formatter.format(args);
+         throw new IllegalArgumentException(msg);
+      }
+
       for(ManagedProperty prop : comp.getProperties().values())
       {
-         // Skip null values
-         if( prop.getValue() == null )
+         // Skip null values && non-CONFIGURATION values
+         if( prop.getValue() == null || prop.hasViewUse(ViewUse.CONFIGURATION) == false)
             continue;
 
          ManagedProperty ctxProp = serverComp.getProperties().get(prop.getName());

Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties	2008-03-06 06:42:25 UTC (rev 70466)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties	2008-03-06 06:42:51 UTC (rev 70467)
@@ -4,4 +4,5 @@
 ManagementView.NoSuchTemplate=Failed to find template for: {0}
 ManagementView.InvalidTemplateKey=Failed to map key: {0} to managed attachments for deployment
 ManagementView.InvalidTemplateProperty=Failed to map property: {0} to managed properties for deployment
-ManagementView.InvalidTemplatePropertyMO=Property: {0} does not use ManagedObjectImpl
\ No newline at end of file
+ManagementView.InvalidTemplatePropertyMO=Property: {0} does not use ManagedObjectImpl
+ManagementView.InvalidComponentName=Name: {0} does not map to existing ManagedComponet in ManagedDeployment: {1}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list