[jboss-cvs] JBossAS SVN: r90279 - in branches/dml-log-service-integration: build and 19 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 16 23:46:51 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-06-16 23:46:51 -0400 (Tue, 16 Jun 2009)
New Revision: 90279

Added:
   branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/ChannelInfo.java
   branches/dml-log-service-integration/jbossas-transactions/
   branches/dml-log-service-integration/jbossas-transactions/README.txt
   branches/dml-log-service-integration/jbossas-transactions/build.xml
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedComponentDelegate.java
Removed:
   branches/dml-log-service-integration/jbossas-jts/
   branches/dml-log-service-integration/jbossas-transactions/README.txt
   branches/dml-log-service-integration/jbossas-transactions/build.xml
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/TempManagedComponentImpl.java
   branches/dml-log-service-integration/system/src/main/org/jboss/system/server/profileservice/persistence/MOCreatorPlugin.java
Modified:
   branches/dml-log-service-integration/build/build.xml
   branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
   branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactoryMBean.java
   branches/dml-log-service-integration/component-matrix/pom.xml
   branches/dml-log-service-integration/profileservice/.classpath
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/DelegatingComponentDispatcherImpl.java
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationDelegate.java
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedPropertyDelegate.java
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
   branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
   branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/JndiLoginInitialContextFactory.java
   branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/SecurityAssociationActions.java
   branches/dml-log-service-integration/server/src/etc/conf/all/jboss-log4j.xml
   branches/dml-log-service-integration/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
   branches/dml-log-service-integration/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
   branches/dml-log-service-integration/testsuite/.classpath
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JChannelFactoryUnitTestCase.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/persistenceformat/test/ServiceBindingMgrPersistenceFormatTestCase.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
   branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
   branches/dml-log-service-integration/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-jboss-beans.xml
   branches/dml-log-service-integration/testsuite/src/resources/cluster/partition/partition-restart-jboss-beans.xml
   branches/dml-log-service-integration/thirdparty/pom.xml
Log:
Merge from trunk: -r90015:90277

Modified: branches/dml-log-service-integration/build/build.xml
===================================================================
--- branches/dml-log-service-integration/build/build.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/build/build.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -440,6 +440,8 @@
       <include name="jboss-deployers-core-spi.jar"/>
       <include name="jboss-deployers-client.jar"/>
       <include name="jboss-deployers-client-spi.jar"/>
+      <include name="jbossjts.jar"/>
+      <include name="jbossjts-integration.jar"/>
       <!-- client excludes -->
       <exclude name="jbossws-native-client.jar"/>
       <exclude name="${jbossall.client.filename}"/>
@@ -1972,8 +1974,9 @@
       <fileset refid="org.jboss.javaee:jboss-jaspi-api:jar"/>
       <fileset refid="org.jboss.javaee:jboss-javaee:jar"/>
       <fileset refid="org.jboss.naming:jnpserver:jar"/>
-      <fileset refid="jboss.jbossts:jbossjta:jar"/>
-      <fileset refid="jboss.jbossts:jbossjta-integration:jar"/>
+      <fileset refid="jboss.jbossts:jbossjts:jar"/>
+      <fileset refid="jboss.jbossts:jbossjts-integration:jar"/>
+      <fileset refid="jboss.jbossts:jbossjts-jacorb:jar"/>
       <fileset refid="jboss.jbossts:jbossts-common:jar"/>
       <fileset refid="org.jboss.remoting:jboss-remoting:jar"/>
       <fileset refid="jboss:jboss-serialization:jar"/>
@@ -2206,8 +2209,16 @@
       </patternset>
     </unzip>
 
-    <copy todir="${install.all.conf}" filtering="no" file="${project.thirdparty}/jboss/jbossts/resources/jbossjta-properties.xml"/>
+    <copy tofile="${install.all.conf}/jbossts-properties.xml" filtering="no" file="${project.thirdparty}/jboss/jbossts/resources/jbossts-properties.xml-forJTA"/>
 
+    <!-- in in JTS mode the client needs some impl classes to make ClientUserTransaction work -->
+    <copy todir="${install.client}" filtering="no">
+      <fileset dir="${project.thirdparty}/jboss/jbossts/lib/">
+        <include name="jbossjts.jar"/>
+        <include name="jbossjts-integration.jar"/>
+      </fileset>
+    </copy>
+
     <unzip src="${jacorb:resources:jar}" dest="${install.all.conf}">
       <patternset>
         <include name="resources/jacorb.properties"/>
@@ -2215,24 +2226,18 @@
       <mapper type="flatten"/>
     </unzip>
 
-    <mkdir dir="${install.examples}/jts"/>
-    <copy todir="${install.examples}/jts" filtering="no">
-      <fileset refid="jboss.jbossts:jbossjts:jar"/>
-      <fileset refid="jboss.jbossts:jbossjts-integration:jar"/>
-      <fileset refid="jboss.jbossts:jbossjts-jacorb:jar"/>
+    <mkdir dir="${install.examples}/transactions"/>
+    <copy todir="${install.examples}/transactions" filtering="no">
       <fileset refid="jboss.jbossts:jbossts-tools:sar"/>
       <mapper refid="remove-versions" />
     </copy>
 
-    <unzip src="${jboss.jbossts:resources:jar}" dest="${install.examples}/jts">
-      <patternset>
-        <include name="resources/jbossjts-properties.xml"/>
-      </patternset>
-      <mapper type="flatten"/>
-    </unzip>
-    <!-- copy JBossTS JTS install script and instructions from jbossas-jts module -->
-    <copy todir="${install.examples}/jts" filtering="no">
-      <fileset dir="${project.root}/jbossas-jts">
+    <copy todir="${install.examples}/transactions" filtering="no" file="${project.thirdparty}/jboss/jbossts/lib/jbossxts.sar"/>
+    <copy tofile="${install.examples}/transactions/jbossts-properties.xml" filtering="no" file="${project.thirdparty}/jboss/jbossts/resources/jbossts-properties.xml-forJTS"/>
+
+    <!-- copy JBossTS additions install script and instructions from jbossas-transactions module -->
+    <copy todir="${install.examples}/transactions" filtering="no">
+      <fileset dir="${project.root}/jbossas-transactions">
         <include name="README.txt"/>
         <include name="build.xml"/>
       </fileset>

Copied: branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/ChannelInfo.java (from rev 90277, trunk/cluster/src/main/org/jboss/ha/framework/server/ChannelInfo.java)
===================================================================
--- branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/ChannelInfo.java	                        (rev 0)
+++ branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/ChannelInfo.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.ha.framework.server;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jgroups.Address;
+import org.jgroups.Channel;
+import org.jgroups.View;
+import org.jgroups.conf.ProtocolData;
+
+/**
+ * Information describing an open JGroups Channel.
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision: $
+ */
+public class ChannelInfo
+{
+   private final String id;
+   private final String stackName;
+   private final Channel channel;
+   private final ProtocolData[] protocolStackConfiguration;
+   private final ObjectName channelObjectName;
+   private final List<ObjectName> protocolObjectNames;
+   
+   public ChannelInfo(String id, String stackName, Channel channel, 
+         ProtocolData[] config, ObjectName channelObjectName, 
+         List<ObjectName> protocolObjectNames)
+   {
+      if (channel == null)
+      {
+         throw new IllegalArgumentException("null channel");
+      }
+      
+      this.id = id;
+      this.stackName = stackName;
+      this.channel = channel;
+      this.protocolStackConfiguration = config;
+      this.channelObjectName = channelObjectName;
+      this.protocolObjectNames = protocolObjectNames;
+   }
+   
+   public String getId()
+   {
+      return id;
+   }
+   
+   public String getStackName()
+   {
+      return stackName;
+   }
+   
+   public Channel getChannel()
+   {
+      return channel;
+   }
+   
+   public ProtocolData[] getProtocolStackConfiguration()
+   {
+      return protocolStackConfiguration;
+   }
+   
+   public ObjectName getChannelObjectName()
+   {
+      return channelObjectName;
+   }
+   
+   public List<ObjectName> getProtocolObjectNames()
+   {
+      return protocolObjectNames;
+   } 
+   
+   public Address getLocalAddress()
+   {
+      return this.channel.getLocalAddress();
+   }
+   
+   public View getCurrentView()
+   {
+      return this.channel.getView();
+   }
+}

Modified: branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
===================================================================
--- branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -21,27 +21,32 @@
  */
 package org.jboss.ha.framework.server;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetAddress;
+import java.net.URL;
 import java.rmi.dgc.VMID;
 import java.rmi.server.UID;
 import java.security.AccessController;
+import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
 
 import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.jboss.bootstrap.spi.util.ServerConfigUtil;
 import org.jboss.logging.Logger;
-import org.jboss.managed.api.ManagedOperation.Impact;
 import org.jboss.managed.api.annotation.ManagementComponent;
 import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementOperation;
 import org.jboss.managed.api.annotation.ManagementProperties;
 import org.jboss.managed.api.annotation.ManagementProperty;
 import org.jboss.managed.api.annotation.ViewUse;
@@ -49,14 +54,16 @@
 import org.jboss.util.loading.ContextClassLoaderSwitcher;
 import org.jgroups.Channel;
 import org.jgroups.ChannelException;
+import org.jgroups.ChannelFactory;
 import org.jgroups.ChannelListenerAdapter;
 import org.jgroups.Event;
 import org.jgroups.Global;
 import org.jgroups.JChannel;
 import org.jgroups.conf.ConfiguratorFactory;
 import org.jgroups.conf.ProtocolData;
+import org.jgroups.conf.ProtocolParameter;
 import org.jgroups.conf.ProtocolStackConfigurator;
-import org.jgroups.conf.ProtocolParameter;
+import org.jgroups.conf.XmlConfigurator;
 import org.jgroups.jmx.JmxConfigurator;
 import org.jgroups.protocols.TP;
 import org.jgroups.stack.IpAddress;
@@ -68,10 +75,15 @@
 import org.jgroups.util.ThreadFactory;
 import org.jgroups.util.ThreadManager;
 import org.jgroups.util.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 /**
- * Extension to the JGroups JChannelFactory that supports a number of 
- * JBoss AS-specific behaviors:
+ * Implementation of the JGroups <code>ChannelFactory</code> that supports a 
+ * number of JBoss AS-specific behaviors:
  * <p>
  * <ul>
  * <li>Passing a config event to newly created channels containing 
@@ -84,6 +96,7 @@
  * <li>Configures the channel's thread pools and thread factories to ensure
  * that application thread context classloaders don't leak to the channel
  * threads.</li>
+ * <li>Exposes a ProfileService ManagementView interface.</li>
  * </ul>
  * </p>
  * 
@@ -92,13 +105,19 @@
  * 
  * @version $Revision$
  */
