[jboss-cvs] JBossAS SVN: r90181 - in branches/JBPAPP_5_0: profileservice/src/main/org/jboss/profileservice/management/templates and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 15 05:46:37 EDT 2009
Author: emuckenhuber
Date: 2009-06-15 05:46:36 -0400 (Mon, 15 Jun 2009)
New Revision: 90181
Modified:
branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java
branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
branches/JBPAPP_5_0/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
merge with branch 5_x
Modified: branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java
===================================================================
--- branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java 2009-06-15 09:35:04 UTC (rev 90180)
+++ branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java 2009-06-15 09:46:36 UTC (rev 90181)
@@ -55,10 +55,10 @@
private static final long serialVersionUID = 1343224268002757169L;
private AtomicLong operationID = new AtomicLong(0);
private AtomicLong propertyID = new AtomicLong(0);
- private transient RuntimeComponentDispatcher dispatcher;
- private transient InvokerLocator locator;
- private transient Map<Long, ManagedProperty> properties = new ConcurrentHashMap<Long, ManagedProperty>();
- private transient Map<Long, ManagedOperation> operations = new ConcurrentHashMap<Long, ManagedOperation>();
+ private RuntimeComponentDispatcher dispatcher;
+ private InvokerLocator locator;
+ private Map<Long, ManagedProperty> properties = new ConcurrentHashMap<Long, ManagedProperty>();
+ private Map<Long, ManagedOperation> operations = new ConcurrentHashMap<Long, ManagedOperation>();
/** The runtime component dispatcher proxy. */
private DelegatingComponentDispatcher dispatcherProxy;
Modified: branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
===================================================================
--- branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-06-15 09:35:04 UTC (rev 90180)
+++ branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-06-15 09:46:36 UTC (rev 90181)
@@ -25,6 +25,7 @@
import org.jboss.managed.api.Fields;
import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.managed.plugins.BasicDeploymentTemplateInfo;
import org.jboss.managed.plugins.DefaultFieldsImpl;
import org.jboss.managed.plugins.ManagedPropertyImpl;
@@ -99,6 +100,11 @@
ManagedPropertyImpl newProperty = new ManagedPropertyImpl(f);
+ // Skip non configuration properties except clustered
+ if(newProperty.hasViewUse(ViewUse.CONFIGURATION) == false
+ && property.getName().equals("clustered") == false)
+ continue;
+
// Override
addProperty(newProperty);
}
Modified: branches/JBPAPP_5_0/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java 2009-06-15 09:35:04 UTC (rev 90180)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java 2009-06-15 09:46:36 UTC (rev 90181)
@@ -40,7 +40,6 @@
import org.jboss.logging.Logger;
import org.jboss.managed.api.ManagedDeployment;
import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
import org.jboss.managed.api.annotation.ManagementDeployment;
import org.jboss.managed.api.annotation.ManagementConstants;
import org.jboss.managed.plugins.ManagedDeploymentImpl;
@@ -72,7 +71,6 @@
Map<String, ManagedObject> unitMOs,
ManagedDeployment parent)
{
- DeploymentPhase phase = unit.getAttachment(DeploymentPhase.class);
ManagementDeployment mdAnnotation = null;
HashMap<String, ManagedObject> validUnitMOs = new HashMap<String, ManagedObject>();
for(String name : unitMOs.keySet())
@@ -90,17 +88,13 @@
String[] types = {};
if(mdAnnotation != null)
{
- if(phase == null)
- phase = mdAnnotation.phase();
String mdaSimpleName = mdAnnotation.simpleName();
if(mdaSimpleName.length() > 0 && ManagementConstants.GENERATED.equals(mdaSimpleName) == false)
simpleName = mdAnnotation.simpleName();
types = mdAnnotation.types();
}
- if( phase == null )
- phase = DeploymentPhase.APPLICATION;
- ManagedDeployment md = new ManagedDeploymentImpl(unit.getName(), simpleName, phase, parent, validUnitMOs);
+ ManagedDeployment md = new ManagedDeploymentImpl(unit.getName(), simpleName, parent, validUnitMOs);
if(types.length > 0)
{
for(String type : types)
Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-06-15 09:35:04 UTC (rev 90180)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-06-15 09:46:36 UTC (rev 90181)
@@ -21,14 +21,10 @@
*/
package org.jboss.test.profileservice.test;
-import java.lang.annotation.Annotation;
-import java.net.URI;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
@@ -49,7 +45,6 @@
import org.jboss.managed.api.ManagedOperation;
import org.jboss.managed.api.ManagedProperty;
import org.jboss.managed.api.RunState;
-import org.jboss.managed.api.annotation.ManagementProperty;
import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.metatype.api.types.CompositeMetaType;
import org.jboss.metatype.api.types.MapCompositeMetaType;
@@ -64,7 +59,6 @@
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.virtual.VFS;
/** Test of using ProfileService
@@ -578,18 +572,10 @@
ArrayList<ManagedProperty> stats = new ArrayList<ManagedProperty>();
for(ManagedProperty prop : props.values())
{
- Map<String, Annotation> annotations = prop.getAnnotations();
- if(annotations == null)
- continue;
- ManagementProperty mpa = (ManagementProperty) annotations.get(ManagementProperty.class.getName());
- ViewUse[] uses = mpa.use();
- for(ViewUse use : uses)
+ if(prop.hasViewUse(ViewUse.STATISTIC))
{
- if(use == ViewUse.STATISTIC)
- {
- log.info("STATISTIC: "+prop+", value: "+prop.getValue());
- stats.add(prop);
- }
+ log.info("STATISTIC: "+prop+", value: "+prop.getValue());
+ stats.add(prop);
}
}
assertTrue("Saw ManagedProperty(ViewUse.STATISTIC)", stats.size() > 0);
More information about the jboss-cvs-commits
mailing list