[jboss-cvs] JBossAS SVN: r81278 - in trunk: system/src/main/org/jboss/deployers/plugins/managed and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 19 06:16:32 EST 2008
Author: alesj
Date: 2008-11-19 06:16:32 -0500 (Wed, 19 Nov 2008)
New Revision: 81278
Modified:
trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java
trunk/system/src/main/org/jboss/deployers/plugins/managed/KernelDeploymentManagedObjectCreator.java
Log:
Fix possible bug in KDMOC - stateMP was not being used.
Javadocs in KBRCD.
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java 2008-11-19 09:54:09 UTC (rev 81277)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java 2008-11-19 11:16:32 UTC (rev 81278)
@@ -140,12 +140,7 @@
/**
* Get the state of a bean
*
- * @param <T> the expected type
- * @param controller the controller
* @param name the bean name
- * @param expectedType the expected type
- * @return the bean
- * @throws IllegalStateException if the bean is not installed or has the wrong type
*/
protected EnumValue getState(Object name)
{
@@ -153,9 +148,9 @@
ControllerContext context = controller.getContext(name, null);
if (context == null)
throw new IllegalStateException("Context not installed: " + name);
+
ControllerState state = context.getState();
- EnumValueSupport stateValue = new EnumValueSupport(ControllerStateMetaType.TYPE, state.getStateString());
- return stateValue;
+ return new EnumValueSupport(ControllerStateMetaType.TYPE, state.getStateString());
}
}
Modified: trunk/system/src/main/org/jboss/deployers/plugins/managed/KernelDeploymentManagedObjectCreator.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/plugins/managed/KernelDeploymentManagedObjectCreator.java 2008-11-19 09:54:09 UTC (rev 81277)
+++ trunk/system/src/main/org/jboss/deployers/plugins/managed/KernelDeploymentManagedObjectCreator.java 2008-11-19 11:16:32 UTC (rev 81278)
@@ -27,7 +27,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.beans.info.spi.PropertyInfo;
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.deployers.spi.DeploymentException;
@@ -131,7 +130,7 @@
MutableManagedObject bmdfMMO = (MutableManagedObject) bmdfMO;
Map<String, ManagedProperty> oldProps = bmdfMMO.getProperties();
ManagedProperty beansMPCheck = oldProps.get("beans");
- // If there already is a beans property assume its correct
+ // If there already is a beans property assume it's correct
if(beansMPCheck != null)
{
// Need to map
@@ -147,7 +146,7 @@
// Add a state property
Fields stateFields = getFields("state", ControllerStateMetaType.TYPE);
ManagedPropertyImpl stateMP = new ManagedPropertyImpl(bmdfMO, stateFields);
- newProps.put("state", beansMP);
+ newProps.put("state", stateMP);
// Create a ManagedObject for each of the beans BeanMetaData
List<BeanMetaData> beans = bmdf.getBeans();
More information about the jboss-cvs-commits
mailing list