- at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="JChannelFactory"),
-      properties=ManagementProperties.CLASS_AND_EXPLICIT)
-public class JChannelFactory extends org.jgroups.JChannelFactory
-      implements JChannelFactoryMBean, MBeanRegistration
+ at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="ChannelFactory"),
+      name="JChannelFactory", properties=ManagementProperties.CLASS_AND_EXPLICIT,
+      isRuntime=true)
+public class JChannelFactory
+      implements ChannelFactory, JChannelFactoryMBean, MBeanRegistration
 {
    private static final Logger log = Logger.getLogger(JChannelFactory.class);
    
+   /** 
+    * Prefix prepended to the protocol stack name to create a synthetic
+    * transport protocol <code>singleton_name</code> value for channels
+    * that don't configure a <code>singleton_name</code>. 
+    */
    public static final String UNSHARED_TRANSPORT_NAME_BASE = "unnamed_";
    
    private static final int CREATED = ServiceMBean.CREATED;
@@ -109,6 +128,11 @@
    private static final int DESTROYED = ServiceMBean.DESTROYED;
    private static final int FAILED = ServiceMBean.FAILED;
    
+   private static final String PROTOCOL_STACKS="protocol_stacks";
+   private static final String STACK="stack";
+   private static final String NAME="name";
+   private static final String CONFIG="config";
+   
    private InetAddress nodeAddress;
    private String nodeName;
    private int namingServicePort = -1;
@@ -117,10 +141,186 @@
    private boolean manageNewThreadClassLoader = true;
    private boolean manageReleasedThreadClassLoader = false;
    private boolean addMissingSingletonName = true;
-   private boolean domainSet;
    private final ContextClassLoaderSwitcher classLoaderSwitcher;
-   private final Set<String> registeredChannels = new HashSet<String>();
+   private final Map<Channel, ChannelInfo> registeredChannels = 
+      new ConcurrentHashMap<Channel, ChannelInfo>(16, 0.75f, 2);
+   
+   private ChannelCloseListener closeListener = new ChannelCloseListener();
 
+   /**
+    * Map<String,ProtocolStackConfigurator>. Hashmap which maps stack names to JGroups
+    * configurations. Keys are stack names, values are plain JGroups stack
+    * configs. This is (re-)populated whenever a setMultiplexerConfig() method
+    * is called
+    */
+   private final Map<String,ProtocolStackConfigurator> stacks = 
+      new ConcurrentHashMap<String, ProtocolStackConfigurator>(16, 0.75f, 2);
+
+   /**
+    * The MBeanServer to expose JMX management data with (no management data
+    * will be available if null)
+    */
+   private MBeanServer server = null;
+
+   /** To expose the channels and protocols */
+   private String domain = "jgroups";
+   private boolean domainSet = false;
+
+   /** Whether or not to expose channels via JMX */
+   private boolean expose_channels=true;
+
+   /** Whether to expose the factory only, or all protocols as well */
+   private boolean expose_protocols=true;
+
+   /**
+    * Parses the contents of <code>input</code> into a map of the
+    * protocol stack configurations contained in the XML.
+    * 
+    * @param input stream which must contain XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    *              
+    * @return a map of the protocol stack configurations contained in the XML
+    * 
+    * @throws IllegalArgumentException if <code>input</code> is <code>null</code>
+    * @throws Exception
+    */
+   public static Map<String, ProtocolStackConfigurator> parse(InputStream input) throws Exception 
+   {
+      if (input == null)
+      {
+         throw new IllegalArgumentException("null input");
+      }
+      
+      DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
+      factory.setValidating(false); //for now
+      DocumentBuilder builder=factory.newDocumentBuilder();
+      Document document=builder.parse(input);
+
+      // The root element of the document should be the "config" element,
+      // but the parser(Element) method checks this so a check is not
+      // needed here.
+      Element configElement = document.getDocumentElement();
+      return parse(configElement);
+   }
+   
+   /**
+    * Parses the contents of <code>root</code> into a map of the
+    * protocol stack configurations contained in the XML.
+    * 
+    * @param root document root node for XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    *              
+    * @return a map of the protocol stack configurations contained in the XML
+    * 
+    * @throws IllegalArgumentException if <code>input</code> is <code>null</code>
+    * @throws Exception
+    */
+   public static Map<String, ProtocolStackConfigurator> parse(Element root) throws Exception 
+   {
+      if (root == null)
+      {
+         throw new IllegalArgumentException("null root");
+      }
+      
+      String root_name = root.getNodeName();
+      if (!PROTOCOL_STACKS.equals(root_name.trim().toLowerCase()))
+      {
+         throw new IOException("Invalid XML configuration: configuration does not start with a '" + 
+                        PROTOCOL_STACKS + "' element");
+      }
+
+      Map<String, ProtocolStackConfigurator> result = new HashMap<String, ProtocolStackConfigurator>();
+
+      NodeList tmp_stacks = root.getChildNodes();
+      for (int i = 0; i < tmp_stacks.getLength(); i++)
+      {
+         Node node = tmp_stacks.item(i);
+         if (node.getNodeType() != Node.ELEMENT_NODE)
+            continue;
+
+         Element stack = (Element) node;
+         String tmp = stack.getNodeName();
+         if (!STACK.equals(tmp.trim().toLowerCase()))
+         {
+            throw new IOException("Invalid configuration: didn't find a \"" + STACK + "\" element under \""
+                  + PROTOCOL_STACKS + "\"");
+         }
+
+         NamedNodeMap attrs = stack.getAttributes();
+         Node name = attrs.getNamedItem(NAME);
+         // Node descr=attrs.getNamedItem(DESCR);
+         String st_name = name.getNodeValue();
+         // String stack_descr=descr.getNodeValue();
+         // System.out.print("Parsing \"" + st_name + "\" (" + stack_descr + ")");
+         NodeList configs = stack.getChildNodes();
+         for (int j = 0; j < configs.getLength(); j++)
+         {
+            Node tmp_config = configs.item(j);
+            if (tmp_config.getNodeType() != Node.ELEMENT_NODE)
+               continue;
+            Element cfg = (Element) tmp_config;
+            tmp = cfg.getNodeName();
+            if (!CONFIG.equals(tmp))
+            {
+               throw new IOException("Invalid configuration: didn't find a \"" + 
+                     CONFIG + "\" element under \"" + STACK + "\"");
+            }
+
+            XmlConfigurator conf = XmlConfigurator.getInstance(cfg);
+            // fixes http://jira.jboss.com/jira/browse/JGRP-290
+            ConfiguratorFactory.substituteVariables(conf); // replace vars with system props
+
+            result.put(st_name, conf);
+         }
+      }
+
+      return result;
+   }
+   
+   public static ProtocolData[] getProtocolData(ProtocolStackConfigurator config)
+   {
+      ProtocolData[] result = null;
+      try
+      {
+         result = config.getProtocolStack();
+      }
+      catch (UnsupportedOperationException e)
+      {
+         String s = config.getProtocolStackString();
+         String[] prots = s.split(":");
+         result = new ProtocolData[prots.length];
+         for (int i = 0; i < prots.length; i++)
+         {
+            ProtocolParameter[] params = null;
+            int paren = prots[i].indexOf('(');
+            String name = paren > - 1 ? prots[i].substring(0, paren) : prots[1];
+            if (paren > -1 && paren < prots[1].length() - 2)
+            {
+               String unsplit = prots[i].substring(paren + 1, prots[i].length() -1);
+               String[] split = unsplit.split(";");
+                params = new ProtocolParameter[split.length];
+               for (int j = 0; j < split.length; j++)
+               {
+                  String[] keyVal = split[j].split("=");
+                  params[j] = new ProtocolParameter(keyVal[0], keyVal[1]);
+               }
+            }
+            else
+            {
+               params = new ProtocolParameter[0];
+            }
+            
+            result[i] = new ProtocolData(name, null, name, params);
+         }
+      }
+      
+      return result == null ? new ProtocolData[0] : result;
+   }
+
+   /**
+    * Creates a new JChannelFactory.
+    */
+   @SuppressWarnings("unchecked")
    public JChannelFactory()
    {
       this.classLoaderSwitcher = (ContextClassLoaderSwitcher) AccessController.doPrivileged(ContextClassLoaderSwitcher.INSTANTIATOR);
@@ -129,73 +329,80 @@
    /**
     * Always throws <code>ChannelException</code>; this method is not supported.
     */   
-   @Override
    public Channel createChannel() throws ChannelException
    {
       throw new ChannelException("No-arg createChannel() is not supported");
    }
 
-   @Override
+   /**
+    * Creates a channel by passing <code>properties</code> to the 
+    * <code>org.jgroups.JChannel</code> constructor.
+    * 
+    * @param properties protocol stack configuration object; can be <code>null</code>
+    *                   in which case a default stack will be used
+    * 
+    * @return the channel
+    */
    public Channel createChannel(Object properties) throws ChannelException
    {
       checkStarted();
-      
-      @SuppressWarnings("deprecation")      
-      Channel channel = super.createChannel(properties);
-      
-      if (manageNewThreadClassLoader || manageReleasedThreadClassLoader)
+
+      if (properties == null)
+         properties = JChannel.DEFAULT_PROTOCOL_STACK;
+
+      ProtocolStackConfigurator config = null;
+
+      try
       {
-         fixChannelThreadManagement(channel);
+         @SuppressWarnings("deprecation")
+         ProtocolStackConfigurator c = ConfiguratorFactory.getStackConfigurator(properties);
+         config = c;
       }
-      
-      if (assignLogicalAddresses)
+      catch (Exception x)
       {
-         setChannelUniqueId(channel);
+         throw new ChannelException("unable to load protocol stack", x);
       }
-      
-      // can't register in JMX as we don't have a channel name
-      
+
+      JChannel channel = initializeChannel(config, null, false);
+
+      try
+      {
+         registerChannel(channel, null, null, getProtocolData(config));
+      }
+      catch (ChannelException ce)
+      {
+         throw ce;
+      }
+      catch (Exception e)
+      {
+         throw new ChannelException("unable to register channel", e);
+      }
+
       return channel;
    }
 
    /**
     * Create a {@link Channel} using the specified stack. Channel will use a 
-    * shared transport if the <code>singleton-name</code> attribute is
-    * set on the stack's transport protocol.
+    * shared transport.
     * 
-    * @param stack_name the name of the stack
-    * @return the channel
+    * @param stack_name 
+    *            The name of the stack to be used. All stacks are defined in
+    *            the configuration with which the factory is configured (see
+    *            {@link #setMultiplexerConfig(Object)} for example. If
+    *            clients attempt to create a Channel for an undefined stack 
+    *            name an exception will be thrown.
     * 
+    * @return an implementation of Channel configured with a shared transport.
+    * 
+    * @throws IllegalArgumentException if <code>stack_name</code> is 
+    * <code>null</code> or {@link #getConfig(String)} returns <code>null</code>
+    * when <code>stack_name</code> is used.
+    * 
     * @throws Exception
     */
-   @Override
    public Channel createChannel(String stack_name) throws Exception
    {
-      checkStarted();
-      
-      String props=stack_name != null? getConfig(stack_name) : null;
-      if (props == null)
-      {
-         log.warn("No protocol stack found with name " + stack_name +
-                  "; creating default channel");
-         return createChannel();
-      }
-      
-      JChannel channel = new JChannel(props);
-      
-      if (manageNewThreadClassLoader || manageReleasedThreadClassLoader)
-      {
-         fixChannelThreadManagement(channel);
-      }
-      
-      if (assignLogicalAddresses)
-      {
-         setChannelUniqueId(channel);
-      }
-      
-      // can't register in JMX as we don't have a channel name
-      
-      return channel;
+      return createChannelFromRegisteredStack(stack_name, null, false);
    }
    
    /**
@@ -225,12 +432,12 @@
     *            {@link #setMultiplexerConfig(Object)} for example. If
     *            clients attempt to create a Channel for an undefined stack 
     *            name an Exception will be thrown.
-    * @param id  Only used if the transport protocol configuration for the
-    *            specified stack does not include the <code>singleton_name</code>
-    *            attribute; then it is used to create a synthetic singleton-name
-    *            for the channel's protocol stack.
+    * @param id  Only used if {@link #isExposeChannels()} returns <code>true</code>,
+    *            in which case, if not <code>null</code>, is used as part of
+    *            the <code>ObjectName</code> for the JMX mbeans that represent
+    *            the channel and its protocols. Can be <code>null</code>.
     *            
-    * @return An implementation of Channel configured with a shared transport.
+    * @return an implementation of Channel configured with a shared transport.
     *         
     * @throws IllegalStateException if the specified protocol stack does not
     *                               declare a <code>singleton_name</code> and
@@ -238,60 +445,10 @@
     *                               <code>false</code>.
     * @throws ChannelException
     */
-   @Override
    public Channel createMultiplexerChannel(String stack_name, String id) throws Exception
    {
-      checkStarted();
-      
-      String configStr = getConfig(stack_name);
-      
-      if (configStr == null)
-         throw new IllegalStateException("Unknown stack_name " + stack_name);
-      
-      ProtocolStackConfigurator config = ConfiguratorFactory.getStackConfigurator(configStr);
-      Map<String, String> tpProps = getTransportProperties(config);
-      
-      if (!tpProps.containsKey(Global.SINGLETON_NAME))
-      {
-         if (addMissingSingletonName)
-         {
-            String singletonName = UNSHARED_TRANSPORT_NAME_BASE + stack_name;
-            
-            log.warn("Config for " + stack_name + " does not include " +
-                      "singleton_name; adding a name of " + singletonName +
-                      ". You should configure a singleton_name for this stack.");
-            
-            config = addSingletonName(config, singletonName);
-            log.debug("Stack config after adding singleton_name is " + config.getProtocolStackString());
-            tpProps = getTransportProperties(config);                       
-         }
-         else
-         {
-            throw new IllegalStateException("Config for " + stack_name + " does not include " +
-                      "singleton_name and MuxChannels are not supported.");
-         }
-      }
-      
-      JChannel channel = new JChannel(config);
-      
-      if (manageNewThreadClassLoader || manageReleasedThreadClassLoader)
-      {
-         fixChannelThreadManagement(channel);
-      }
-      
-      if (assignLogicalAddresses)
-      {
-         setChannelUniqueId(channel);
-      }
-      
-      if (isExposeChannels() && id != null && id.length() > 0)
-      {
-         registerChannel(channel, id);
-      }
-      
-      return channel;
+      return createChannelFromRegisteredStack(stack_name, id, true);
    }  
-
    
    /**
     * Creates and returns a shared transport Channel configured with the specified 
@@ -313,20 +470,147 @@
     *                               <code>false</code>.
     * @throws ChannelException
     */
-   @Override
    public Channel createMultiplexerChannel(String stack_name, String id, boolean register_for_state_transfer, String substate_id) throws Exception
    {
       return createMultiplexerChannel(stack_name, id);
    }
    
+   /**
+    * {@link #parse(Element) Parses <code>properties</code>} and then adds
+    * the resulting protocol stack configurations to the set available for use.
+    * Same as 
+    * {@link #setMultiplexerConfig(Element, boolean) <code>setMultiplexerConfig(properties, true</code>}.
+    * 
+    * @param properties document root node for XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    */
+   public void setMultiplexerConfig(Element properties) throws Exception
+   {
+      setMultiplexerConfig(properties, true);
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use. Same as 
+    * {@link #setMultiplexerConfig(File, boolean) <code>setMultiplexerConfig(properties, true</code>}.
+    * 
+    * @param properties file which must contain XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    */
+   public void setMultiplexerConfig(File properties) throws Exception
+   {
+      setMultiplexerConfig(properties, true);      
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use. Same as 
+    * {@link #setMultiplexerConfig(Object, boolean) <code>setMultiplexerConfig(properties, true</code>}.
+    * 
+    * @param properties object that can be {@link ConfiguratorFactory#getConfigStream(Object) converted into a stream}
+    *                   which must contain XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    */
+   public void setMultiplexerConfig(Object properties) throws Exception
+   {
+      setMultiplexerConfig(properties, true);
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use. Same as 
+    * {@link #setMultiplexerConfig(String, boolean) <code>setMultiplexerConfig(properties, true</code>}.
+    * 
+    * @param properties string that can be {@link ConfiguratorFactory#getConfigStream(String) converted into a stream}
+    *                   which must contain XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    */
+   public void setMultiplexerConfig(String properties) throws Exception
+   {
+      setMultiplexerConfig(properties, true);
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use. Same as 
+    * {@link #setMultiplexerConfig(URL, boolean) <code>setMultiplexerConfig(properties, true</code>}.
+    * 
+    * @param properties URL which must contain XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    */
+   public void setMultiplexerConfig(URL properties) throws Exception
+   {
+      setMultiplexerConfig(properties, true);
+   }
+
+   // -------------------------------------------------------------  Properties
+
+   /**
+    * Gets the MBeanServer to use to register mbeans for channels and protocols
+    * we create.
+    * 
+    * @return the MBeanServer, or <code>null</code> if one isn't registered
+    */
+   public MBeanServer getServer() 
+   {
+       return server;
+   }
+
+   /**
+    * Sets the MBeanServer to use to register mbeans for channels and protocols
+    * we create.
+    * 
+    * @param server the MBeanServer. May be <code>null</code>
+    */
+   public void setServer(MBeanServer server) 
+   {
+       this.server=server;
+   }
+
+   /**
+    * Gets the domain portion of the JMX ObjectName to use when registering channels and protocols
+    * 
+    * @return the domain. Will not return <code>null</code> after {@link #create()}
+    *         has been invoked.
+    */
+   public String getDomain() 
+   {
+       return domain == null ? "jgroups" : domain;
+   }
+   
    @ManagementProperty(use={ViewUse.CONFIGURATION}, description="The domain portion of the JMX ObjectName to use when registering channels and protocols")
-   @Override
    public void setDomain(String domain)
    {
-      super.setDomain(domain);
-      domainSet = true;
+      this.domain = domain;
+      this.domainSet = true;
    }
 
+   public boolean isExposeChannels() 
+   {
+       return expose_channels;
+   }
+
+   public void setExposeChannels(boolean expose_channels) 
+   {
+       this.expose_channels=expose_channels;
+   }
+
+   public boolean isExposeProtocols() 
+   {
+       return expose_protocols;
+   }
+
+   public void setExposeProtocols(boolean expose_protocols) 
+   {      
+       this.expose_protocols=expose_protocols;
+       if (expose_protocols)
+          this.expose_channels=true;
+   }
+
    /**
     * Get any logical name assigned to this server; if not null this value
     * will be the value of the 
@@ -513,7 +797,8 @@
     * @return <code>true</code> if synthetic singleton names should be created.
     *         Default is <code>true</code>.
     */
-   @ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this factory should create a synthetic singleton name attribute for a channel's transport protocol if one isn't configured")
+   @ManagementProperty(use={ViewUse.CONFIGURATION}, 
+         description="Whether this factory should create a synthetic singleton name attribute for a channel's transport protocol if one isn't configured")
    public boolean getAddMissingSingletonName()
    {
       return addMissingSingletonName;
@@ -531,8 +816,167 @@
    {
       this.addMissingSingletonName = addMissingSingletonName;
    }
+   
+   // -------------------------------------------------------------  Public
 
-   @Override
+   /**
+    * {@link #parse(Element) Parses <code>properties</code>} and then adds
+    * the resulting protocol stack configurations to the set available for use.
+    * 
+    * @param properties document root node for XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    * @param replace <code>true</code> if a configuration with the same
+    *                stack name as an already registered configuration should
+    *                replace that configuration; <code>false</code> if it
+    *                should be discarded.
+    */
+   public void setMultiplexerConfig(Element properties, boolean replace) throws Exception
+   {
+      Map<String, ProtocolStackConfigurator> map = parse(properties);
+      
+      for (Map.Entry<String, ProtocolStackConfigurator> entry : map.entrySet())
+      {
+         addConfig(entry.getKey(), entry.getValue(), replace);
+      }
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use.
+    * 
+    * @param properties file which must contain XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    * @param replace <code>true</code> if a configuration with the same
+    *                stack name as an already registered configuration should
+    *                replace that configuration; <code>false</code> if it
+    *                should be discarded.
+    */
+   public void setMultiplexerConfig(File properties, boolean replace) throws Exception
+   {
+      InputStream input=ConfiguratorFactory.getConfigStream(properties);      
+      addConfigs(input, properties.toString(), replace);
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use. 
+    * 
+    * @param properties object that can be {@link ConfiguratorFactory#getConfigStream(Object) converted into a stream}
+    *                   which must contain XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    * @param replace <code>true</code> if a configuration with the same
+    *                stack name as an already registered configuration should
+    *                replace that configuration; <code>false</code> if it
+    *                should be discarded.
+    */
+   public void setMultiplexerConfig(Object properties, boolean replace) throws Exception
+   {
+      InputStream input=ConfiguratorFactory.getConfigStream(properties);
+      addConfigs(input, properties.toString(), replace);   
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use.
+    * 
+    * @param properties string that can be {@link ConfiguratorFactory#getConfigStream(String) converted into a stream}
+    *                   which must contain XML content in the JGroups 
+    *                   <code>stacks.xml</code> format
+    * @param replace <code>true</code> if a configuration with the same
+    *                stack name as an already registered configuration should
+    *                replace that configuration; <code>false</code> if it
+    *                should be discarded.
+    */
+   public void setMultiplexerConfig(String properties, boolean replace) throws Exception
+   {
+      InputStream input=ConfiguratorFactory.getConfigStream(properties);      
+      addConfigs(input, properties, replace);
+   }
+
+   /**
+    * {@link #parse(InputStream) Parses} an input stream created from 
+    * <code>properties</code> and then adds the resulting protocol stack 
+    * configurations to the set available for use.
+    * 
+    * @param properties URL which must contain XML content in the JGroups 
+    *              <code>stacks.xml</code> format
+    * @param replace <code>true</code> if a configuration with the same
+    *                stack name as an already registered configuration should
+    *                replace that configuration; <code>false</code> if it
+    *                should be discarded.
+    */
+   public void setMultiplexerConfig(URL url, boolean replace) throws Exception
+   {
+      InputStream input=ConfiguratorFactory.getConfigStream(url);      
+      addConfigs(input, url.toString(), replace);
+   }
+   
+   // ---------------------------------------------------  JChannelFactoryMBean
+
+   /**
+    * {@inheritDoc}
+    */
+   public void clearConfigurations()
+   {
+      this.stacks.clear();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String dumpChannels()
+   {
+      return "";
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String dumpConfiguration()
+   {
+      return stacks.keySet().toString();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getConfig(String stack_name) throws Exception
+   {
+      ProtocolStackConfigurator cfg = stacks.get(stack_name);
+      if (cfg == null)
+         throw new Exception("stack \"" + stack_name + "\" not found in " + stacks.keySet());
+      return cfg.getProtocolStackString();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getMultiplexerConfig()
+   {
+      StringBuilder sb = new StringBuilder();
+      for (Map.Entry<String, ProtocolStackConfigurator> entry : stacks.entrySet())
+      {
+         sb.append(entry.getKey()).append(": ").append(entry.getValue().getProtocolStackString()).append("\n");
+      }
+      return sb.toString();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public boolean removeConfig(String stack_name)
+   {
+      return stack_name != null && this.stacks.remove(stack_name) != null;
+   }
+   
+   // -------------------------------------------------------------  Lifecycle
+
+   /**
+    * {@inheritDoc}
+    */
    public void create() throws Exception
    {
 
@@ -547,7 +991,7 @@
       
       try
       {
-         super.create();
+         createService();
          state = CREATED;
       }
       catch (Exception e)
@@ -559,7 +1003,9 @@
       log.debug("Created JChannelFactory");
    }
 
-   @Override
+   /**
+    * {@inheritDoc}
+    */
    public void start() throws Exception
    {
       if (state == STARTING || state == STARTED || state == STOPPING)
@@ -579,7 +1025,7 @@
 
       try
       {
-         super.start();
+         startService();
       }
       catch (Exception e)
       {
@@ -593,7 +1039,9 @@
       
    }
 
-   @Override
+   /**
+    * {@inheritDoc}
+    */
    public void stop()
    {
       if (state != STARTED)
@@ -607,7 +1055,7 @@
 
       try
       {
-         super.stop();
+         stopService();
       }
       catch (Throwable e)
       {
@@ -620,7 +1068,9 @@
       log.debug("Stopped JChannelFactory");
    }
 
-   @Override
+   /**
+    * {@inheritDoc}
+    */
    public void destroy()
    {
       if (state == DESTROYED)
@@ -637,21 +1087,9 @@
       
       log.debug("Destroying JChannelFactory");
       
-      // DON'T call super.destroy() as that may deregister the JMX proxy
-      // to this pojo service, leading to ugliness when the proxy is destroyed
       try
-      {
-         
-         Set<String> toUnregister = null;
-         synchronized (registeredChannels)
-         {
-            toUnregister = new HashSet<String>(registeredChannels);
-         }
-         
-         for (String channelId : toUnregister)
-         {
-            unregister(channelId);
-         }
+      {         
+         destroyService();
       }
       catch (Throwable t)
       {
@@ -666,14 +1104,13 @@
    public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
    {
       setServer(server);
-      if (!domainSet || getDomain() == null)
+      if (!this.domainSet || this.domain == null)
       {
          setDomain(name.getDomain());
       }
       return name;
    }
 
-
    public void postRegister(Boolean registrationDone)
    {
       if (registrationDone != null && registrationDone.booleanValue()
@@ -683,7 +1120,6 @@
       }
    }
 
-
    public void preDeregister() throws Exception
    { 
    }
@@ -694,6 +1130,8 @@
       if (state == ServiceMBean.DESTROYED)
          state = ServiceMBean.UNREGISTERED;
    }
+
+   // --------------------------------------------------------------- Protected
    
    /**
     * Gets the classloader that channel threads should be set to if
@@ -709,6 +1147,42 @@
       return getClass().getClassLoader();
    }
 
+   protected void createService() throws Exception
+   {
+      if(expose_channels) 
+      {
+         if(server == null)
+         {
+            throw new Exception("No MBeanServer found; JChannelFactory needs to " +
+            		"be run with an MBeanServer present, or with ExposeChannels " +
+            		"set to false");
+         }
+         
+         if(domain == null)
+         {
+            domain="jgroups";
+         }
+      }
+   }
+
+   protected void startService() throws Exception
+   {
+      // no-op
+   }
+
+   protected void stopService() throws Exception
+   {
+      // no-op
+   }
+
+   protected void destroyService()
+   {  
+      for (Channel ch : registeredChannels.keySet())
+      {
+         unregisterChannel(ch);
+      }
+   }
+
    // ----------------------------------------------------------------- Private
 
 
@@ -718,6 +1192,142 @@
          throw new IllegalStateException("Cannot use factory; state is " + getStateString());
    }
    
+   private void addConfigs(InputStream input, String source, boolean replace) throws Exception
+   {
+      if(input == null)
+      {
+         throw new FileNotFoundException(source);
+      }
+      
+      Map<String, ProtocolStackConfigurator> map = null;
+      try 
+      {
+          map = parse(input);
+      }
+      catch(Exception ex) 
+      {
+          throw new Exception("failed parsing " + source, ex);
+      }
+      finally 
+      {
+          Util.close(input);
+      }
+      
+      for (Map.Entry<String, ProtocolStackConfigurator> entry : map.entrySet())
+      {
+         addConfig(entry.getKey(), entry.getValue(), replace);
+      }
+   }
+
+   private boolean addConfig(String st_name, ProtocolStackConfigurator val, boolean replace)
+   {
+      boolean added = replace;
+      if (replace)
+      {
+         stacks.put(st_name, val);
+         if (log.isTraceEnabled())
+            log.trace("added config '" + st_name + "'");
+      }
+      else
+      {
+         if (!stacks.containsKey(st_name))
+         {
+            stacks.put(st_name, val);
+            if (log.isTraceEnabled())
+               log.trace("added config '" + st_name + "'");
+            added = true;
+         }
+         else
+         {
+            if (log.isTraceEnabled())
+               log.trace("didn't add config '" + st_name + " because one of the same name already existed");
+         }
+      }
+      return added;      
+   }
+
+   /**
+    * Creates a channel from one of the known stack configurations
+    * FIXME Comment this
+    * 
+    * @param stack_name the name of the stack config
+    * @param id optional id for the channel
+    * @param forceSingletonStack <code>true</code> if a singleton_name must be
+    *             either configured, or addMissingSingletonName must be true
+    *             
+    * @return the channel
+    * 
+    * @throws IllegalStateException if stack_name is unknown or forceSingletonStack
+    *           is true but a singleton_name couldn't be configured
+    *           
+    * @throws Exception
+    */
+   private Channel createChannelFromRegisteredStack(String stack_name, String id, boolean forceSingletonStack) throws Exception
+   {
+      checkStarted();
+      
+      ProtocolStackConfigurator config = stacks.get(stack_name);
+      
+      if (config == null)
+         throw new IllegalStateException("Unknown stack_name " + stack_name);
+      
+      JChannel channel = initializeChannel(config, stack_name, forceSingletonStack);
+      
+      registerChannel(channel, id, stack_name, getProtocolData(config));      
+      
+      return channel;
+   }
+
+   /**
+    * Construct a JChannel from the given config and then do post-construction
+    * processing like fixing up thread managment or setting a unique id.
+    * 
+    * @param config the config
+    * 
+    * @return the channel
+    * 
+    * @throws ChannelException
+    */
+   private JChannel initializeChannel(ProtocolStackConfigurator config, String stack_name,
+         boolean forceSingletonStack) throws ChannelException
+   {  
+      Map<String, String> tpProps = getTransportProperties(config);
+   
+      if (!tpProps.containsKey(Global.SINGLETON_NAME))
+      {
+         if (addMissingSingletonName && stack_name != null)
+         {
+            String singletonName = UNSHARED_TRANSPORT_NAME_BASE + stack_name;
+            
+            log.warn("Config for " + stack_name + " does not include " +
+                      "singleton_name; adding a name of " + singletonName +
+                      ". You should configure a singleton_name for this stack.");
+            
+            config = addSingletonName(config, singletonName);
+            log.debug("Stack config after adding singleton_name is " + config.getProtocolStackString());
+            tpProps = getTransportProperties(config);                       
+         }
+         else if (forceSingletonStack)
+         {
+            throw new IllegalStateException("Config for " + stack_name + " does not include " +
+                      "singleton_name and MuxChannels are not supported.");
+         }
+      }
+      JChannel channel = new JChannel(config);
+      
+      if (manageNewThreadClassLoader || manageReleasedThreadClassLoader)
+      {
+         fixChannelThreadManagement(channel);
+      }
+      
+      if (assignLogicalAddresses)
+      {
+         setChannelUniqueId(channel);
+      }
+      
+      return channel;
+   }
+   
    private void setChannelUniqueId(Channel channel)
    {
       IpAddress address = (IpAddress) channel.getLocalAddress();
@@ -806,31 +1416,15 @@
    private Map<String, String> getTransportProperties(ProtocolStackConfigurator config)
    {
       Map<String, String> tpProps = null;
-      try
+      ProtocolData[] protocols= getProtocolData(config);
+      ProtocolData transport=protocols[0];
+      @SuppressWarnings("unchecked")
+      Map<String,ProtocolParameter> tmp=transport.getParameters();
+      tpProps = new HashMap<String,String>();
+      for(Map.Entry<String,ProtocolParameter> entry: tmp.entrySet())
       {
-         ProtocolData[] protocols=config.getProtocolStack();
-         ProtocolData transport=protocols[0];
-         Map<String,ProtocolParameter> tmp=transport.getParameters();
-         tpProps = new HashMap<String,String>();
-         for(Map.Entry<String,ProtocolParameter> entry: tmp.entrySet())
-             tpProps.put(entry.getKey(), entry.getValue().getValue());
+          tpProps.put(entry.getKey(), entry.getValue().getValue());
       }
-      catch (UnsupportedOperationException uoe)
-      {
-         // JGroups version hasn't implemented ProtocolStackConfigurator.getProtocolStack()
-         // So we do it ourselves
-         String configStr = config.getProtocolStackString();
-         String tpConfigStr = configStr.substring(configStr.indexOf('(') + 1, configStr.indexOf(')'));
-         String[] params = tpConfigStr.split(";");
-         tpProps = new HashMap<String, String>();
-         for (String param : params)
-         {
-            String[] keyVal = param.split("=");
-            if (keyVal.length != 2)
-               throw new IllegalStateException("Invalid parameter " + param + " in stack " + configStr);
-            tpProps.put(keyVal[0], keyVal[1]);
-         }
-      }
       
       return tpProps;
    }
@@ -843,12 +1437,8 @@
       {
          ProtocolData[] protocols=orig.getProtocolStack();
          ProtocolData transport=protocols[0];
-         Map<String,ProtocolParameter> tmp=transport.getParameters();
-         Map<String,String> tpProps = new HashMap<String,String>();
-         for(Map.Entry<String,ProtocolParameter> entry: tmp.entrySet())
-             tpProps.put(entry.getKey(), entry.getValue().getValue());
-         tpProps.put(Global.SINGLETON_NAME, singletonName);
-         // we've now updated the state of orig; just return it
+         ProtocolParameter singletonParam = new ProtocolParameter(Global.SINGLETON_NAME, singletonName);
+         transport.override(new ProtocolParameter[]{ singletonParam});
          result = orig;
       }
       catch (UnsupportedOperationException uoe)
@@ -1031,40 +1621,124 @@
       classLoaderSwitcher.setContextClassLoader(thread, classLoader);
    }
    
-   private void registerChannel(JChannel ch, String channelId) throws Exception 
+   private void registerChannel(JChannel ch, String channelId, String stackName, ProtocolData[] config) throws Exception
    {
-      if(getServer() != null)
+      // Register for channel closed notification so we can unregister
+      ch.addChannelListener(closeListener);
+      
+      ObjectName chName = null;
+      List<ObjectName> protNames = null;
+      List<ObjectName> allNames = registerInJmx(ch, channelId);
+      if (allNames != null && allNames.size() > 0)
       {
-         // Register for channel closed notification so we can unregister
-         JmxDeregistrationChannelListener listener = new JmxDeregistrationChannelListener(channelId);
-         ch.addChannelListener(listener);
-         JmxConfigurator.registerChannel(ch, getServer(), getDomain(), channelId, isExposeProtocols());
-         synchronized (registeredChannels)
+         chName = allNames.get(0);
+         if (allNames.size() > 1)
          {
-            registeredChannels.add(channelId);
+            protNames = allNames.subList(1, allNames.size());
          }
       }
+      
+      ChannelInfo info = new ChannelInfo(channelId, stackName, ch, config, chName, protNames);
+      registeredChannels.put(ch, info);
    }
    
-   private void unregister(String channelId) 
+   private List<ObjectName> registerInJmx(JChannel ch, String channelId) throws Exception 
    {
-      if(getServer() != null && registeredChannels.contains(channelId))
+      List<ObjectName> allNames = null;
+      
+      if(isExposeChannels() && getServer() != null && channelId != null && channelId.length() > 0)
       {
-         String oname = getDomain() + ":type=channel,cluster=" + channelId;
-         try
+         allNames = new ArrayList<ObjectName>();
+         ObjectName channelName = new ObjectName(getDomain() + ":type=channel,cluster=" + channelId);
+         getServer().registerMBean(new org.jgroups.jmx.JChannel(ch), channelName);
+         allNames.add(channelName);
+         if (isExposeProtocols())
          {
-            getServer().unregisterMBean(new ObjectName(oname));
-            oname = getDomain() + ":type=protocol,cluster=" + channelId + ",*";
-            JmxConfigurator.unregister(getServer(), oname);
-            synchronized (registeredChannels)
+            String baseName = getDomain() + ":type=protocol,cluster=" + channelId;
+            ProtocolStack stack=ch.getProtocolStack();
+            List<Protocol> protocols=stack.getProtocols();
+            
+            for(Protocol prot : protocols)
             {
-               registeredChannels.remove(channelId);
+                org.jgroups.jmx.Protocol p=null;
+                try {
+                   String prot_name = prot.getClass().getName();
+                   String clname = prot_name.replaceFirst("org.jgroups.", "org.jgroups.jmx.");
+                   Class<?> cl = Util.loadClass(clname, JmxConfigurator.class);
+                   if (cl != null)
+                   {
+                      p = (org.jgroups.jmx.Protocol) cl.newInstance();
+                   }
+                }
+                catch(ClassNotFoundException e) 
+                {
+                   // ignore;
+                }
+                catch(Throwable e) {
+                    log.error("failed creating a JMX wrapper instance for " + prot, e);
+                    p = null;
+                }
+                if(p == null)
+                {
+                   // Use default
+                   p = new org.jgroups.jmx.Protocol(prot);
+                }
+                ObjectName prot_name=new ObjectName(baseName + ",protocol=" + prot.getName());
+                server.registerMBean(p, prot_name);
+                allNames.add(prot_name);
             }
          }
+      }
+      
+      return allNames;
+   }
+   
+   private void unregisterChannel(Channel ch)
+   {
+      ChannelInfo info = registeredChannels.remove(ch);
+      if (info == null)
+      {
+         log.warn("Unknown channel " + ch.getClusterName());
+      }
+      else
+      {
+         unregisterFromJmx(info);
+      }
+      
+      ch.removeChannelListener(closeListener);
+   }
+   
+   private void unregisterFromJmx(ChannelInfo info) 
+   {
+      ObjectName oname = info.getChannelObjectName();
+      MBeanServer mbs = getServer();
+      if(info != null && mbs != null)
+      {
+         try
+         {
+            mbs.unregisterMBean(oname);
+         }
          catch(Exception e)
          {
             log.error("failed unregistering " + oname, e);
          }
+         
+         List<ObjectName> onames = info.getProtocolObjectNames();
+         if (onames != null)
+         {
+            for (ObjectName protName : onames)
+            {
+               try
+               {
+                  mbs.unregisterMBean(protName);
+               }
+               catch(Exception e)
+               {
+                  log.error("failed unregistering " + protName, e);
+               }
+               
+            }
+         }
       }
    }
    
@@ -1104,18 +1778,11 @@
       
    }
 
-   private class JmxDeregistrationChannelListener extends ChannelListenerAdapter
+   private class ChannelCloseListener extends ChannelListenerAdapter
    {
-      private final String channelId;
-      
-      JmxDeregistrationChannelListener(String channelId)
-      {
-         this.channelId = channelId;
-      }
-      
       public void channelClosed(Channel channel) 
       {
-         unregister(channelId);
+         unregisterChannel(channel);
       }            
    }
    

Modified: branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactoryMBean.java
===================================================================
--- branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactoryMBean.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/cluster/src/main/org/jboss/ha/framework/server/JChannelFactoryMBean.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -27,9 +27,7 @@
 import org.jgroups.ChannelException;
 
 /**
- * StandardMBean interface for {@link JChannelFactory}. Based on the 
- * <code>org.jgroups.jmx.JChannelFactoryMBean</code> interface, which
- * is scheduled to be removed.
+ * StandardMBean interface for {@link JChannelFactory}.
  * <p>
  * The plain-old-java-interface for the channel factory is 
  * <code>org.jgroups.ChannelFactory</code>; users are encouraged to dependency
@@ -130,7 +128,7 @@
    void setExposeProtocols(boolean f);
 
    /**
-    * Returns the stack configuration as a string (valid to be fed into new JChannel()). Throws an exception
+    * Returns the stack configuration as a string (valid to be fed into new JChannel(String)). Throws an exception
     * if the stack_name is not found. One of the setMultiplexerConfig() methods had to be called beforehand.
     * 
     * @return The protocol stack config as a plain string
@@ -151,12 +149,21 @@
 
    /**
     * Create a {@link Channel} using the specified stack. Channel will use a 
-    * shared transport if the <code>singleton-name</code> attribute is
-    * set on the stack's transport protocol.
+    * shared transport.
     * 
-    * @param stack_name the name of the stack
-    * @return the channel
+    * @param stack_name 
+    *            The name of the stack to be used. All stacks are defined in
+    *            the configuration with which the factory is configured (see
+    *            {@link #setMultiplexerConfig(Object)} for example. If
+    *            clients attempt to create a Channel for an undefined stack 
+    *            name an exception will be thrown.
     * 
+    * @return an implementation of Channel configured with a shared transport.
+    * 
+    * @throws IllegalArgumentException if <code>stack_name</code> is 
+    * <code>null</code> or {@link #getConfig(String)} returns <code>null</code>
+    * when <code>stack_name</code> is used.
+    * 
     * @throws Exception
     */
    Channel createChannel(String stack_name) throws Exception;

Modified: branches/dml-log-service-integration/component-matrix/pom.xml
===================================================================
--- branches/dml-log-service-integration/component-matrix/pom.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/component-matrix/pom.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -34,7 +34,7 @@
     <version.jacorb>2.3.0jboss.patch6-brew</version.jacorb>
     <version.javax.faces>1.2_12</version.javax.faces>
     <version.jboss.jaxr>1.2.1.GA</version.jboss.jaxr>
-    <version.jboss.jbossts>4.4.0.GA</version.jboss.jbossts>
+    <version.jboss.jbossts>4.6.1.GA</version.jboss.jbossts>
     <version.jboss.jbossws-common>1.2.0.Beta1</version.jboss.jbossws-common>
     <version.jboss.jbossws-framework>3.2.0.Beta1</version.jboss.jbossws-framework>
     <version.jboss.jbossws-spi>1.2.0.Beta1</version.jboss.jbossws-spi>
@@ -73,12 +73,12 @@
     <version.org.jboss.ejb3.proxy.clustered.client>1.0.1</version.org.jboss.ejb3.proxy.clustered.client>
     <version.org.jboss.ejb3.security.client>1.0.0</version.org.jboss.ejb3.security.client>
     <version.org.jboss.ejb3>1.1.6</version.org.jboss.ejb3>
-    <version.org.jboss.integration>5.1.0.GA</version.org.jboss.integration>
+    <version.org.jboss.integration>5.1.0.SP1</version.org.jboss.integration>
     <version.org.jboss.jbossxb>2.0.0.GA</version.org.jboss.jbossxb>
     <version.org.jboss.jpa>1.0.0</version.org.jboss.jpa>
     <version.org.jboss.logging>2.1.0.GA</version.org.jboss.logging>
     <version.org.jboss.logmanager>1.1.0.CR1</version.org.jboss.logmanager>
-    <version.org.jboss.man>2.1.1.Beta2</version.org.jboss.man>
+    <version.org.jboss.man>2.1.1.CR1</version.org.jboss.man>
     <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
     <version.org.jboss.metadata>1.0.0.CR16</version.org.jboss.metadata>
     <version.org.jboss.microcontainer>2.0.4.GA</version.org.jboss.microcontainer>
@@ -742,54 +742,55 @@
         <version>${version.org.jboss.mx}</version>
       </dependency>
       
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossjta</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
-      
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossjta-integration</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
-      
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossts-common</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossts-common</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
 
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossjts</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossjts</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
 
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossjts-integration</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossjts-integration</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
 
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossjts-jacorb</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossts-common</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
 
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>jbossts-tools</artifactId>
-        <version>${version.jboss.jbossts}</version>
-        <type>jboss-sar</type>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossjts-jacorb</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
 
-      <dependency>
-        <groupId>jboss.jbossts</groupId>
-        <artifactId>resources</artifactId>
-        <version>${version.jboss.jbossts}</version>
-      </dependency>
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossts-tools</artifactId>
+          <version>${version.jboss.jbossts}</version>
+          <type>jboss-sar</type>
+        </dependency>
+
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>resources</artifactId>
+          <version>${version.jboss.jbossts}</version>
+        </dependency>
+
+        <dependency>
+          <groupId>jboss.jbossts</groupId>
+          <artifactId>jbossxts</artifactId>
+          <version>${version.jboss.jbossts}</version>
+          <type>jboss-sar</type>
+        </dependency>
       
       <dependency>
         <groupId>org.jboss.ws.native</groupId>

Copied: branches/dml-log-service-integration/jbossas-transactions (from rev 90277, trunk/jbossas-transactions)


Property changes on: branches/dml-log-service-integration/jbossas-transactions
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: branches/dml-log-service-integration/jbossas-transactions/README.txt
===================================================================
--- trunk/jbossas-transactions/README.txt	2009-06-17 03:16:18 UTC (rev 90277)
+++ branches/dml-log-service-integration/jbossas-transactions/README.txt	2009-06-17 03:46:51 UTC (rev 90279)
@@ -1,86 +0,0 @@
-
-JTS
----
-
-To remove the default JTA implementation of the transaction service and replace it with the JTS for
-full distributed transaction support, run 'ant jts' or follow the steps below.
-
-- By default the transaction libraries are installed in JBOSS_HOME/common/lib and used by every server configuration.
-  Each server configuration has its own transaction config file, JBOSS_HOME/server/<config>/conf/jbossts-properties.xml
-
-- To replace the JTA with JTS for a single server <config> dir:
-  For each server using the JTS, delete JBOSS_HOME/server/<config>/conf/jbossts-properties.xml
-  and copy jbossts-properties.xml from this dir to JBOSS_HOME/server/<config>/conf/ instead.
-
- - complete the installation by making the following edits to the server configuration
-    (These are difficult to automate with ant and hence are manual steps for now)
-
- - edit the conf/jbossts-properties.xml file and remove the
-   recovery extension property containing the value
-   "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
-
- - In deploy/transaction-jboss-beans.xml, update the TransactionManager class and dependencies as follows:
-
-    <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
-        <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",
-            exposedInterface=com.arjuna.ats.jbossatx.jts.TransactionManagerServiceMBean.class, registerDirectly=true)
-        </annotation>
-
-        ...
-        <start>
-           <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
-        </start>
-        ...
-    </bean>
-
- - Edit the conf/jacorb.properies as follows.
-  - change the jacorb.poa.thread_pool_max property to 32
-
- - Edit the deploy/iiop-service.xml and modify the
-   PortableInterceptorInitializers attribute as follows.
-  - remove the following lines
-         <!-- comment out to disable null transaction propagation over IIOP -->
-         <initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
-         <!-- comment out to disable transaction demarcation over IIOP -->
-         <initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
-  - add the following lines
-         <!-- JBoss TS interceptor. -->
-         <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
-         <!-- RMI/IIOP tx context interceptor -->
-         <initializer>com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer</initializer>
-
-For each deployment of JacORB, you will need to ensure that the jacorb.implname in the jacorb.properties
-file is unique.
-
-If running an external recovery manager, edit conf/jbossts-properties.xml to remove
-the recovery activator property named "com.arjuna.ats.arjuna.recovery.recoveryActivator_1".
-This may be necessary in cluster setups where the ObjectStore is shared, as
-there should be only one recovery manager per ObjectStore.
-
-Finally, note that the application server binds to the
-localhost address by default. This is generally inappropriate for distributed transactions,
-so please ensure the server is bound to a alternative address.
-
-There is a short article on the JBoss wiki that describes some typical JTS
-usage scenarios. It is available at the url https://www.jboss.org/community/docs/DOC-13179
-
-
-XTS (Web Services Transactions)
--------------------------------
-
-Install XTS to the desired server by running 'ant xts' or following the steps below.
-
-- Unzip the jbossxts.sar file into a directory server/<config>/deploy/jbossxts.sar/
-
-Embedded Tools
---------------
-
-WARNING: The tools are a prototype and unsupported component, aimed at providing diagnostic information
-regarding the status of transactions, particularly for crash recovery. The tools currently use swing, so are
-suitable only for use from the local host and not in remote or headless situations.
-
-Install the tools using 'ant tools' or by following the steps below.
-
-- Copy the jbossts-tools.jar file to server/<config>/deploy/
-
-The tools swing GUI can then be started from the server's JMX console.

Copied: branches/dml-log-service-integration/jbossas-transactions/README.txt (from rev 90277, trunk/jbossas-transactions/README.txt)
===================================================================
--- branches/dml-log-service-integration/jbossas-transactions/README.txt	                        (rev 0)
+++ branches/dml-log-service-integration/jbossas-transactions/README.txt	2009-06-17 03:46:51 UTC (rev 90279)
@@ -0,0 +1,86 @@
+
+JTS
+---
+
+To remove the default JTA implementation of the transaction service and replace it with the JTS for
+full distributed transaction support, run 'ant jts' or follow the steps below.
+
+- By default the transaction libraries are installed in JBOSS_HOME/common/lib and used by every server configuration.
+  Each server configuration has its own transaction config file, JBOSS_HOME/server/<config>/conf/jbossts-properties.xml
+
+- To replace the JTA with JTS for a single server <config> dir:
+  For each server using the JTS, delete JBOSS_HOME/server/<config>/conf/jbossts-properties.xml
+  and copy jbossts-properties.xml from this dir to JBOSS_HOME/server/<config>/conf/ instead.
+
+ - complete the installation by making the following edits to the server configuration
+    (These are difficult to automate with ant and hence are manual steps for now)
+
+ - edit the conf/jbossts-properties.xml file and remove the
+   recovery extension property containing the value
+   "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
+
+ - In deploy/transaction-jboss-beans.xml, update the TransactionManager class and dependencies as follows:
+
+    <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
+        <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",
+            exposedInterface=com.arjuna.ats.jbossatx.jts.TransactionManagerServiceMBean.class, registerDirectly=true)
+        </annotation>
+
+        ...
+        <start>
+           <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
+        </start>
+        ...
+    </bean>
+
+ - Edit the conf/jacorb.properies as follows.
+  - change the jacorb.poa.thread_pool_max property to 32
+
+ - Edit the deploy/iiop-service.xml and modify the
+   PortableInterceptorInitializers attribute as follows.
+  - remove the following lines
+         <!-- comment out to disable null transaction propagation over IIOP -->
+         <initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
+         <!-- comment out to disable transaction demarcation over IIOP -->
+         <initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
+  - add the following lines
+         <!-- JBoss TS interceptor. -->
+         <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
+         <!-- RMI/IIOP tx context interceptor -->
+         <initializer>com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer</initializer>
+
+For each deployment of JacORB, you will need to ensure that the jacorb.implname in the jacorb.properties
+file is unique.
+
+If running an external recovery manager, edit conf/jbossts-properties.xml to remove
+the recovery activator property named "com.arjuna.ats.arjuna.recovery.recoveryActivator_1".
+This may be necessary in cluster setups where the ObjectStore is shared, as
+there should be only one recovery manager per ObjectStore.
+
+Finally, note that the application server binds to the
+localhost address by default. This is generally inappropriate for distributed transactions,
+so please ensure the server is bound to a alternative address.
+
+There is a short article on the JBoss wiki that describes some typical JTS
+usage scenarios. It is available at the url https://www.jboss.org/community/docs/DOC-13179
+
+
+XTS (Web Services Transactions)
+-------------------------------
+
+Install XTS to the desired server by running 'ant xts' or following the steps below.
+
+- Unzip the jbossxts.sar file into a directory server/<config>/deploy/jbossxts.sar/
+
+Embedded Tools
+--------------
+
+WARNING: The tools are a prototype and unsupported component, aimed at providing diagnostic information
+regarding the status of transactions, particularly for crash recovery. The tools currently use swing, so are
+suitable only for use from the local host and not in remote or headless situations.
+
+Install the tools using 'ant tools' or by following the steps below.
+
+- Copy the jbossts-tools.jar file to server/<config>/deploy/
+
+The tools swing GUI can then be started from the server's JMX console.

Deleted: branches/dml-log-service-integration/jbossas-transactions/build.xml
===================================================================
--- trunk/jbossas-transactions/build.xml	2009-06-17 03:16:18 UTC (rev 90277)
+++ branches/dml-log-service-integration/jbossas-transactions/build.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -1,140 +0,0 @@
-<!--
-  JBoss, Home of Professional Open Source
-  Copyright 2008, Red Hat Middleware LLC, and individual contributors
-  as indicated by the @author tags.
-  See the copyright.txt in the distribution for a
-  full listing of individual contributors.
-  This copyrighted material is made available to anyone wishing to use,
-  modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
-  You should have received a copy of the GNU Lesser General Public License,
-  v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-  MA  02110-1301, USA.
-
-  (C) 2008, 2009
-  @author JBoss, a division of Red Hat.
--->
-
-<!--
-    Ant build script to mostly automate the installation of JBossTS components into JBossAS.
-    @author Jonathan Halliday (jonathan.halliday at redhat.com), September 2008.
-    @author Ivo Studensky (istudens at redhat.com)
--->
-<project name="jbossts-install" default="usage" basedir=".">
-
-    <!-- Select which server the JBossTS component will install into.
-        For JTS, must have an ORB configured.
-        For XTS, must have JBossWSNative configured.
-        Path relative to our location (docs/examples/transactions) -->
-    <property name="target.server.dir" value="../../../server/all"/>
-
-    <target name="usage">
-        <echo message="Usage: 'ant jts' : installs JBossTS JTS (distributed JTA) component"/>
-        <echo message="       'ant xts' : installs JBossTS XTS (Web Services Transactions) component"/>
-        <echo message="       'ant tools' : installs the embedded transactions tools."/>
-        <echo message="                     WARNING: tools are prototype and unsupported"/>
-    </target>
-
-    <!-- install XTS into the designated server. We expand the .sar to make it easier to
-        reference individual .jar files in a user's classpath or edit the config files. -->
-    <target name="xts">
-        <mkdir dir="${target.server.dir}/deploy/jbossxts.sar"/>
-        <unzip src="jbossxts.sar" dest="${target.server.dir}/deploy/jbossxts.sar/"/>
-    </target>
-
-    <!-- deploy the embedded tools into the designated server -->
-    <target name="tools">
-        <copy file="jbossts-tools.sar" todir="${target.server.dir}/deploy/"/>
-    </target>
-
-    <!-- install the JTS into the designated server -->
-    <target name="jts">
-
-        <!-- rename the JTA version of the properties file rather than deleting it,
-            as it may have customizations we don't want to lose. -->
-        <move file="${target.server.dir}/conf/jbossts-properties.xml"
-              tofile="${target.server.dir}/conf/jbossts-properties-old-for-jta.xml"/>
-
-        <copy file="jbossts-properties.xml" todir="${target.server.dir}/conf/"/>
-
-        <echo message="Transaction service configuration file installed."/>
-
-        <!-- rewrite the config files for the server that is using JTS -->
-        <antcall target="modify-jts-config-files">
-            <param name="server.dir" value="${target.server.dir}"/>
-        </antcall>
-
-        <echo message="JBossAS config files updated to run JTS in config ${target.server.dir}"/>
-
-    </target>
-
-    <target name="modify-jts-config-files">
-
-        <!--
-            edit the conf/jbossts-properties.xml file and remove the
-            recovery extension property containing the value
-                "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
-        -->
-        <replaceregexp
-            file="${server.dir}/conf/jbossts-properties.xml"
-            match="&lt;property\s+name=.com\.arjuna\.ats\.arjuna\.recovery\.recoveryExtension\d+.\s*value=.com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.\s*/&gt;"
-            replace=""  />
-
-
-        <!--
-            In deploy/transaction-jboss-beans.xml, update the TransactionManager class and dependencies as follows:
-                <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
-                ...
-                    <start>
-                       <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
-                    </start>
-                ...
-                </bean>
-        -->
-        <replaceregexp byline="true"
-            file="${server.dir}/deploy/transaction-jboss-beans.xml"
-            match="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
-            replace="com.arjuna.ats.jbossatx.jts.TransactionManagerService"  />
-
-        <replaceregexp
-            file="${server.dir}/deploy/transaction-jboss-beans.xml"
-            match="&lt;/bean&gt;"
-            replace="    &lt;start&gt;&lt;parameter&gt;&lt;inject bean=&quot;jboss:service=CorbaORB&quot; property=&quot;ORB&quot;/&gt;&lt;/parameter&gt;&lt;/start&gt;&#10;&#10;    &lt;/bean&gt;" />
-
-        <!--
-            Edit the conf/jacorb.properies as follows.
-              - change the jacorb.poa.thread_pool_max property to 32
-        -->
-        <replaceregexp
-            file="${server.dir}/conf/jacorb.properties"
-            match="jacorb.poa.thread_pool_max\s*=\s*\d+"
-            replace="jacorb.poa.thread_pool_max=32"  />
-
-	<!--
-	     Edit the deploy/iiop-service.xml and modify the PortableInterceptorInitializers attribute as follows.
-             remove the following lines
-                 <!- - comment out to disable null transaction propagation over IIOP - ->
-                 <initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
-                 <!- - comment out to disable transaction demarcation over IIOP - ->
-                 <initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
-             add the following lines
-                 <!- - JBoss TS interceptor. - ->
-                 <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
-                 <!- - RMI/IIOP tx context interceptor - ->
-                 <initializer>com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer</initializer>
-	-->
-        <replaceregexp
-            file="${server.dir}/deploy/iiop-service.xml"
-            match="org.jboss.tm.iiop.TxServerClientInterceptorInitializer"
-            replace="com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl"  />
-        <replaceregexp
-            file="${server.dir}/deploy/iiop-service.xml"
-            match="org.jboss.tm.iiop.TxServerInterceptorInitializer"
-            replace="com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer"  />
-
-    </target>
-</project>
\ No newline at end of file

Copied: branches/dml-log-service-integration/jbossas-transactions/build.xml (from rev 90277, trunk/jbossas-transactions/build.xml)
===================================================================
--- branches/dml-log-service-integration/jbossas-transactions/build.xml	                        (rev 0)
+++ branches/dml-log-service-integration/jbossas-transactions/build.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -0,0 +1,140 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2008, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+  MA  02110-1301, USA.
+
+  (C) 2008, 2009
+  @author JBoss, a division of Red Hat.
+-->
+
+<!--
+    Ant build script to mostly automate the installation of JBossTS components into JBossAS.
+    @author Jonathan Halliday (jonathan.halliday at redhat.com), September 2008.
+    @author Ivo Studensky (istudens at redhat.com)
+-->
+<project name="jbossts-install" default="usage" basedir=".">
+
+    <!-- Select which server the JBossTS component will install into.
+        For JTS, must have an ORB configured.
+        For XTS, must have JBossWSNative configured.
+        Path relative to our location (docs/examples/transactions) -->
+    <property name="target.server.dir" value="../../../server/all"/>
+
+    <target name="usage">
+        <echo message="Usage: 'ant jts' : installs JBossTS JTS (distributed JTA) component"/>
+        <echo message="       'ant xts' : installs JBossTS XTS (Web Services Transactions) component"/>
+        <echo message="       'ant tools' : installs the embedded transactions tools."/>
+        <echo message="                     WARNING: tools are prototype and unsupported"/>
+    </target>
+
+    <!-- install XTS into the designated server. We expand the .sar to make it easier to
+        reference individual .jar files in a user's classpath or edit the config files. -->
+    <target name="xts">
+        <mkdir dir="${target.server.dir}/deploy/jbossxts.sar"/>
+        <unzip src="jbossxts.sar" dest="${target.server.dir}/deploy/jbossxts.sar/"/>
+    </target>
+
+    <!-- deploy the embedded tools into the designated server -->
+    <target name="tools">
+        <copy file="jbossts-tools.sar" todir="${target.server.dir}/deploy/"/>
+    </target>
+
+    <!-- install the JTS into the designated server -->
+    <target name="jts">
+
+        <!-- rename the JTA version of the properties file rather than deleting it,
+            as it may have customizations we don't want to lose. -->
+        <move file="${target.server.dir}/conf/jbossts-properties.xml"
+              tofile="${target.server.dir}/conf/jbossts-properties-old-for-jta.xml"/>
+
+        <copy file="jbossts-properties.xml" todir="${target.server.dir}/conf/"/>
+
+        <echo message="Transaction service configuration file installed."/>
+
+        <!-- rewrite the config files for the server that is using JTS -->
+        <antcall target="modify-jts-config-files">
+            <param name="server.dir" value="${target.server.dir}"/>
+        </antcall>
+
+        <echo message="JBossAS config files updated to run JTS in config ${target.server.dir}"/>
+
+    </target>
+
+    <target name="modify-jts-config-files">
+
+        <!--
+            edit the conf/jbossts-properties.xml file and remove the
+            recovery extension property containing the value
+                "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
+        -->
+        <replaceregexp
+            file="${server.dir}/conf/jbossts-properties.xml"
+            match="&lt;property\s+name=.com\.arjuna\.ats\.arjuna\.recovery\.recoveryExtension\d+.\s*value=.com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.\s*/&gt;"
+            replace=""  />
+
+
+        <!--
+            In deploy/transaction-jboss-beans.xml, update the TransactionManager class and dependencies as follows:
+                <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
+                ...
+                    <start>
+                       <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
+                    </start>
+                ...
+                </bean>
+        -->
+        <replaceregexp byline="true"
+            file="${server.dir}/deploy/transaction-jboss-beans.xml"
+            match="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
+            replace="com.arjuna.ats.jbossatx.jts.TransactionManagerService"  />
+
+        <replaceregexp
+            file="${server.dir}/deploy/transaction-jboss-beans.xml"
+            match="&lt;/bean&gt;"
+            replace="    &lt;start&gt;&lt;parameter&gt;&lt;inject bean=&quot;jboss:service=CorbaORB&quot; property=&quot;ORB&quot;/&gt;&lt;/parameter&gt;&lt;/start&gt;&#10;&#10;    &lt;/bean&gt;" />
+
+        <!--
+            Edit the conf/jacorb.properies as follows.
+              - change the jacorb.poa.thread_pool_max property to 32
+        -->
+        <replaceregexp
+            file="${server.dir}/conf/jacorb.properties"
+            match="jacorb.poa.thread_pool_max\s*=\s*\d+"
+            replace="jacorb.poa.thread_pool_max=32"  />
+
+	<!--
+	     Edit the deploy/iiop-service.xml and modify the PortableInterceptorInitializers attribute as follows.
+             remove the following lines
+                 <!- - comment out to disable null transaction propagation over IIOP - ->
+                 <initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
+                 <!- - comment out to disable transaction demarcation over IIOP - ->
+                 <initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
+             add the following lines
+                 <!- - JBoss TS interceptor. - ->
+                 <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
+                 <!- - RMI/IIOP tx context interceptor - ->
+                 <initializer>com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer</initializer>
+	-->
+        <replaceregexp
+            file="${server.dir}/deploy/iiop-service.xml"
+            match="org.jboss.tm.iiop.TxServerClientInterceptorInitializer"
+            replace="com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl"  />
+        <replaceregexp
+            file="${server.dir}/deploy/iiop-service.xml"
+            match="org.jboss.tm.iiop.TxServerInterceptorInitializer"
+            replace="com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer"  />
+
+    </target>
+</project>
\ No newline at end of file

Modified: branches/dml-log-service-integration/profileservice/.classpath
===================================================================
--- branches/dml-log-service-integration/profileservice/.classpath	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/.classpath	2009-06-17 03:46:51 UTC (rev 90279)
@@ -37,7 +37,7 @@
 	<classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-2/jboss-bootstrap-1.0.0-Beta-2.jar" sourcepath="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-2/jboss-bootstrap-1.0.0-Beta-2-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.3.GA/jboss-classloader-2.0.3.GA.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloader/2.0.3.GA/jboss-classloader-2.0.3.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.3.GA/jboss-classloading-2.0.3.GA.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading/2.0.3.GA/jboss-classloading-2.0.3.GA-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.CR4/jboss-classloading-spi-5.1.0.CR4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.CR4/jboss-classloading-spi-5.1.0.CR4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.SP1/jboss-classloading-spi-5.1.0.SP1.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.SP1/jboss-classloading-spi-5.1.0.SP1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.3.GA/jboss-classloading-vfs-2.0.3.GA.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.3.GA/jboss-classloading-vfs-2.0.3.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.GA/jboss-current-invocation-aspects-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.GA/jboss-current-invocation-aspects-1.0.0.GA-sources.jar"/>
@@ -83,13 +83,13 @@
 	<classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.4.GA/jboss-kernel-2.0.4.GA.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.4.GA/jboss-kernel-2.0.4.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.6.GA/jboss-logging-log4j-2.0.6.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.6.GA/jboss-logging-log4j-2.0.6.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.SP1/jboss-managed-2.1.0.SP1.jar" sourcepath="/M2_REPO/org/jboss/man/jboss-managed/2.1.0.SP1/jboss-managed-2.1.0.SP1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.1.CR1/jboss-managed-2.1.1.CR1.jar" sourcepath="/M2_REPO/org/jboss/man/jboss-managed/2.1.1.CR1/jboss-managed-2.1.1.CR1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/mx/jboss-mbeans/6.0.0.Beta1/jboss-mbeans-6.0.0.Beta1.jar" sourcepath="M2_REPO/org/jboss/mx/jboss-mbeans/6.0.0.Beta1/jboss-mbeans-6.0.0.Beta1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.CR16/jboss-metadata-1.0.0.CR16.jar" sourcepath="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.CR16/jboss-metadata-1.0.0.CR16-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar" sourcepath="/M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.1.CR1/jboss-metatype-2.1.1.CR1.jar" sourcepath="/M2_REPO/org/jboss/man/jboss-metatype/2.1.1.CR1/jboss-metatype-2.1.1.CR1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar" sourcepath="/M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.CR4/jboss-profileservice-spi-5.1.0.CR4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.SP1/jboss-profileservice-spi-5.1.0.SP1.jar" sourcepath="/M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.SP1/jboss-profileservice-spi-5.1.0.SP1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.0.SP2/jboss-remoting-2.5.0.SP2.jar" sourcepath="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.0.SP2/jboss-remoting-2.5.0.SP2-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.1.GA/jboss-remoting-aspects-1.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.1.GA/jboss-remoting-aspects-1.0.1.GA-sources.jar"/>
@@ -100,7 +100,7 @@
 	<classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA-sources.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar" sourcepath="/M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.CR4/jboss-transaction-spi-5.1.0.CR4-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.SP1/jboss-transaction-spi-5.1.0.SP1.jar" sourcepath="/M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.SP1/jboss-transaction-spi-5.1.0.SP1-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.0.GA/jboss-vfs-2.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.1.0.GA/jboss-vfs-2.1.0.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx/2.1.0.20090318/jbosssx-2.1.0.20090318.jar" sourcepath="M2_REPO/org/jboss/security/jbosssx/2.1.0.20090318/jbosssx-2.1.0.20090318-sources.jar"/>

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/DelegatingComponentDispatcherImpl.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/DelegatingComponentDispatcherImpl.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/DelegatingComponentDispatcherImpl.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -21,10 +21,15 @@
  */
 package org.jboss.profileservice.management;
 
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.spi.management.ContextStateMapper;
 import org.jboss.deployers.spi.management.DelegatingComponentDispatcher;
 import org.jboss.deployers.spi.management.RuntimeComponentDispatcher;
 import org.jboss.managed.api.ManagedOperation;
 import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.RunState;
 import org.jboss.metatype.api.values.MetaValue;
 
 /**
@@ -39,9 +44,30 @@
    implements DelegatingComponentDispatcher
 {
   
+   /** The state mappings. */
+   private static final ContextStateMapper<RunState> runStateMapper;
+   
    private RuntimeComponentDispatcher dispatcher;
    private ProxyRegistry registry;
 
+   static
+   {
+      // Set default run state mappings for mc beans/mbeans
+      Map<String, RunState> runStateMappings = new HashMap<String, RunState>();
+      runStateMappings.put("**ERROR**", RunState.FAILED);
+      runStateMappings.put("Not Installed", RunState.STOPPED);
+      runStateMappings.put("PreInstall", RunState.STOPPED);
+      runStateMappings.put("Described", RunState.STOPPED);
+      runStateMappings.put("Instantiated", RunState.STOPPED);
+      runStateMappings.put("Configured", RunState.STOPPED);
+      runStateMappings.put("Create", RunState.STOPPED);
+      runStateMappings.put("Start", RunState.STOPPED);
+      runStateMappings.put("Installed", RunState.RUNNING);
+
+      runStateMapper = new ContextStateMapper<RunState>(runStateMappings,
+            RunState.STARTING, RunState.STOPPED, RunState.FAILED, RunState.UNKNOWN);
+   }
+   
    public DelegatingComponentDispatcherImpl(ProxyRegistry registry, RuntimeComponentDispatcher dispatcher)
    {
       this.registry = registry;
@@ -70,6 +96,17 @@
       }
       return result; 
    }
+   
+   public RunState updateRunState(Object componentName)
+   {
+      RunState state = RunState.UNKNOWN;
+      try
+      {
+         state = dispatcher.mapControllerState(componentName, runStateMapper);
+      }
+      catch(Exception ignore) { }
+      return state;
+   }
 
    public static interface ProxyRegistry
    {

Copied: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedComponentDelegate.java (from rev 90277, trunk/profileservice/src/main/org/jboss/profileservice/management/ManagedComponentDelegate.java)
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedComponentDelegate.java	                        (rev 0)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedComponentDelegate.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.profileservice.management;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.deployers.spi.management.DelegatingComponentDispatcher;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedCommon;
+import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.MutableManagedComponent;
+import org.jboss.managed.api.RunState;
+
+/**
+ * A ManagedComponent used to proxy and dispatch the RunState on request.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ManagedComponentDelegate implements MutableManagedComponent
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;   
+   private Object componentName;
+   private MutableManagedComponent delegate;
+   private DelegatingComponentDispatcher dispatcher;
+   
+   public ManagedComponentDelegate(Object componentName, MutableManagedComponent delegate, DelegatingComponentDispatcher dispatcher)
+   {
+      this.componentName = componentName;
+      this.delegate = delegate;
+      this.dispatcher = dispatcher;
+   }
+   
+   public Map<String, Annotation> getAnnotations()
+   {
+      return delegate.getAnnotations();
+   }
+
+   public ManagedDeployment getDeployment()
+   {
+      return delegate.getDeployment();
+   }
+
+   public RunState getRunState()
+   {
+      return dispatcher.updateRunState(componentName);
+   }
+
+   public void setRunState(RunState runState)
+   {
+      delegate.setRunState(runState);
+   }
+   
+   public ComponentType getType()
+   {
+      return delegate.getType();
+   }
+
+   public boolean update()
+   {
+      return delegate.update();
+   }
+
+   public String getAttachmentName()
+   {
+      return delegate.getAttachmentName();
+   }
+
+   public Object getComponentName()
+   {
+      return delegate.getComponentName();
+   }
+
+   public String getName()
+   {
+      return delegate.getName();
+   }
+
+   public String getNameType()
+   {
+      return delegate.getNameType();
+   }
+
+   public Set<ManagedOperation> getOperations()
+   {
+      return delegate.getOperations();
+   }
+
+   public void setOperations(Set<ManagedOperation> operations)
+   {
+      delegate.setOperations(operations);
+   }
+   
+   public ManagedCommon getParent()
+   {
+      return delegate.getParent();
+   }
+   
+   public ManagedProperty getProperty(String name)
+   {
+      return delegate.getProperty(name);
+   }
+   
+   public Map<String, ManagedProperty> getProperties()
+   {
+      return delegate.getProperties();
+   }
+
+   public void setProperties(Map<String, ManagedProperty> properties)
+   {
+      delegate.setProperties(properties);
+   }
+
+   public Set<String> getPropertyNames()
+   {
+      return delegate.getPropertyNames();
+   }
+
+}

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationDelegate.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationDelegate.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationDelegate.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -24,7 +24,6 @@
 import org.jboss.deployers.spi.management.DelegatingComponentDispatcher;
 import org.jboss.managed.api.ManagedOperation;
 import org.jboss.managed.api.ManagedParameter;
-import org.jboss.managed.api.ManagedOperation.Impact;
 import org.jboss.metatype.api.types.MetaType;
 import org.jboss.metatype.api.values.MetaValue;
 
@@ -38,10 +37,10 @@
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = 2031110731596810579L;
+   private long opID;
+   private Object componentName;
    private ManagedOperation delegate;
    private DelegatingComponentDispatcher dispatcherProxy;
-   private Object componentName;
-   private long opID;
 
    public ManagedOperationDelegate(long opID, ManagedOperation delegate, Object componentName,
          DelegatingComponentDispatcher dispatcherProxy)
@@ -61,8 +60,7 @@
 
    public MetaValue invoke(MetaValue... metaValues)
    {
-      MetaValue mvalue = dispatcherProxy.invoke(opID, componentName, delegate.getName(), metaValues);
-      return mvalue;
+      return dispatcherProxy.invoke(opID, componentName, delegate.getName(), metaValues);
    }
 
    public String getDescription()

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedOperationProxyFactory.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -39,6 +39,7 @@
 import org.jboss.deployers.spi.management.RuntimeComponentDispatcher;
 import org.jboss.managed.api.ManagedOperation;
 import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.MutableManagedComponent;
 import org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.ProxyRegistry;
 import org.jboss.remoting.InvokerLocator;
 
@@ -55,10 +56,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;
@@ -148,6 +149,20 @@
    }
 
    /**
+    * Create a delegating managed component.
+    * 
+    * @param comp the managed component
+    * @return the delegating managed component
+    */
+   public MutableManagedComponent createComponentProxy(MutableManagedComponent comp)
+   {
+      if(comp.getComponentName() == null)
+         return comp;
+      
+      return new ManagedComponentDelegate(comp.getComponentName(), comp, dispatcherProxy);
+   }
+   
+   /**
     * Create managed operations for runtime components, where the invoke() can
     * be invoked on the client side.
     *

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedPropertyDelegate.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedPropertyDelegate.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagedPropertyDelegate.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -39,18 +39,17 @@
 /**
  * A ManagedProperty delegate used as the target of the ManagedProperty
  * proxies used for runtime managed objects statistics.
+ * 
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
 public class ManagedPropertyDelegate implements ManagedProperty
 {
    private final static long serialVersionUID = 1;
+   private long propID;
+   private Object componentName;
    private ManagedProperty delegate;
-   /** The dispatcher handles property get dispatches */
    private DelegatingComponentDispatcher dispatcher;
-   private Object componentName;
-   private long propID;
-
    
    public ManagedPropertyDelegate(long propID, ManagedProperty delegate,
          Object componentName, DelegatingComponentDispatcher dispatcher)
@@ -149,10 +148,7 @@
 
    public MetaValue getValue()
    {
-      String propName = getMappedName();
-      AbstractRuntimeComponentDispatcher.setActiveProperty(delegate);
-      MetaValue propValue = dispatcher.get(propID, componentName, propName);
-      return propValue;
+      return dispatcher.get(propID, componentName, getMappedName());
    }
 
    public Collection<String> getAdminViewUses()
@@ -230,5 +226,4 @@
       delegate.setValue(value);
    }
    
-   
 }

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -100,7 +100,6 @@
 import org.jboss.profileservice.spi.ManagedMBeanDeploymentFactory.MBeanComponent;
 import org.jboss.profileservice.spi.ManagedMBeanDeploymentFactory.MBeanDeployment;
 import org.jboss.system.server.profileservice.attachments.AttachmentStore;
-import org.jboss.system.server.profileservice.repository.AbstractProfileDeployment;
 
 /**
  * The default ManagementView implementation.
@@ -116,7 +115,6 @@
 public class ManagementViewImpl extends AbstractTemplateCreator implements ManagementView
 {
   
-
    /** The logger. */
    private static Logger log = Logger.getLogger(ManagementViewImpl.class);
    private static final String BUNDLE_NAME = "org.jboss.profileservice.management.messages"; //$NON-NLS-1$
@@ -501,11 +499,9 @@
                      ManagedDeployment md = getManagedDeployment(deployment);
                      processRootManagedDeployment(md, key, trace);
 
-                     // TODO update profileservice-spi
                      // Cache the deployment types
                      if(md.getTypes() != null && md.getTypes().isEmpty() == false)
-                        ((AbstractProfileDeployment)deployment)
-                           .addTransientAttachment(KnownDeploymentTypes.class.getName(), md.getTypes());
+                        deployment.addTransientAttachment(KnownDeploymentTypes.class.getName(), md.getTypes());
                   }
                   catch(DeploymentException e)
                   {
@@ -514,9 +510,8 @@
                      ManagedDeployment md = new ManagedDeploymentImpl(deploymentName,
                            deployment.getRoot().getName());
 
-                     // TODO update profileservice-spi
                      // Try to get the cached deployment type
-                     Collection<String> deploymentTypes = (Collection<String>) ((AbstractProfileDeployment)deployment)
+                     Collection<String> deploymentTypes = (Collection<String>) deployment
                            .getTransientAttachment(KnownDeploymentTypes.class.getName());
 
                      if(deploymentTypes != null)
@@ -654,8 +649,6 @@
       throws Exception
    {
       String key = mo.getName() + "/" + mo.getNameType();
-      if(mo.getName().equals("org.jboss.security.plugins.SecurityConfig"))
-         log.info("Saw SecurityConfig MO");
       log.debug("ID for ManagedObject: "+key+", attachmentName: "+mo.getAttachmentName());
 
       // See if this is a runtime ManagedObject
@@ -749,7 +742,11 @@
       if (mc != null && md.getComponent(mo.getName()) == null)
       {
          ComponentType type = new ComponentType(mc.type(), mc.subtype());
-         ManagedComponentImpl comp = new TempManagedComponentImpl(type, md, mo);
+         MutableManagedComponent comp = new ManagedComponentImpl(type, md, mo);
+         
+         if(mo.getTransientAttachment(MBeanRuntimeComponentDispatcher.class.getName()) == null)
+            comp = this.proxyFactory.createComponentProxy(comp);
+         
          md.addComponent(mo.getName(), comp);
          log.debug("Processing ManagementComponent("+mo.getName()+"): "+comp);
          Set<ManagedComponent> typeComps = compByCompType.get(type);
@@ -1288,7 +1285,8 @@
       {
          Map<String, ManagedProperty> props = comp.getProperties();
          Set<ManagedOperation> ops = comp.getOperations();
-         log.debug("Component"
+         if(log.isTraceEnabled())
+            log.trace("Component"
                +"(ops.size="
                +ops != null ? ops.size() : 0
                +",props.size=)"
@@ -1312,7 +1310,8 @@
       }
       if(matched.size() > 0)
       {
-         log.debug("getComponents matched: "+matched);
+         if(log.isTraceEnabled())
+            log.trace("getComponents matched: "+matched);
       }
       return matched;
    }
@@ -1332,7 +1331,8 @@
       // Make sure to return a copy to avoid call by reference uses modifying the template values
       DeploymentTemplateInfo info = template.getInfo();
       info = info.copy();
-      log.debug("getTemplate, "+info);
+      if(log.isTraceEnabled())
+         log.trace("getTemplate, "+info);
       return info;
    }
 
@@ -1627,9 +1627,11 @@
          ops = new HashSet<ManagedOperation>(moOps);
       }
 
+      boolean trace = log.isTraceEnabled();
       if (runtimeProps != null && runtimeProps.size() > 0)
       {
-         log.debug("Properties before:"+props);
+         if(trace)
+            log.trace("Properties before:"+props);
          // We need to pull the runtime values for stats
          for(ManagedProperty prop : runtimeProps.values())
          {
@@ -1659,14 +1661,17 @@
                prop.setTargetManagedObject(runtimeMO);
          }
 
-         log.debug("Properties after:"+props);
+         if(trace)
+            log.trace("Properties after:"+props);
       }
       if (runtimeOps != null && runtimeOps.size() > 0)
       {
-         log.debug("Ops before:"+ops);
+         if(trace)
+            log.trace("Ops before:"+ops);
          runtimeOps = createOperationProxies(runtimeMO, runtimeOps);
          ops.addAll(runtimeOps);
-         log.debug("Ops after:"+ops);
+         if(trace)
+            log.trace("Ops after:"+ops);
       }
 
       MutableManagedObject moi = (MutableManagedObject) mo;

Deleted: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/TempManagedComponentImpl.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/TempManagedComponentImpl.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/TempManagedComponentImpl.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */ 
-package org.jboss.profileservice.management;
-
-import java.io.ObjectStreamException;
-
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedCommon;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.RunStateMapper;
-import org.jboss.managed.plugins.ManagedComponentImpl;
-
-/**
- * Temp managed component impl where getParent points to the defining
- * ManagedObject.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class TempManagedComponentImpl extends ManagedComponentImpl
-{
-   private static final long serialVersionUID = 1;
-   
-   public TempManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo)
-   {
-      this(type, owner, mo, null);
-   }
-   public TempManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo,
-         RunStateMapper stateMapper)
-   {
-      super(type, owner, mo, stateMapper);
-   }
-
-   @Override
-   public ManagedCommon getParent()
-   {
-      return getDelegate();
-   }
-
-   private Object writeReplace() throws ObjectStreamException
-   {
-      // Only expose the ManagedComponentImpl
-      ManagedComponentImpl comp = new ManagedComponentImpl(getType(), getDeployment(), getDelegate(), getStateMapper()); 
-      comp.setRunState(getRunState());
-      return comp;
-   }
-}

Modified: branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
===================================================================
--- branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -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/dml-log-service-integration/security/src/main/org/jboss/security/jndi/JndiLoginInitialContextFactory.java
===================================================================
--- branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/JndiLoginInitialContextFactory.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/JndiLoginInitialContextFactory.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -102,7 +102,7 @@
       }
       else
       {
-         SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials);
+         SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials, null);
       }
       // Now return the context using the standard jnp naming context factory
       Context iniCtx = super.getInitialContext(env);

Modified: branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/SecurityAssociationActions.java
===================================================================
--- branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/SecurityAssociationActions.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/security/src/main/org/jboss/security/jndi/SecurityAssociationActions.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -27,6 +27,9 @@
 
 import javax.security.auth.Subject;
 import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+import org.jboss.security.SecurityContextFactory;
 
 /** A PrivilegedAction implementation for setting the SecurityAssociation
  * principal and credential
@@ -36,81 +39,146 @@
  */
 class SecurityAssociationActions
 {
-   private static class SetPrincipalInfoStackAction implements PrivilegedAction
+   private static class SetPrincipalInfoAction implements PrivilegedAction<Object>
    {
       Principal principal;
       Object credential;
       Subject subject;
-      SetPrincipalInfoStackAction(Principal principal, Object credential, Subject subject)
+      SetPrincipalInfoAction(Principal principal, Object credential, Subject subject)
       {
          this.principal = principal;
          this.credential = credential;
          this.subject = subject;
       }
+      
+      @SuppressWarnings("deprecation")
       public Object run()
       {
-         SecurityAssociation.pushSubjectContext(subject, principal, credential);
+         //Client Side usage
+         if(!getServer())
+         {
+            SecurityAssociation.pushSubjectContext(subject, principal, credential);
+         }
+         
+         //Always create a new security context
+         SecurityContext sc = null;
+         try
+         {
+            sc = SecurityContextFactory.createSecurityContext(principal, 
+                                                credential, subject, "CLIENT_LOGIN_MODULE");
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }          
+         setSecurityContext(sc); 
+         
          credential = null;
          principal = null;
          subject = null;
          return null;
       }
    }
-
-   private static class SetPrincipalInfoAction implements PrivilegedAction
+   private static class PopPrincipalInfoAction implements PrivilegedAction<Object>
    {
-      Principal principal;
-      Object credential;
-      SetPrincipalInfoAction(Principal principal, Object credential)
-      {
-         this.principal = principal;
-         this.credential = credential;
-      }
+      @SuppressWarnings("deprecation")
       public Object run()
       {
-         SecurityAssociation.setCredential(credential);
-         credential = null;
-         SecurityAssociation.setPrincipal(principal);
-         principal = null;
+         if(!getServer())
+           SecurityAssociation.popSubjectContext(); 
          return null;
       }
    }
-   private static class PopPrincipalInfoAction implements PrivilegedAction
-   {
-      public Object run()
-      {
-         SecurityAssociation.popSubjectContext();
-         return null;
-      }
-   }
 
-   private static class GetTCLAction implements PrivilegedAction
+   private static class GetTCLAction implements PrivilegedAction<Object>
    {
-      static PrivilegedAction ACTION = new GetTCLAction();
+      static PrivilegedAction<Object> ACTION = new GetTCLAction();
       public Object run()
       {
          ClassLoader loader = Thread.currentThread().getContextClassLoader();
          return loader;
       }
    }
-
-   private static class SetServerAction implements PrivilegedAction
+   private static class SetServerAction implements PrivilegedAction<Object>
    {
-      static PrivilegedAction ACTION = new SetServerAction();
+      static PrivilegedAction<Object> ACTION = new SetServerAction();
       public Object run()
       {
          SecurityAssociation.setServer();
          return null;
       }
    }
-   static void setPrincipalInfo(Principal principal, Object credential)
+
+   static void setSecurityContext(final SecurityContext sc)
    {
-      SetPrincipalInfoAction action = new SetPrincipalInfoAction(principal, credential);
-      AccessController.doPrivileged(action);
+      AccessController.doPrivileged(new PrivilegedAction<Object>()
+      { 
+         public Object run()
+         {
+            SecurityContextAssociation.setSecurityContext(sc); 
+            return null;
+         }
+      });
    }
+   
+   static SecurityContext getSecurityContext()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<SecurityContext>()
+      { 
+         public SecurityContext run()
+         {
+            return SecurityContextAssociation.getSecurityContext(); 
+         }
+      });
+   }
+   
+   static void pushSecurityContext(final Principal p, final Object cred, 
+         final Subject subject, final String securityDomain)
+   {
+      AccessController.doPrivileged(new PrivilegedAction<Object>()
+      { 
+         @SuppressWarnings("deprecation")
+         public Object run()
+         {
+            SecurityContext sc;
+            try
+            {
+               sc = SecurityContextFactory.createSecurityContext(p, cred, 
+                     subject, securityDomain);
+            }
+            catch (Exception e)
+            {
+               throw new RuntimeException(e);
+            }
+            setSecurityContext(sc);
+            //For Client Side legacy usage
+            if(getServer() == Boolean.FALSE)
+            {
+               SecurityAssociation.pushSubjectContext(subject, p, cred);
+            }
+            return null;
+         }
+      });
+   }
+   static Boolean getServer()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<Boolean>()
+      {
+         public Boolean run()
+         {
+            return SecurityAssociation.isServer();
+         }
+      });
+   }
+   
+   static void setServer()
+   {
+      AccessController.doPrivileged(SetServerAction.ACTION);
+   }
+
    static void setPrincipalInfo(Principal principal, Object credential, Subject subject)
    {
-      SetPrincipalInfoStackAction action = new SetPrincipalInfoStackAction(principal, credential, subject);
+      SetPrincipalInfoAction action = new SetPrincipalInfoAction(principal, credential, subject);
       AccessController.doPrivileged(action);
    }
    static void popPrincipalInfo()
@@ -119,10 +187,6 @@
       AccessController.doPrivileged(action);
    }
 
-   static void setServer()
-   {
-      AccessController.doPrivileged(SetServerAction.ACTION);
-   }
    static ClassLoader getContextClassLoader()
    {
       ClassLoader loader = (ClassLoader) AccessController.doPrivileged(GetTCLAction.ACTION);

Modified: branches/dml-log-service-integration/server/src/etc/conf/all/jboss-log4j.xml
===================================================================
--- branches/dml-log-service-integration/server/src/etc/conf/all/jboss-log4j.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/server/src/etc/conf/all/jboss-log4j.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -174,19 +174,64 @@
    
    <!-- =============================================== -->
    <!-- Limit categories                                -->
-   <!-- After enabling "trace" at root logger level,    -->
-   <!-- also enable "trace" for the limit category      -->
+   <!-- if enabling "trace" at root logger level,       -->
+   <!-- use limit category settings to disable trace    -->
+   <!-- for packages that you don't want to trace       -->
    <!-- =============================================== -->
 
-   <category name="org.jboss.web">
-     <priority value="INFO" />
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
    </category>
-
-   <category name="com.arjuna">
-     <priority value="INFO" />
+   
+   <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+   <category name="jacorb">
+      <priority value="WARN"/>
    </category>
+   
+   <!-- Set the logging level of the JSF implementation that uses
+      | java.util.logging. The jdk logging levels can be controlled
+      | through the org.jboss.logging.log4j.JDKLevel class that
+      | in addition to the standard log4j levels it adds support for
+      | SEVERE, WARNING, CONFIG, FINE, FINER, FINEST
+   -->
+   <category name="javax.enterprise.resource.webcontainer.jsf">
+     <priority value="INFO" class="org.jboss.logging.log4j.JDKLevel"/>
+   </category>
+   
+   <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+   <category name="org.jgroups">
+      <priority value="WARN"/>
+   </category>
+   
+   <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
+   <category name="org.quartz">
+      <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit the com.sun category to INFO as its FINE is verbose -->
+   <category name="com.sun">
+      <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit the sun category to INFO as its FINE is verbose -->
+   <category name="sun">
+      <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
+   <category name="javax.xml.bind">
+      <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit JBoss categories
+   <category name="org.jboss">
+      <priority value="INFO"/>
+   </category>
+   -->
 
-   <category name="org.hibernate">
+   <!-- Or limit individual JBoss categories
+   <category name="org.jboss.web">
      <priority value="INFO" />
    </category>
 
@@ -318,10 +363,6 @@
      <priority value="INFO" />
    </category>
 
-   <category name="org.ajax4jsf">
-     <priority value="INFO" />
-   </category>
-
    <category name="org.jboss.ejb">
      <priority value="INFO" />
    </category>
@@ -393,91 +434,60 @@
    <category name="org.jboss.managed">
      <priority value="INFO" />
    </category>
+   -->
 
-   <category name="org.ajax4jsf">
+   <!-- Limit Arjuna transaction manager
+   <category name="com.arjuna">
      <priority value="INFO" />
    </category>
+   -->
 
-   <category name="org.jnp">
+   <!-- Limit Hibernate 
+   <category name="org.hibernate">
      <priority value="INFO" />
    </category>
-   
-   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
-   <category name="org.apache">
-      <priority value="INFO"/>
-   </category>
-   
-   <!-- Limit the jacorb category to WARN as its INFO is verbose -->
-   <category name="jacorb">
-      <priority value="WARN"/>
-   </category>
-   
-   <!-- Set the logging level of the JSF implementation that uses
-      | java.util.logging. The jdk logging levels can be controlled
-      | through the org.jboss.logging.log4j.JDKLevel class that
-      | in addition to the standard log4j levels it adds support for
-      | SEVERE, WARNING, CONFIG, FINE, FINER, FINEST
    -->
-   <category name="javax.enterprise.resource.webcontainer.jsf">
-     <priority value="INFO" class="org.jboss.logging.log4j.JDKLevel"/>
+
+   <!-- Limit Ajax4jsf
+   <category name="org.ajax4jsf">
+     <priority value="INFO" />
    </category>
-   
-   <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
-   <category name="org.jgroups">
-      <priority value="WARN"/>
-   </category>
-   
-   <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
-   <category name="org.quartz">
-      <priority value="INFO"/>
-   </category>
-   
-   <!-- Limit the com.sun category to INFO as its FINE is verbose -->
-   <category name="com.sun">
-      <priority value="INFO"/>
-   </category>
-   
-   <!-- Limit the sun category to INFO as its FINE is verbose -->
-   <category name="sun">
-      <priority value="INFO"/>
-   </category>
-   
-   <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
-   <category name="javax.xml.bind">
-      <priority value="INFO"/>
-   </category>
-   
-   <!-- Limit JBoss categories
-   <category name="org.jboss">
-      <priority value="INFO"/>
-   </category>
    -->
 
+   <!-- Limit JNP
+   <category name="org.jnp">
+     <priority value="INFO" />
+   </category>
+  -->  
+
+
    <!-- Limit the JSR77 categories -->
    <category name="org.jboss.management">
       <priority value="INFO"/>
    </category>
 
-   <!-- Limit the verbose facelets compiler -->
+   <!-- Limit the verbose facelets compiler 
    <category name="facelets.compiler">
       <priority value="WARN"/>
    </category>
+   -->
    
-   <!-- Limit the verbose ajax4jsf cache initialization -->
+   <!-- Limit the verbose ajax4jsf cache initialization
    <category name="org.ajax4jsf.cache">
       <priority value="WARN"/>
    </category>
-   
-   <!-- Limit the verbose embedded jopr categories -->
+   -->
+   <!-- Limit the verbose embedded jopr categories
    <category name="org.rhq">
       <priority value="WARN"/>
    </category>
-   
-   <!-- Limit the verbose seam categories -->
+   -->
+   <!-- Limit the verbose seam categories
    <category name="org.jboss.seam">
       <priority value="WARN"/>
    </category>
-   
+   -->
+
    <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
    <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
      <priority value="TRACE"/>

Modified: branches/dml-log-service-integration/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- branches/dml-log-service-integration/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -58,7 +58,7 @@
     */
    public boolean accepts(VirtualFile file)
    {
-      String pathName = file.getPathName();
+      String pathName = getPathName(file);
       for (Map.Entry<String, Set<String>> entry : excludes.entrySet())
       {
          String key = entry.getKey();
@@ -77,4 +77,24 @@
       }
       return true;
    }
+   
+   /**
+    * Get the path name for the VirtualFile.
+    * 
+    * @param file the virtual file
+    * @return the path name
+    */
+   private String getPathName(VirtualFile file)
+   {
+      try
+      {
+         // prefer the URI, as the pathName might
+         // return an empty string for temp virtual files
+         return file.toURI().toString();
+      }
+      catch(Exception e)
+      {
+         return file.getPathName();
+      }
+   }
 }
\ No newline at end of file

Modified: branches/dml-log-service-integration/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java
===================================================================
--- branches/dml-log-service-integration/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/system/src/main/org/jboss/deployers/plugins/managed/TypedManagedDeploymentCreator.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -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.ManagementConstants;
 import org.jboss.managed.api.annotation.ManagementDeployment;
 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)

Deleted: branches/dml-log-service-integration/system/src/main/org/jboss/system/server/profileservice/persistence/MOCreatorPlugin.java
===================================================================
--- branches/dml-log-service-integration/system/src/main/org/jboss/system/server/profileservice/persistence/MOCreatorPlugin.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/system/src/main/org/jboss/system/server/profileservice/persistence/MOCreatorPlugin.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */ 
-package org.jboss.system.server.profileservice.persistence;
-
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
-import org.jboss.metadata.spi.MetaData;
-
-/**
- * ManagedObject creator plugin.
- * 
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class MOCreatorPlugin
-{
-
-   /** The classloader. */
-   private ClassLoader loader;
-   
-   /** The managed object factory. */
-   private ManagedObjectFactory managedObjectFactory;
-   
-   public MOCreatorPlugin()
-   {
-      this.managedObjectFactory = ManagedObjectFactoryBuilder.create();
-   }
-   
-   public MOCreatorPlugin(ManagedObjectFactory managedObjectFactory)
-   {
-      this.managedObjectFactory = managedObjectFactory;
-   }
-   
-   public ManagedObjectFactory getMOF()
-   {
-      return managedObjectFactory;
-   }
-   
-   public void setMOF(ManagedObjectFactory managedObjectFactory)
-   {
-      this.managedObjectFactory = managedObjectFactory;
-   }
-   
-   public ClassLoader getClassLoader()
-   {
-      if(this.loader == null)
-         return Thread.currentThread().getContextClassLoader();
-      return this.loader;
-   }
-   
-   public void setClassLoader(ClassLoader classLoader)
-   {
-      this.loader = classLoader;
-   }
-   
-   public ManagedObject createManagedObject(String clazz, MetaData metaData) throws Exception
-   {
-      return getMOF().createManagedObject(createManagedObjectClass(clazz), metaData);
-   }
-   
-   public ManagedObject initManagedObject(Object o, MetaData metaData) throws Exception
-   {
-      return getMOF().initManagedObject(o, metaData);
-   }
-   
-   protected Class<?> createManagedObjectClass(String clazz) throws Exception
-   {
-      return getClassLoader().loadClass(clazz);
-   }
-   
-}
-

Modified: branches/dml-log-service-integration/testsuite/.classpath
===================================================================
--- branches/dml-log-service-integration/testsuite/.classpath	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/.classpath	2009-06-17 03:46:51 UTC (rev 90279)
@@ -68,7 +68,7 @@
    <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.CR4/jboss-classloading-spi-5.1.0.CR4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.CR4/jboss-classloading-spi-5.1.0.CR4-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.CR4/jboss-deployment-spi-5.1.0.CR4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.CR4/jboss-deployment-spi-5.1.0.CR4-sources.jar"/>
-   <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.CR4/jboss-profileservice-spi-5.1.0.CR4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.CR4/jboss-profileservice-spi-5.1.0.CR4-sources.jar"/>
+   <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.CR4/jboss-transaction-spi-5.1.0.CR4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.CR4/jboss-transaction-spi-5.1.0.CR4-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA-sources.jar"/>

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JChannelFactoryUnitTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JChannelFactoryUnitTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JChannelFactoryUnitTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -158,15 +158,19 @@
       
       channel3 = factory1.createMultiplexerChannel("unshared1", "test");
       assertFalse(channel3 instanceof MuxChannel);
-      channel3.connect("test");
+      // JBAS-7015 use unique name
+      //channel3.connect("test");
+      channel3.connect("test3");
       TP tp3 = getTP((JChannel) channel3);
       
-      assertNotSame(tp1, tp3);
+      //JBAS-7015 -- change assert
+      //assertNotSame(tp1, tp3);
+      assertSame(tp1, tp3);
       assertNotSame(tp2, tp3);
       
       channel4 = factory1.createMultiplexerChannel("unshared1", "test2");
       assertFalse(channel4 instanceof MuxChannel);
-      channel4.connect("test2");
+      channel4.connect("test4");
       TP tp4 = getTP((JChannel) channel4);
       
       assertSame(tp3, tp4);

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/PreferredMasterElectionPolicyUnitTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -163,11 +163,24 @@
 
    public void testUnknownHost() throws Exception
    {
+      String bogusHost = "onceuponatimeinalandfarfarawaylivedamancalledgalder";
       try
       {
-         this.policy.setPreferredMaster("onceuponatimeinalandfarfarawaylivedamancalledgalder:1199");
+         this.policy.setPreferredMaster(bogusHost + ":1199");
          
-         Assert.fail("IllegalArgumentException expected");
+         // If the test env has a "helpful" DNS returns the address of some
+         // ISP web page, this test might fail. Check for and ignore that
+         // condition
+         try
+         {
+            InetAddress addr = InetAddress.getByName(bogusHost);
+            if (addr == null)
+            {
+               // Nope. It didn't resolve so there is a real problem
+               Assert.fail("IllegalArgumentException expected");
+            }
+         }
+         catch (UnknownHostException ignored) {}
       }
       catch (IllegalArgumentException e)
       {

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/PersistedDataSourceUnitTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -66,8 +66,6 @@
          
          property = mc.getProperty("max-pool-size");
          assertEquals("max-pool-size: "+ property.getValue(), SimpleValueSupport.wrap(34), property.getValue());
-         RunState state = mc.getRunState();
-         assertEquals(RunState.RUNNING, state);
 
          // This should work too
          ManagedComponent comp = getManagedComponent(mgtView, "ChangedDsJNDIName");
@@ -76,6 +74,9 @@
          ManagedComponent mc2 = getManagedComponent(mgtView, "ProfileServiceTestDS");
          assertNull(mc2);
          
+         // Check run state
+         assertEquals("DS is running", RunState.RUNNING, mc.getRunState());
+         
       }
       catch(Exception e)
       {

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/persistenceformat/test/ServiceBindingMgrPersistenceFormatTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/persistenceformat/test/ServiceBindingMgrPersistenceFormatTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/persistenceformat/test/ServiceBindingMgrPersistenceFormatTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -34,13 +34,13 @@
 import org.jboss.kernel.spi.deployment.KernelDeployment;
 import org.jboss.managed.api.ManagedComponent;
 import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.plugins.ManagedComponentImpl;
 import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
 import org.jboss.metatype.api.values.CollectionValue;
 import org.jboss.metatype.api.values.MapCompositeValueSupport;
 import org.jboss.metatype.api.values.MetaValue;
 import org.jboss.metatype.api.values.SimpleValue;
 import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.profileservice.management.TempManagedComponentImpl;
 import org.jboss.services.binding.ServiceBindingManager;
 import org.jboss.system.server.profileservice.persistence.xml.PersistenceRoot;
 import org.jboss.xb.binding.Unmarshaller;
@@ -120,7 +120,7 @@
       setPortValue("HttpsConnector", bindingSets, 13245);
 
       // Persist
-      ManagedComponent component = new TempManagedComponentImpl(null, null, mo);
+      ManagedComponent component = new ManagedComponentImpl(null, null, mo);
       PersistenceRoot root = getPersistenceFactory().updateComponent(deploymentMO, component);
       root.setClassName(AbstractKernelDeployment.class.getName());
       root = restore(root);

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/AbstractProfileServiceTest.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -35,6 +35,7 @@
 import org.jboss.managed.api.DeploymentTemplateInfo;
 import org.jboss.managed.api.ManagedComponent;
 import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ViewUse;
 import org.jboss.metatype.api.values.MetaValue;
 import org.jboss.metatype.api.values.MetaValueFactory;
 import org.jboss.profileservice.spi.ProfileKey;
@@ -132,6 +133,7 @@
       for(String propName : propValues.keySet())
       {
          ManagedProperty prop = props.get(propName);
+         assertTrue(prop.getName(), prop.hasViewUse(ViewUse.CONFIGURATION));
          log.debug("createComponentTest("+propName+") before: "+prop.getValue());
          assertNotNull("property " + propName + " found in template " + templateName, prop);
          prop.setValue(propValues.get(propName));
@@ -143,7 +145,7 @@
          prop.setRemoved(true);
          log.debug("removed property: "+propName);
       }
-
+      
       mgtView.applyTemplate(deploymentName, info);
       if(processChanges)
       {

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -233,16 +233,16 @@
    {
       ManagedComponent component = getManagementView().getComponent("testCreateQueue", QueueType);
       assertEquals(RunState.RUNNING, component.getRunState());
+      // Stop
       ManagedOperation o = getOperation(component, "stop", new String[0]);
       o.invoke(new MetaValue[0]);
-      
-      // TODO this should not require a reload?
-      getManagementView().reload();
-      
-      component = getManagementView().getComponent("testCreateQueue", QueueType);
+      // Check runState dispatching
       assertEquals(RunState.STOPPED, component.getRunState());
+      // Start
       o = getOperation(component, "start", new String[0]);
       o.invoke(new MetaValue[0]);
+      //
+      assertEquals(RunState.RUNNING, component.getRunState());
    }
 
    public void testMultipleQueues() throws Exception

Modified: branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2009-06-17 03:46:51 UTC (rev 90279)
@@ -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);

Modified: branches/dml-log-service-integration/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-jboss-beans.xml
===================================================================
--- branches/dml-log-service-integration/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-jboss-beans.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-jboss-beans.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -5,19 +5,18 @@
    <!-- Don't inject the real AS thread pool, as it has a classloader
          leak and we don't want to leak this classloader to it
     -->
-    <bean name="PassExpThreadPool" class="org.jboss.util.threadpool.BasicThreadPool">
-        <constructor>
-           <parameter>PassExpThreadPool</parameter>
-           <parameter>
-              <bean name="PassExpThreadGroup" class="java.lang.ThreadGroup">
-                 <constructor>
-                    <parameter>PassExpThreadGroup</parameter>
-                 </constructor>
-              </bean>
-           </parameter>
-        </constructor>
-    </bean>
+   <threads xmlns="urn:jboss:threads:1.0">
+        <thread-group name="PassExpThreadFactoryGroup" group-name="PassExp Threads"/>
+        <thread-factory name="PassExpThreadFactory" group="PassExpThreadFactoryGroup"/>
 
+        <thread-pool-executor name="PassExpThreadPool" thread-factory="PassExpThreadFactory" queue-length="1000">
+            <core-pool-size count="2" per-cpu="2"/>
+            <max-pool-size count="5" per-cpu="3"/>
+            <keepalive-time time="1" unit="seconds"/>
+            <reject-policy name="block"/>
+        </thread-pool-executor>
+    </threads>
+
    <!-- Add a stack with JGroups message bundling disabled to the app server's standard JChannelFactory -->
    <bean name="PassExpStackInjector" class="java.lang.Object">      
       <install bean="JChannelFactory" method="setMultiplexerConfig">

Modified: branches/dml-log-service-integration/testsuite/src/resources/cluster/partition/partition-restart-jboss-beans.xml
===================================================================
--- branches/dml-log-service-integration/testsuite/src/resources/cluster/partition/partition-restart-jboss-beans.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/testsuite/src/resources/cluster/partition/partition-restart-jboss-beans.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -5,18 +5,17 @@
    <!-- Don't inject the real AS thread pool, as it has a classloader
          leak and we don't want to leak this classloader to it
     -->
-    <bean name="RestartPartitionThreadPool" class="org.jboss.util.threadpool.BasicThreadPool">
-              <constructor>
-                 <parameter>RestartPartitionThreadPool</parameter>
-                 <parameter>
-                    <bean name="RestartPartitionThreadGroup" class="java.lang.ThreadGroup">
-                       <constructor>
-                          <parameter>RestartPartitionThreadGroup</parameter>
-                       </constructor>
-                    </bean>
-                 </parameter>
-              </constructor>
-    </bean>
+   <threads xmlns="urn:jboss:threads:1.0">
+        <thread-group name="RestartPartitionThreadFactoryGroup" group-name="RestartPartition Threads"/>
+        <thread-factory name="RestartPartitionThreadFactory" group="RestartPartitionThreadFactoryGroup"/>
+
+        <thread-pool-executor name="RestartPartitionThreadPool" thread-factory="RestartPartitionThreadFactory" queue-length="1000">
+            <core-pool-size count="2" per-cpu="2"/>
+            <max-pool-size count="5" per-cpu="3"/>
+            <keepalive-time time="1" unit="seconds"/>
+            <reject-policy name="block"/>
+        </thread-pool-executor>
+    </threads>
    
    <!-- 
         The HAPartitionCache instance defined here is shared by JBoss cluster services that

Modified: branches/dml-log-service-integration/thirdparty/pom.xml
===================================================================
--- branches/dml-log-service-integration/thirdparty/pom.xml	2009-06-17 03:46:11 UTC (rev 90278)
+++ branches/dml-log-service-integration/thirdparty/pom.xml	2009-06-17 03:46:51 UTC (rev 90279)
@@ -1317,14 +1317,6 @@
     </dependency>
     <dependency>
       <groupId>jboss.jbossts</groupId>
-      <artifactId>jbossjta</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>jboss.jbossts</groupId>
-      <artifactId>jbossjta-integration</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>jboss.jbossts</groupId>
       <artifactId>jbossts-common</artifactId>
     </dependency>
     <dependency>
@@ -1349,6 +1341,11 @@
       <artifactId>resources</artifactId>
     </dependency>
     <dependency>
+      <groupId>jboss.jbossts</groupId>
+      <artifactId>jbossxts</artifactId>
+      <type>jboss-sar</type>
+    </dependency>
+    <dependency>
       <groupId>org.jboss.jaxr</groupId>
       <artifactId>juddi-saaj</artifactId>
     </dependency>




More information about the jboss-cvs-commits mailing list