You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/05/05 22:08:53 UTC

[39/51] [partial] FLEX-34306 - [BlazeDS] Make the BlazeDS build run on Windows machines - Added some mkdir commands to the ANT Build.java - Did some fine-tuning to resolve some compile errors

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/MBeanServerLocatorFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/MBeanServerLocatorFactory.java b/modules/core/src/flex/management/MBeanServerLocatorFactory.java
old mode 100755
new mode 100644
index f69da6d..e465a9b
--- a/modules/core/src/flex/management/MBeanServerLocatorFactory.java
+++ b/modules/core/src/flex/management/MBeanServerLocatorFactory.java
@@ -1,125 +1,125 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management;
-
-import flex.messaging.log.Log;
-import flex.messaging.log.LogCategories;
-import flex.messaging.util.ClassUtil;
-
-/**
- * Factory to get a <code>MBeanServerLocator</code>.
- * 
- * @author shodgson
- */
-public class MBeanServerLocatorFactory
-{
-    //--------------------------------------------------------------------------
-    //
-    // Private Static Variables
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     * The MBeanServerLocator impl to use; lazily init'ed on first access.
-     */
-    private static MBeanServerLocator locator;
-
-    //--------------------------------------------------------------------------
-    //
-    // Public Static Methods
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     * Returns a <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
-     * 
-     * @return The <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
-     */
-    public static synchronized MBeanServerLocator getMBeanServerLocator()
-    {
-        if (locator == null)
-        {
-            // Try app-server specific locators.
-            // WebSphere provides access to its MBeanServer via a custom admin API.
-            instantiateLocator("flex.management.WebSphereMBeanServerLocator", new String[] {"com.ibm.websphere.management.AdminServiceFactory"});
-
-            // Sun JRE 1.5 based implementation
-            if (locator == null)
-                locator =  new PlatformMBeanServerLocator();
-            
-            if (Log.isDebug())
-                Log.getLogger(LogCategories.MANAGEMENT_GENERAL).debug("Using MBeanServerLocator: " + locator.getClass().getName());
-        }
-        return locator;
-    }
-    
-    /**
-     * Release static MBeanServerLocator
-     * Called on MessageBroker shutdown.
-     */
-    public static void clear()
-    {
-        locator = null;
-    }
-    
-    //--------------------------------------------------------------------------
-    //
-    // Private Static Methods
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     * Helper method that attempts to load a specific MBeanServerLocator.
-     * 
-     * @param locatorClassName The classname of the desired MBeanServerLocator.
-     * @param dependencyClassNames Any additional dependent classnames that the desired locator depends upon
-     *                            that should also be tested for availability.
-     */
-    private static void instantiateLocator(String locatorClassName, String[] dependencyClassNames)
-    {
-        try
-        {
-            if (dependencyClassNames != null)
-            {
-                for (int i = 0; i < dependencyClassNames.length; i++)
-                    ClassUtil.createClass(dependencyClassNames[i]);
-            }
-            
-            Class locatorClass = ClassUtil.createClass(locatorClassName);
-            locator = (MBeanServerLocator)locatorClass.newInstance();
-        }
-        catch (Throwable t)
-        {
-            if (Log.isDebug())
-                Log.getLogger(LogCategories.MANAGEMENT_MBEANSERVER).debug("Not using MBeanServerLocator: " + locatorClassName + ". Reason: " + t.getMessage());
-        }
-    }
-    
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    //
-    //--------------------------------------------------------------------------
-    
-    /**
-     * Direct instantiation is not allowed.
-     * Use <code>getMBeanServerLocator()</code> to obtain a <code>MBeanServerLocator</code> 
-     * instance to lookup the proper MBean server to use.
-     */
-    private MBeanServerLocatorFactory() {}
-    
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management;
+
+import flex.messaging.log.Log;
+import flex.messaging.log.LogCategories;
+import flex.messaging.util.ClassUtil;
+
+/**
+ * Factory to get a <code>MBeanServerLocator</code>.
+ * 
+ * @author shodgson
+ */
+public class MBeanServerLocatorFactory
+{
+    //--------------------------------------------------------------------------
+    //
+    // Private Static Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     * The MBeanServerLocator impl to use; lazily init'ed on first access.
+     */
+    private static MBeanServerLocator locator;
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Static Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     * Returns a <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
+     * 
+     * @return The <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
+     */
+    public static synchronized MBeanServerLocator getMBeanServerLocator()
+    {
+        if (locator == null)
+        {
+            // Try app-server specific locators.
+            // WebSphere provides access to its MBeanServer via a custom admin API.
+            instantiateLocator("flex.management.WebSphereMBeanServerLocator", new String[] {"com.ibm.websphere.management.AdminServiceFactory"});
+
+            // Sun JRE 1.5 based implementation
+            if (locator == null)
+                locator =  new PlatformMBeanServerLocator();
+            
+            if (Log.isDebug())
+                Log.getLogger(LogCategories.MANAGEMENT_GENERAL).debug("Using MBeanServerLocator: " + locator.getClass().getName());
+        }
+        return locator;
+    }
+    
+    /**
+     * Release static MBeanServerLocator
+     * Called on MessageBroker shutdown.
+     */
+    public static void clear()
+    {
+        locator = null;
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    // Private Static Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     * Helper method that attempts to load a specific MBeanServerLocator.
+     * 
+     * @param locatorClassName The classname of the desired MBeanServerLocator.
+     * @param dependencyClassNames Any additional dependent classnames that the desired locator depends upon
+     *                            that should also be tested for availability.
+     */
+    private static void instantiateLocator(String locatorClassName, String[] dependencyClassNames)
+    {
+        try
+        {
+            if (dependencyClassNames != null)
+            {
+                for (int i = 0; i < dependencyClassNames.length; i++)
+                    ClassUtil.createClass(dependencyClassNames[i]);
+            }
+            
+            Class locatorClass = ClassUtil.createClass(locatorClassName);
+            locator = (MBeanServerLocator)locatorClass.newInstance();
+        }
+        catch (Throwable t)
+        {
+            if (Log.isDebug())
+                Log.getLogger(LogCategories.MANAGEMENT_MBEANSERVER).debug("Not using MBeanServerLocator: " + locatorClassName + ". Reason: " + t.getMessage());
+        }
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     * Direct instantiation is not allowed.
+     * Use <code>getMBeanServerLocator()</code> to obtain a <code>MBeanServerLocator</code> 
+     * instance to lookup the proper MBean server to use.
+     */
+    private MBeanServerLocatorFactory() {}
+    
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/Manageable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/Manageable.java b/modules/core/src/flex/management/Manageable.java
old mode 100755
new mode 100644
index 0da2890..162501d
--- a/modules/core/src/flex/management/Manageable.java
+++ b/modules/core/src/flex/management/Manageable.java
@@ -1,55 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management;
-
-/**
- * Manageability of a class is enabled by implementing this interface. The
- * specific level of manageability is defined by the relationship between
- * a manageable component and its corresponding control.
- * 
- * @author shodgson
- */
-public interface Manageable
-{
-    /**
-     * Returns <code>true</code> if the component is enabled for management.
-     * 
-     * @return <code>true</code> if the component is enabled for management.
-     */
-    boolean isManaged();
-    
-    /**
-     * Enables or disables management for the component.
-     * 
-     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
-     */
-    void setManaged(boolean enableManagement);
-    
-    /**
-     * Returns the control MBean used to manage the component.
-     * 
-     * @return The control MBean used to manage the component.
-     */
-    BaseControl getControl();
-    
-    /**
-     * Set the control MBean used to manage the component.
-     * 
-     * @param control The <code>BaseControl</code> MBean used to manage the component.
-     */
-    void setControl(BaseControl control);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management;
+
+/**
+ * Manageability of a class is enabled by implementing this interface. The
+ * specific level of manageability is defined by the relationship between
+ * a manageable component and its corresponding control.
+ * 
+ * @author shodgson
+ */
+public interface Manageable
+{
+    /**
+     * Returns <code>true</code> if the component is enabled for management.
+     * 
+     * @return <code>true</code> if the component is enabled for management.
+     */
+    boolean isManaged();
+    
+    /**
+     * Enables or disables management for the component.
+     * 
+     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
+     */
+    void setManaged(boolean enableManagement);
+    
+    /**
+     * Returns the control MBean used to manage the component.
+     * 
+     * @return The control MBean used to manage the component.
+     */
+    BaseControl getControl();
+    
+    /**
+     * Set the control MBean used to manage the component.
+     * 
+     * @param control The <code>BaseControl</code> MBean used to manage the component.
+     */
+    void setControl(BaseControl control);
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/ManageableComponent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/ManageableComponent.java b/modules/core/src/flex/management/ManageableComponent.java
old mode 100755
new mode 100644
index 71d07de..af27b6c
--- a/modules/core/src/flex/management/ManageableComponent.java
+++ b/modules/core/src/flex/management/ManageableComponent.java
@@ -1,421 +1,421 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management;
-
-import java.util.Date;
-
-import flex.messaging.FlexComponent;
-import flex.messaging.config.ConfigMap;
-import flex.messaging.config.ConfigurationException;
-import flex.messaging.log.Log;
-
-/**
- * An abstract base class that implements the <code>Manageable</code> and <code>FlexComponent</code> interfaces.
- * This is an excellent starting point for a server component that may be instantiated, initialized, started and
- * stopped, as well as exposing an optional management interface via a peer MBean.
- * <p>Support for changing component properties while the component is
- * started should be determined on a per-property basis, and the started property is volatile to ensure consistent
- * reads of the start state of the component across threads. This class performs no synchronization and is not safe for modification by multiple concurrent threads
- * in the absence of external synchronization.
- * </p>
- */
-public abstract class ManageableComponent implements Manageable, FlexComponent
-{
-    //--------------------------------------------------------------------------
-    //
-    // Protected Static Constants
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Error code for attempting to change a property after starting.
-     */
-    protected static final int PROPERTY_CHANGE_AFTER_STARTUP = 11115;
-
-    /**
-     * Error code to alert the user that a required component property is null.
-     */
-    protected static final int NULL_COMPONENT_PROPERTY = 11116;
-
-    //--------------------------------------------------------------------------
-    //
-    // Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Constructs a <code>ManageableComponent</code> instance, specifying
-     * whether to enable management.
-     * Enabling management will trigger the creation of a peer MBean that exposes the
-     * management interface for this component.
-     *
-     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable
-     * management.
-     */
-    public ManageableComponent(boolean enableManagement)
-    {
-        setManaged(enableManagement);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Public Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  control
-    //----------------------------------
-
-    /**
-     * The peer MBean of the <code>ManageableComponent</code> that exposes a management interface.
-     */
-    protected BaseControl control;
-
-    /**
-     * (non-JavaDoc)
-     * @see Manageable#getControl()
-     */
-    public BaseControl getControl()
-    {
-        return control;
-    }
-
-    /**
-     * (non-JavaDoc)
-     * @see Manageable#setControl(BaseControl)
-     */
-    public void setControl(BaseControl control)
-    {
-        this.control = control;
-    }
-
-    //----------------------------------
-    //  id
-    //----------------------------------
-
-    /**
-     * The internal id value of the <code>ManageableComponent</code>.
-     */
-    protected String id;
-
-    /**
-     * Returns the id of the <code>ManageableComponent</code>.
-     *
-     * @return The id of the <code>ManageableComponent</code>.
-     */
-    public String getId()
-    {
-        return id;
-    }
-
-    /**
-     * Sets the id of the <code>ManageableComponent</code>. The id cannot be
-     * null and it cannot be changed after startup.
-     *
-     * @param id The id of the <code>ManageableComponent</code>.
-     */
-    public void setId(String id)
-    {
-        if (isStarted())
-        {
-            blockAssignmentWhileStarted("id");
-        }
-        if (id == null)
-        {
-            // Id of a component cannot be null.
-            blockNullAssignment("id");
-        }
-        this.id = id;
-    }
-
-    //----------------------------------
-    //  managed
-    //----------------------------------
-
-    /**
-     * The internal managed flag of the <code>ManageableComponent</code>.
-     */
-    protected volatile boolean managed;
-
-    /**
-     * (non-JavaDoc)
-     * @see Manageable#isManaged()
-     */
-    public boolean isManaged()
-    {
-        return managed;
-    }
-
-    /**
-     * Enables or disables management for the component. Management cannot be
-     * changed once the component is started and management cannot be
-     * <code>true</code> if the parent of the component is not managed.
-     *
-     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
-     */
-    public void setManaged(boolean enableManagement)
-    {
-        if (isStarted() && control != null)
-        {
-            blockAssignmentWhileStarted("managed");
-        }
-        if (enableManagement && parent != null && !parent.isManaged())
-        {
-            if (Log.isWarn())
-            {
-                Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
-                " since its parent is unmanaged.");
-            }
-            return;
-        }
-        managed = enableManagement;
-    }
-
-    //----------------------------------
-    //  parent
-    //----------------------------------
-
-    /**
-     * The internal reference to the parent component (if any) of the <code>ManageableComponent</code>.
-     */
-    protected Manageable parent;
-
-    /**
-     * Returns the parent of the component.
-     *
-     * @return The parent of the component.
-     */
-    public Manageable getParent()
-    {
-        return parent;
-    }
-
-    /**
-     * Sets the parent of the component. The parent cannot be changed
-     * after component startup and it cannot be null.
-     *
-     * @param parent The parent of the component.
-     */
-    public void setParent(Manageable parent)
-    {
-        if (isStarted())
-        {
-            blockAssignmentWhileStarted("parent");
-        }
-        if (parent == null)
-        {
-            // Parent of a component cannot be null.
-            blockNullAssignment("parent");
-        }
-        if (!parent.isManaged() && isManaged())
-        {
-            if (Log.isWarn())
-            {
-                Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
-                        " since its parent is unmanaged.");
-            }
-            setManaged(false);
-        }
-        this.parent = parent;
-    }
-
-    //----------------------------------
-    //  started
-    //----------------------------------
-
-    /**
-     * The internal started flag of the <code>ManageableComponent</code>.
-     */
-    protected volatile boolean started;
-
-    /**
-     * Returns if the component is started or not.
-     *
-     * @return <code>true</code> if the component is started.
-     */
-    public boolean isStarted()
-    {
-        return started;
-    }
-
-    /**
-     * Sets if the component is started.
-     *
-     * @param started
-     */
-    protected void setStarted(boolean started)
-    {
-        if (this.started != started)
-        {
-            this.started = started;
-            if (started && control != null)
-            {
-                control.setStartTimestamp(new Date());
-            }
-        }
-    }
-
-    //----------------------------------
-    //  valid
-    //----------------------------------
-
-    /**
-     * The internal valid flag of the <code>ManageableComponent</code>.
-     */
-    protected boolean valid;
-
-    /**
-     * Returns if the component is valid.
-     *
-     * @return <code>true</code> if the component is valid.
-     */
-    public boolean isValid()
-    {
-        return valid;
-    }
-
-    /**
-     * Sets if the component is valid.
-     *
-     * @param valid
-     */
-    protected void setValid(boolean valid)
-    {
-        this.valid = valid;
-    }
-
-    //----------------------------------
-    //  logCategory
-    //----------------------------------
-
-    /**
-     * Returns the log category of the component. Subclasses must provide an
-     * implementation that returns their desired log category.
-     *
-     * @return The log category of the component.
-     */
-    protected abstract String getLogCategory();
-
-    //--------------------------------------------------------------------------
-    //
-    // Public Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Invoked to initialize the <code>ManageableComponent</code>.
-     * This base implementation calls <code>setId()</code> passing the provided
-     * id and ignores the properties map argument.
-     * Subclasses should call <code>super.initialize()</code>.
-     *
-     * @param id Id of the <code>ManageableComponent</code>.
-     * @param properties Properties for the <code>ManageableComponent</code>.
-     */
-    public void initialize(String id, ConfigMap properties)
-    {
-        setId(id);
-    }
-
-    /**
-     * Validates and starts the component.
-     *
-     * Subclasses should call <code>super.start()</code>.
-     */
-    public void start()
-    {
-        validate();
-        setStarted(true);
-    }
-
-    /**
-     * Invalidates and stops the component.
-     *
-     * Subclasses should call <code>super.stop()</code>.
-     */
-    public void stop()
-    {
-        invalidate();
-        setStarted(false);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Protocted Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     * Convenience method that may be used to generate and throw an Exception for an attempt to set the specified property if the
-     * component is started.
-     *
-     * @param propertyName The name of the property being incorrectly assigned; included in the Exception message.
-     */
-    protected void blockAssignmentWhileStarted(String propertyName)
-    {
-        ConfigurationException ce = new ConfigurationException();
-        ce.setMessage(PROPERTY_CHANGE_AFTER_STARTUP, new Object[]{propertyName});
-        throw ce;
-    }
-
-    /**
-     * Convenience method that may be used to generate and throw an Exception for an attempt to assign a null value to a property that
-     * requires non-null values.
-     *
-     * @param propertyName The name of the property being incorrectly assigned.
-     */
-    protected void blockNullAssignment(String propertyName)
-    {
-        ConfigurationException ce = new ConfigurationException();
-        ce.setMessage(NULL_COMPONENT_PROPERTY, new Object[]{propertyName});
-        throw ce;
-    }
-
-    /**
-     * Invoked from within the <code>stop()</code> method to invalidate the component as part of shutdown.
-     * This base implementation sets the valid property to false.
-     * Subclasses should call <code>super.invalidate()</code>.
-     */
-    protected void invalidate()
-    {
-        setValid(false);
-    }
-
-    /**
-     * Hook method invoked from within the <code>start()</code> method to validate that the component is in a
-     * startable state.
-     * This base implementation validates the component by ensuring it has an id and a parent and then sets
-     * the valid property to true.
-     * If the component is not in a valid, startable state an Exception is thrown.
-     * Subclasses should call <code>super.validate()</code>.
-     */
-    protected void validate()
-    {
-        if (getId() == null)
-        {
-            // Id of a component cannot be null.
-            blockNullAssignment("id");
-        }
-        if (getParent() == null)
-        {
-            // Parent of a component cannot be null.
-            blockNullAssignment("parent");
-        }
-        setValid(true);
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management;
+
+import java.util.Date;
+
+import flex.messaging.FlexComponent;
+import flex.messaging.config.ConfigMap;
+import flex.messaging.config.ConfigurationException;
+import flex.messaging.log.Log;
+
+/**
+ * An abstract base class that implements the <code>Manageable</code> and <code>FlexComponent</code> interfaces.
+ * This is an excellent starting point for a server component that may be instantiated, initialized, started and
+ * stopped, as well as exposing an optional management interface via a peer MBean.
+ * <p>Support for changing component properties while the component is
+ * started should be determined on a per-property basis, and the started property is volatile to ensure consistent
+ * reads of the start state of the component across threads. This class performs no synchronization and is not safe for modification by multiple concurrent threads
+ * in the absence of external synchronization.
+ * </p>
+ */
+public abstract class ManageableComponent implements Manageable, FlexComponent
+{
+    //--------------------------------------------------------------------------
+    //
+    // Protected Static Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Error code for attempting to change a property after starting.
+     */
+    protected static final int PROPERTY_CHANGE_AFTER_STARTUP = 11115;
+
+    /**
+     * Error code to alert the user that a required component property is null.
+     */
+    protected static final int NULL_COMPONENT_PROPERTY = 11116;
+
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Constructs a <code>ManageableComponent</code> instance, specifying
+     * whether to enable management.
+     * Enabling management will trigger the creation of a peer MBean that exposes the
+     * management interface for this component.
+     *
+     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable
+     * management.
+     */
+    public ManageableComponent(boolean enableManagement)
+    {
+        setManaged(enableManagement);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  control
+    //----------------------------------
+
+    /**
+     * The peer MBean of the <code>ManageableComponent</code> that exposes a management interface.
+     */
+    protected BaseControl control;
+
+    /**
+     * (non-JavaDoc)
+     * @see Manageable#getControl()
+     */
+    public BaseControl getControl()
+    {
+        return control;
+    }
+
+    /**
+     * (non-JavaDoc)
+     * @see Manageable#setControl(BaseControl)
+     */
+    public void setControl(BaseControl control)
+    {
+        this.control = control;
+    }
+
+    //----------------------------------
+    //  id
+    //----------------------------------
+
+    /**
+     * The internal id value of the <code>ManageableComponent</code>.
+     */
+    protected String id;
+
+    /**
+     * Returns the id of the <code>ManageableComponent</code>.
+     *
+     * @return The id of the <code>ManageableComponent</code>.
+     */
+    public String getId()
+    {
+        return id;
+    }
+
+    /**
+     * Sets the id of the <code>ManageableComponent</code>. The id cannot be
+     * null and it cannot be changed after startup.
+     *
+     * @param id The id of the <code>ManageableComponent</code>.
+     */
+    public void setId(String id)
+    {
+        if (isStarted())
+        {
+            blockAssignmentWhileStarted("id");
+        }
+        if (id == null)
+        {
+            // Id of a component cannot be null.
+            blockNullAssignment("id");
+        }
+        this.id = id;
+    }
+
+    //----------------------------------
+    //  managed
+    //----------------------------------
+
+    /**
+     * The internal managed flag of the <code>ManageableComponent</code>.
+     */
+    protected volatile boolean managed;
+
+    /**
+     * (non-JavaDoc)
+     * @see Manageable#isManaged()
+     */
+    public boolean isManaged()
+    {
+        return managed;
+    }
+
+    /**
+     * Enables or disables management for the component. Management cannot be
+     * changed once the component is started and management cannot be
+     * <code>true</code> if the parent of the component is not managed.
+     *
+     * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
+     */
+    public void setManaged(boolean enableManagement)
+    {
+        if (isStarted() && control != null)
+        {
+            blockAssignmentWhileStarted("managed");
+        }
+        if (enableManagement && parent != null && !parent.isManaged())
+        {
+            if (Log.isWarn())
+            {
+                Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
+                " since its parent is unmanaged.");
+            }
+            return;
+        }
+        managed = enableManagement;
+    }
+
+    //----------------------------------
+    //  parent
+    //----------------------------------
+
+    /**
+     * The internal reference to the parent component (if any) of the <code>ManageableComponent</code>.
+     */
+    protected Manageable parent;
+
+    /**
+     * Returns the parent of the component.
+     *
+     * @return The parent of the component.
+     */
+    public Manageable getParent()
+    {
+        return parent;
+    }
+
+    /**
+     * Sets the parent of the component. The parent cannot be changed
+     * after component startup and it cannot be null.
+     *
+     * @param parent The parent of the component.
+     */
+    public void setParent(Manageable parent)
+    {
+        if (isStarted())
+        {
+            blockAssignmentWhileStarted("parent");
+        }
+        if (parent == null)
+        {
+            // Parent of a component cannot be null.
+            blockNullAssignment("parent");
+        }
+        if (!parent.isManaged() && isManaged())
+        {
+            if (Log.isWarn())
+            {
+                Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
+                        " since its parent is unmanaged.");
+            }
+            setManaged(false);
+        }
+        this.parent = parent;
+    }
+
+    //----------------------------------
+    //  started
+    //----------------------------------
+
+    /**
+     * The internal started flag of the <code>ManageableComponent</code>.
+     */
+    protected volatile boolean started;
+
+    /**
+     * Returns if the component is started or not.
+     *
+     * @return <code>true</code> if the component is started.
+     */
+    public boolean isStarted()
+    {
+        return started;
+    }
+
+    /**
+     * Sets if the component is started.
+     *
+     * @param started
+     */
+    protected void setStarted(boolean started)
+    {
+        if (this.started != started)
+        {
+            this.started = started;
+            if (started && control != null)
+            {
+                control.setStartTimestamp(new Date());
+            }
+        }
+    }
+
+    //----------------------------------
+    //  valid
+    //----------------------------------
+
+    /**
+     * The internal valid flag of the <code>ManageableComponent</code>.
+     */
+    protected boolean valid;
+
+    /**
+     * Returns if the component is valid.
+     *
+     * @return <code>true</code> if the component is valid.
+     */
+    public boolean isValid()
+    {
+        return valid;
+    }
+
+    /**
+     * Sets if the component is valid.
+     *
+     * @param valid
+     */
+    protected void setValid(boolean valid)
+    {
+        this.valid = valid;
+    }
+
+    //----------------------------------
+    //  logCategory
+    //----------------------------------
+
+    /**
+     * Returns the log category of the component. Subclasses must provide an
+     * implementation that returns their desired log category.
+     *
+     * @return The log category of the component.
+     */
+    protected abstract String getLogCategory();
+
+    //--------------------------------------------------------------------------
+    //
+    // Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Invoked to initialize the <code>ManageableComponent</code>.
+     * This base implementation calls <code>setId()</code> passing the provided
+     * id and ignores the properties map argument.
+     * Subclasses should call <code>super.initialize()</code>.
+     *
+     * @param id Id of the <code>ManageableComponent</code>.
+     * @param properties Properties for the <code>ManageableComponent</code>.
+     */
+    public void initialize(String id, ConfigMap properties)
+    {
+        setId(id);
+    }
+
+    /**
+     * Validates and starts the component.
+     *
+     * Subclasses should call <code>super.start()</code>.
+     */
+    public void start()
+    {
+        validate();
+        setStarted(true);
+    }
+
+    /**
+     * Invalidates and stops the component.
+     *
+     * Subclasses should call <code>super.stop()</code>.
+     */
+    public void stop()
+    {
+        invalidate();
+        setStarted(false);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Protocted Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Convenience method that may be used to generate and throw an Exception for an attempt to set the specified property if the
+     * component is started.
+     *
+     * @param propertyName The name of the property being incorrectly assigned; included in the Exception message.
+     */
+    protected void blockAssignmentWhileStarted(String propertyName)
+    {
+        ConfigurationException ce = new ConfigurationException();
+        ce.setMessage(PROPERTY_CHANGE_AFTER_STARTUP, new Object[]{propertyName});
+        throw ce;
+    }
+
+    /**
+     * Convenience method that may be used to generate and throw an Exception for an attempt to assign a null value to a property that
+     * requires non-null values.
+     *
+     * @param propertyName The name of the property being incorrectly assigned.
+     */
+    protected void blockNullAssignment(String propertyName)
+    {
+        ConfigurationException ce = new ConfigurationException();
+        ce.setMessage(NULL_COMPONENT_PROPERTY, new Object[]{propertyName});
+        throw ce;
+    }
+
+    /**
+     * Invoked from within the <code>stop()</code> method to invalidate the component as part of shutdown.
+     * This base implementation sets the valid property to false.
+     * Subclasses should call <code>super.invalidate()</code>.
+     */
+    protected void invalidate()
+    {
+        setValid(false);
+    }
+
+    /**
+     * Hook method invoked from within the <code>start()</code> method to validate that the component is in a
+     * startable state.
+     * This base implementation validates the component by ensuring it has an id and a parent and then sets
+     * the valid property to true.
+     * If the component is not in a valid, startable state an Exception is thrown.
+     * Subclasses should call <code>super.validate()</code>.
+     */
+    protected void validate()
+    {
+        if (getId() == null)
+        {
+            // Id of a component cannot be null.
+            blockNullAssignment("id");
+        }
+        if (getParent() == null)
+        {
+            // Parent of a component cannot be null.
+            blockNullAssignment("parent");
+        }
+        setValid(true);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/ManagementException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/ManagementException.java b/modules/core/src/flex/management/ManagementException.java
old mode 100755
new mode 100644
index 93157ed..5d4e730
--- a/modules/core/src/flex/management/ManagementException.java
+++ b/modules/core/src/flex/management/ManagementException.java
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management;
-
-import flex.messaging.MessageException;
-
-/**
- * This exception type is thrown when errors occur generating 
- * <code>ObjectName</code>s for MBeans, or when registering them or
- * accessing them via the MBean server.
- * 
- * @author shodgson
- */
-public class ManagementException extends MessageException
-{
-    // Inherits all functionality from MessageException.
-    static final long serialVersionUID = 1296149563830613956L;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management;
+
+import flex.messaging.MessageException;
+
+/**
+ * This exception type is thrown when errors occur generating 
+ * <code>ObjectName</code>s for MBeans, or when registering them or
+ * accessing them via the MBean server.
+ * 
+ * @author shodgson
+ */
+public class ManagementException extends MessageException
+{
+    // Inherits all functionality from MessageException.
+    static final long serialVersionUID = 1296149563830613956L;
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/PlatformMBeanServerLocator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/PlatformMBeanServerLocator.java b/modules/core/src/flex/management/PlatformMBeanServerLocator.java
old mode 100755
new mode 100644
index ae7f528..073b7da
--- a/modules/core/src/flex/management/PlatformMBeanServerLocator.java
+++ b/modules/core/src/flex/management/PlatformMBeanServerLocator.java
@@ -1,39 +1,39 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management;
-
-import java.lang.management.ManagementFactory;
-import javax.management.MBeanServer;
-
-import flex.messaging.log.Log;
-import flex.messaging.log.LogCategories;
-
-/**
- * The platform implementation of an MBeanServerLocator for Java 1.5+.
- * This locator exposes the platform MBeanServer.
- *
- * @author shodgson
- */
-public class PlatformMBeanServerLocator implements MBeanServerLocator
-{
-    /** {@inheritDoc} */
-    public synchronized MBeanServer getMBeanServer()
-    {
-        return ManagementFactory.getPlatformMBeanServer();
-    }
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management;
+
+import java.lang.management.ManagementFactory;
+import javax.management.MBeanServer;
+
+import flex.messaging.log.Log;
+import flex.messaging.log.LogCategories;
+
+/**
+ * The platform implementation of an MBeanServerLocator for Java 1.5+.
+ * This locator exposes the platform MBeanServer.
+ *
+ * @author shodgson
+ */
+public class PlatformMBeanServerLocator implements MBeanServerLocator
+{
+    /** {@inheritDoc} */
+    public synchronized MBeanServer getMBeanServer()
+    {
+        return ManagementFactory.getPlatformMBeanServer();
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/Attribute.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/Attribute.java b/modules/core/src/flex/management/jmx/Attribute.java
old mode 100755
new mode 100644
index f4cce01..d2d9df6
--- a/modules/core/src/flex/management/jmx/Attribute.java
+++ b/modules/core/src/flex/management/jmx/Attribute.java
@@ -1,63 +1,63 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management.jmx;
-
-/**
- * Remotable <code>Attribute</code> class that complies with Flash serialization requirements.
- *
- * @author shodgson
- */
-public class Attribute
-{
-    /**
-     * The name of the attribute.
-     */
-    public String name;
-    
-    /**
-     * The value of the attribute.
-     */
-    public Object value;
-    
-    /**
-     * Constructs an empty <code>Attribute</code> instance.
-     *
-     */
-    public Attribute()
-    {}
-    
-    /**
-     * Constructs an <code>Attribute</code> instance based upon a <code>javax.management.Attribute</code> instance.
-     * 
-     * @param attribute The JMX <code>Attribute</code> to base this instance on.
-     */
-    public Attribute(javax.management.Attribute attribute)
-    {
-        name = attribute.getName();
-        value = attribute.getValue();
-    }
-    
-    /**
-     * Utility method to convert this <code>Attribute</code> instance to a <code>javax.management.Attribute</code> instance.
-     * 
-     * @return A JMX <code>Attribute</code> based upon this instance.
-     */
-    public javax.management.Attribute toAttribute()
-    {
-        return new javax.management.Attribute(name, value);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management.jmx;
+
+/**
+ * Remotable <code>Attribute</code> class that complies with Flash serialization requirements.
+ *
+ * @author shodgson
+ */
+public class Attribute
+{
+    /**
+     * The name of the attribute.
+     */
+    public String name;
+    
+    /**
+     * The value of the attribute.
+     */
+    public Object value;
+    
+    /**
+     * Constructs an empty <code>Attribute</code> instance.
+     *
+     */
+    public Attribute()
+    {}
+    
+    /**
+     * Constructs an <code>Attribute</code> instance based upon a <code>javax.management.Attribute</code> instance.
+     * 
+     * @param attribute The JMX <code>Attribute</code> to base this instance on.
+     */
+    public Attribute(javax.management.Attribute attribute)
+    {
+        name = attribute.getName();
+        value = attribute.getValue();
+    }
+    
+    /**
+     * Utility method to convert this <code>Attribute</code> instance to a <code>javax.management.Attribute</code> instance.
+     * 
+     * @return A JMX <code>Attribute</code> based upon this instance.
+     */
+    public javax.management.Attribute toAttribute()
+    {
+        return new javax.management.Attribute(name, value);
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/MBeanAttributeInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/MBeanAttributeInfo.java b/modules/core/src/flex/management/jmx/MBeanAttributeInfo.java
old mode 100755
new mode 100644
index a60937e..a87425d
--- a/modules/core/src/flex/management/jmx/MBeanAttributeInfo.java
+++ b/modules/core/src/flex/management/jmx/MBeanAttributeInfo.java
@@ -1,96 +1,96 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management.jmx;
-
-/**
- * Remotable <code>MBeanAttributeInfo</code> class that complies with Flash serialization requirements. 
- * The <code>isIs</code> property is not named <code>is</code> because <code>is</code> is 
- * an ActionScript keyword.
- *
- * @author shodgson
- */
-public class MBeanAttributeInfo
-{
-    /**
-     * The name of the attribute.
-     */
-    public String name;
-    
-    /**
-     * The class name of the attribute.
-     */
-    public String type;
-    
-    /**
-     * The description of the attribute.
-     */
-    public String description;
-
-    /**
-     * Whether the attribute can be read.
-     */
-    public boolean readable;
-    
-    /**
-     * Whether the attribute can be written.
-     */
-    public boolean writable; 
-    
-    /**
-     * Whether the attribute has an "is" getter.
-     */
-    public boolean isIs;
-    
-    /**
-     * Constructs an empty <code>MBeanAttributeInfo</code> instance.
-     */
-    public MBeanAttributeInfo()
-    {}
-    
-    /**
-     * Constructs a <code>MBeanAttributeInfo</code> instance based upon a
-     * <code>javax.management.MBeanAttributeInfo</code> instance.
-     * 
-     * @param mbeanAttributeInfo The JMX <code>MBeanAttributeInfo</code> instance to base this instance on.
-     */
-    public MBeanAttributeInfo(javax.management.MBeanAttributeInfo mbeanAttributeInfo)
-    {
-        name = mbeanAttributeInfo.getName();
-        type = mbeanAttributeInfo.getType();
-        description = mbeanAttributeInfo.getDescription();
-        readable = mbeanAttributeInfo.isReadable();
-        writable = mbeanAttributeInfo.isWritable();
-        isIs = mbeanAttributeInfo.isIs();
-    }
-    
-    /**
-     * Utility method to convert this <code>MBeanAttributeInfo</code> to a
-     * <code>javax.management.MBeanAttributeInfo</code> instance.
-     * 
-     * @return A JMX <code>MBeanAttributeInfo</code> based upon this instance.
-     */
-    public javax.management.MBeanAttributeInfo toMBeanAttributeInfo()
-    {
-        return new javax.management.MBeanAttributeInfo(name,
-                                                       type,
-                                                       description,
-                                                       readable,
-                                                       writable,
-                                                       isIs);
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management.jmx;
+
+/**
+ * Remotable <code>MBeanAttributeInfo</code> class that complies with Flash serialization requirements. 
+ * The <code>isIs</code> property is not named <code>is</code> because <code>is</code> is 
+ * an ActionScript keyword.
+ *
+ * @author shodgson
+ */
+public class MBeanAttributeInfo
+{
+    /**
+     * The name of the attribute.
+     */
+    public String name;
+    
+    /**
+     * The class name of the attribute.
+     */
+    public String type;
+    
+    /**
+     * The description of the attribute.
+     */
+    public String description;
+
+    /**
+     * Whether the attribute can be read.
+     */
+    public boolean readable;
+    
+    /**
+     * Whether the attribute can be written.
+     */
+    public boolean writable; 
+    
+    /**
+     * Whether the attribute has an "is" getter.
+     */
+    public boolean isIs;
+    
+    /**
+     * Constructs an empty <code>MBeanAttributeInfo</code> instance.
+     */
+    public MBeanAttributeInfo()
+    {}
+    
+    /**
+     * Constructs a <code>MBeanAttributeInfo</code> instance based upon a
+     * <code>javax.management.MBeanAttributeInfo</code> instance.
+     * 
+     * @param mbeanAttributeInfo The JMX <code>MBeanAttributeInfo</code> instance to base this instance on.
+     */
+    public MBeanAttributeInfo(javax.management.MBeanAttributeInfo mbeanAttributeInfo)
+    {
+        name = mbeanAttributeInfo.getName();
+        type = mbeanAttributeInfo.getType();
+        description = mbeanAttributeInfo.getDescription();
+        readable = mbeanAttributeInfo.isReadable();
+        writable = mbeanAttributeInfo.isWritable();
+        isIs = mbeanAttributeInfo.isIs();
+    }
+    
+    /**
+     * Utility method to convert this <code>MBeanAttributeInfo</code> to a
+     * <code>javax.management.MBeanAttributeInfo</code> instance.
+     * 
+     * @return A JMX <code>MBeanAttributeInfo</code> based upon this instance.
+     */
+    public javax.management.MBeanAttributeInfo toMBeanAttributeInfo()
+    {
+        return new javax.management.MBeanAttributeInfo(name,
+                                                       type,
+                                                       description,
+                                                       readable,
+                                                       writable,
+                                                       isIs);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/MBeanConstructorInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/MBeanConstructorInfo.java b/modules/core/src/flex/management/jmx/MBeanConstructorInfo.java
old mode 100755
new mode 100644
index 105a25f..06e33d6
--- a/modules/core/src/flex/management/jmx/MBeanConstructorInfo.java
+++ b/modules/core/src/flex/management/jmx/MBeanConstructorInfo.java
@@ -1,106 +1,106 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management.jmx;
-
-/**
- * Remotable <code>MBeanConstructorInfo</code> class that complies with Flash serialization requirements.
- *
- * @author shodgson
- */
-public class MBeanConstructorInfo
-{
-    /**
-     * The name of the constructor.
-     */
-    public String name;
-    
-    /**
-     * The description of the constructor.
-     */
-    public String description;
-    
-    /**
-     * The constructor's parameter signature.
-     */
-    public MBeanParameterInfo[] signature;
-    
-    /**
-     * Constructs an empty <code>MBeanConstructorInfo</code> instance.
-     *
-     */
-    public MBeanConstructorInfo()
-    {}
-    
-    /**
-     * Constructs a <code>MBeanConstructorInfo</code> instance based upon a
-     * <code>javax.management.MBeanConstructorInfo</code> instance.
-     * 
-     * @param mbeanConstructorInfo The <code>javax.management.MBeanConstructorInfo</code> to base this instance on.
-     */
-    public MBeanConstructorInfo(javax.management.MBeanConstructorInfo mbeanConstructorInfo)
-    {
-        name = mbeanConstructorInfo.getName();
-        description = mbeanConstructorInfo.getDescription();
-        signature = convertSignature(mbeanConstructorInfo.getSignature());
-    }
-    
-    /**
-     * Utility method to convert this <code>MBeanConstructorInfo</code> instance to a
-     * <code>javax.management.MBeanConstructorInfo</code> instance.
-     * 
-     * @return A JMX <code>MBeanConstructorInfo</code> based upon this instance.
-     */
-    public javax.management.MBeanConstructorInfo toMBeanConstructorInfo()
-    {
-        return new javax.management.MBeanConstructorInfo(name,
-                                                         description,
-                                                         convertSignature(signature));
-    }    
-    
-    /**
-     * Utility method to convert the JMX constructor signature to our Flash friendly param type.
-     * 
-     * @param source The JMX constructor signature params.
-     * @return Flash friendly signature params.
-     */
-    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source)
-    {
-        MBeanParameterInfo[] signature = new MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            signature[i] = new MBeanParameterInfo(source[i]);
-        }
-        return signature;
-    }
-    
-    /**
-     * Utility method to convert a Flash friendly construtor param signature to the JMX params.
-     * 
-     * @param source The Flash friendly signature params.
-     * @return The JMX constructor signature params.
-     */
-    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source)
-    {
-        javax.management.MBeanParameterInfo[] signature = new javax.management.MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            signature[i] = source[i].toMBeanParameterInfo();
-        }
-        return signature;
-    }   
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management.jmx;
+
+/**
+ * Remotable <code>MBeanConstructorInfo</code> class that complies with Flash serialization requirements.
+ *
+ * @author shodgson
+ */
+public class MBeanConstructorInfo
+{
+    /**
+     * The name of the constructor.
+     */
+    public String name;
+    
+    /**
+     * The description of the constructor.
+     */
+    public String description;
+    
+    /**
+     * The constructor's parameter signature.
+     */
+    public MBeanParameterInfo[] signature;
+    
+    /**
+     * Constructs an empty <code>MBeanConstructorInfo</code> instance.
+     *
+     */
+    public MBeanConstructorInfo()
+    {}
+    
+    /**
+     * Constructs a <code>MBeanConstructorInfo</code> instance based upon a
+     * <code>javax.management.MBeanConstructorInfo</code> instance.
+     * 
+     * @param mbeanConstructorInfo The <code>javax.management.MBeanConstructorInfo</code> to base this instance on.
+     */
+    public MBeanConstructorInfo(javax.management.MBeanConstructorInfo mbeanConstructorInfo)
+    {
+        name = mbeanConstructorInfo.getName();
+        description = mbeanConstructorInfo.getDescription();
+        signature = convertSignature(mbeanConstructorInfo.getSignature());
+    }
+    
+    /**
+     * Utility method to convert this <code>MBeanConstructorInfo</code> instance to a
+     * <code>javax.management.MBeanConstructorInfo</code> instance.
+     * 
+     * @return A JMX <code>MBeanConstructorInfo</code> based upon this instance.
+     */
+    public javax.management.MBeanConstructorInfo toMBeanConstructorInfo()
+    {
+        return new javax.management.MBeanConstructorInfo(name,
+                                                         description,
+                                                         convertSignature(signature));
+    }    
+    
+    /**
+     * Utility method to convert the JMX constructor signature to our Flash friendly param type.
+     * 
+     * @param source The JMX constructor signature params.
+     * @return Flash friendly signature params.
+     */
+    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source)
+    {
+        MBeanParameterInfo[] signature = new MBeanParameterInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            signature[i] = new MBeanParameterInfo(source[i]);
+        }
+        return signature;
+    }
+    
+    /**
+     * Utility method to convert a Flash friendly construtor param signature to the JMX params.
+     * 
+     * @param source The Flash friendly signature params.
+     * @return The JMX constructor signature params.
+     */
+    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source)
+    {
+        javax.management.MBeanParameterInfo[] signature = new javax.management.MBeanParameterInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            signature[i] = source[i].toMBeanParameterInfo();
+        }
+        return signature;
+    }   
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/MBeanInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/MBeanInfo.java b/modules/core/src/flex/management/jmx/MBeanInfo.java
old mode 100755
new mode 100644
index bc3eb44..8c7befd
--- a/modules/core/src/flex/management/jmx/MBeanInfo.java
+++ b/modules/core/src/flex/management/jmx/MBeanInfo.java
@@ -1,186 +1,186 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package flex.management.jmx;
-
-/**
- * Remotable MBeanInfo class that complies with Flash serialization requirements. 
- * MBean Notifications are not currently supported.
- *
- * @author shodgson
- */
-public class MBeanInfo
-{
-    /**
-     * The Java class name for the MBean object.
-     */
-    public String className;
-    
-    /**
-     * The description of the MBean.
-     */
-    public String description;
-    
-    /**
-     * The attributes exposed for management.
-     */
-    public MBeanAttributeInfo[] attributes;
-    
-    /**
-     * The public constructors for the MBean.
-     */
-    public MBeanConstructorInfo[] constructors;
-    
-    /**
-     * The operations exposed by the MBean.
-     */
-    public MBeanOperationInfo[] operations;
-        
-    /**
-     * Constructs an empty <code>MBeanInfo</code> instance.
-     */
-    public MBeanInfo()
-    {}
-    
-    /**
-     * Constructs a <code>MBeanInfo</code> instance based upon a
-     * <code>javax.management.MBeanInfo</code> instance.
-     * 
-     * @param mbeanInfo The JMX <code>MBeanInfo</code> instance to base this instance on.
-     */
-    public MBeanInfo(javax.management.MBeanInfo mbeanInfo)
-    {
-        className = mbeanInfo.getClassName();
-        description = mbeanInfo.getDescription();
-        attributes = convertAttributes(mbeanInfo.getAttributes());
-        constructors = convertConstructors(mbeanInfo.getConstructors());
-        operations = convertOperations(mbeanInfo.getOperations());
-    }
-    
-    /**
-     * Utility method to convert this <code>MBeanInfo</code> to a
-     * <code>javax.management.MBeanInfo</code> instance.
-     * 
-     * @return A JMX <code>MBeanInfo</code> based upon this instance.
-     */
-    public javax.management.MBeanInfo toMBeanInfo()
-    {
-        return new javax.management.MBeanInfo(className,
-                                              description,
-                                              convertAttributes(attributes),
-                                              convertConstructors(constructors),
-                                              convertOperations(operations),
-                                              null);
-    }      
-    
-    /**
-     * Utility method to convert JMX attribute info instances to Flash friendly instances.
-     * 
-     * @param source JMX attribute info instances.
-     * @return Flash friendly attribute info instances.
-     */
-    private MBeanAttributeInfo[] convertAttributes(javax.management.MBeanAttributeInfo[] source)
-    {
-        MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            attributes[i] = new MBeanAttributeInfo(source[i]);
-        }
-        return attributes;
-    }    
-    
-    /**
-     * Utility method to convert Flash friendly attribute info instances to JMX attribute info instances.
-     * 
-     * @param source Flash friendly attribute info instances.
-     * @return JMX attribute info instances.
-     */
-    private javax.management.MBeanAttributeInfo[] convertAttributes(MBeanAttributeInfo[] source)
-    {
-        javax.management.MBeanAttributeInfo[] attributes = new javax.management.MBeanAttributeInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            attributes[i] = source[i].toMBeanAttributeInfo();
-        }
-        return attributes;
-    }
-    
-    /**
-     * Utility method to convert JMX constructor info instances to Flash friendly constructor info
-     * instances.
-     * 
-     * @param source JMX constructor info instances.
-     * @return Flash friendly constructor info instances.
-     */
-    private MBeanConstructorInfo[] convertConstructors(javax.management.MBeanConstructorInfo[] source)
-    {
-        MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            constructors[i] = new MBeanConstructorInfo(source[i]);            
-        }
-        return constructors;
-    }
-    
-    /**
-     * Utility method to convert Flash friendly constructor info instances to JMX constructor info instances.
-     * 
-     * @param source Flash friendly constructor info instances.
-     * @return JMX constructor info instances.
-     */
-    private javax.management.MBeanConstructorInfo[] convertConstructors(MBeanConstructorInfo[] source)
-    {
-        javax.management.MBeanConstructorInfo[] constructors = new javax.management.MBeanConstructorInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            constructors[i] = source[i].toMBeanConstructorInfo();
-        }
-        return constructors;
-    }
-    
-    /**
-     * Utility method to convert JMX operation info instances to Flash friendly operation info instances.
-     * 
-     * @param source JMX opereration info instances.
-     * @return Flash friendly operation info instances.
-     */
-    private MBeanOperationInfo[] convertOperations(javax.management.MBeanOperationInfo[] source)
-    {
-        MBeanOperationInfo[] operations = new MBeanOperationInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            operations[i] = new MBeanOperationInfo(source[i]);
-        }
-        return operations;
-    }
-    
-    /**
-     * Utility method to convert Flash friendly operation info instances to JMX operation info instances.
-     * 
-     * @param source Flash friendly operation info instances. 
-     * @return JMX operation info instances.
-     */
-    private javax.management.MBeanOperationInfo[] convertOperations(MBeanOperationInfo[] source)
-    {
-        javax.management.MBeanOperationInfo[] operations = new javax.management.MBeanOperationInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            operations[i] = source[i].toMBeanOperationInfo();
-        }
-        return operations;
-    }
-    
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package flex.management.jmx;
+
+/**
+ * Remotable MBeanInfo class that complies with Flash serialization requirements. 
+ * MBean Notifications are not currently supported.
+ *
+ * @author shodgson
+ */
+public class MBeanInfo
+{
+    /**
+     * The Java class name for the MBean object.
+     */
+    public String className;
+    
+    /**
+     * The description of the MBean.
+     */
+    public String description;
+    
+    /**
+     * The attributes exposed for management.
+     */
+    public MBeanAttributeInfo[] attributes;
+    
+    /**
+     * The public constructors for the MBean.
+     */
+    public MBeanConstructorInfo[] constructors;
+    
+    /**
+     * The operations exposed by the MBean.
+     */
+    public MBeanOperationInfo[] operations;
+        
+    /**
+     * Constructs an empty <code>MBeanInfo</code> instance.
+     */
+    public MBeanInfo()
+    {}
+    
+    /**
+     * Constructs a <code>MBeanInfo</code> instance based upon a
+     * <code>javax.management.MBeanInfo</code> instance.
+     * 
+     * @param mbeanInfo The JMX <code>MBeanInfo</code> instance to base this instance on.
+     */
+    public MBeanInfo(javax.management.MBeanInfo mbeanInfo)
+    {
+        className = mbeanInfo.getClassName();
+        description = mbeanInfo.getDescription();
+        attributes = convertAttributes(mbeanInfo.getAttributes());
+        constructors = convertConstructors(mbeanInfo.getConstructors());
+        operations = convertOperations(mbeanInfo.getOperations());
+    }
+    
+    /**
+     * Utility method to convert this <code>MBeanInfo</code> to a
+     * <code>javax.management.MBeanInfo</code> instance.
+     * 
+     * @return A JMX <code>MBeanInfo</code> based upon this instance.
+     */
+    public javax.management.MBeanInfo toMBeanInfo()
+    {
+        return new javax.management.MBeanInfo(className,
+                                              description,
+                                              convertAttributes(attributes),
+                                              convertConstructors(constructors),
+                                              convertOperations(operations),
+                                              null);
+    }      
+    
+    /**
+     * Utility method to convert JMX attribute info instances to Flash friendly instances.
+     * 
+     * @param source JMX attribute info instances.
+     * @return Flash friendly attribute info instances.
+     */
+    private MBeanAttributeInfo[] convertAttributes(javax.management.MBeanAttributeInfo[] source)
+    {
+        MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            attributes[i] = new MBeanAttributeInfo(source[i]);
+        }
+        return attributes;
+    }    
+    
+    /**
+     * Utility method to convert Flash friendly attribute info instances to JMX attribute info instances.
+     * 
+     * @param source Flash friendly attribute info instances.
+     * @return JMX attribute info instances.
+     */
+    private javax.management.MBeanAttributeInfo[] convertAttributes(MBeanAttributeInfo[] source)
+    {
+        javax.management.MBeanAttributeInfo[] attributes = new javax.management.MBeanAttributeInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            attributes[i] = source[i].toMBeanAttributeInfo();
+        }
+        return attributes;
+    }
+    
+    /**
+     * Utility method to convert JMX constructor info instances to Flash friendly constructor info
+     * instances.
+     * 
+     * @param source JMX constructor info instances.
+     * @return Flash friendly constructor info instances.
+     */
+    private MBeanConstructorInfo[] convertConstructors(javax.management.MBeanConstructorInfo[] source)
+    {
+        MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            constructors[i] = new MBeanConstructorInfo(source[i]);            
+        }
+        return constructors;
+    }
+    
+    /**
+     * Utility method to convert Flash friendly constructor info instances to JMX constructor info instances.
+     * 
+     * @param source Flash friendly constructor info instances.
+     * @return JMX constructor info instances.
+     */
+    private javax.management.MBeanConstructorInfo[] convertConstructors(MBeanConstructorInfo[] source)
+    {
+        javax.management.MBeanConstructorInfo[] constructors = new javax.management.MBeanConstructorInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            constructors[i] = source[i].toMBeanConstructorInfo();
+        }
+        return constructors;
+    }
+    
+    /**
+     * Utility method to convert JMX operation info instances to Flash friendly operation info instances.
+     * 
+     * @param source JMX opereration info instances.
+     * @return Flash friendly operation info instances.
+     */
+    private MBeanOperationInfo[] convertOperations(javax.management.MBeanOperationInfo[] source)
+    {
+        MBeanOperationInfo[] operations = new MBeanOperationInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            operations[i] = new MBeanOperationInfo(source[i]);
+        }
+        return operations;
+    }
+    
+    /**
+     * Utility method to convert Flash friendly operation info instances to JMX operation info instances.
+     * 
+     * @param source Flash friendly operation info instances. 
+     * @return JMX operation info instances.
+     */
+    private javax.management.MBeanOperationInfo[] convertOperations(MBeanOperationInfo[] source)
+    {
+        javax.management.MBeanOperationInfo[] operations = new javax.management.MBeanOperationInfo[source.length];
+        for (int i = 0; i < source.length; i++)
+        {
+            operations[i] = source[i].toMBeanOperationInfo();
+        }
+        return operations;
+    }
+    
+}