[jboss-cvs] JBossAS SVN: r63399 - in trunk/cluster: src/etc and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 7 17:24:09 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-06-07 17:24:09 -0400 (Thu, 07 Jun 2007)
New Revision: 63399
Modified:
trunk/cluster/build.xml
trunk/cluster/src/etc/cluster-beans.xml
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java
trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
trunk/cluster/src/resources/jgroups/multiplexer-beans.xml
Log:
[JBAS-4475]Convert JGroups multiplexer service to a -beans.xml
Modified: trunk/cluster/build.xml
===================================================================
--- trunk/cluster/build.xml 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/build.xml 2007-06-07 21:24:09 UTC (rev 63399)
@@ -273,7 +273,7 @@
<copy todir="${build.resources}/jgroups-multiplexer.sar/META-INF" filtering="yes">
<fileset dir="${source.resources}/jgroups">
<include name="**"/>
- <exclude name="multiplexer-beans.xml"/>
+ <exclude name="jboss-service.xml"/>
</fileset>
</copy>
Modified: trunk/cluster/src/etc/cluster-beans.xml
===================================================================
--- trunk/cluster/src/etc/cluster-beans.xml 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/etc/cluster-beans.xml 2007-06-07 21:24:09 UTC (rev 63399)
@@ -22,7 +22,7 @@
<property name="runtimeConfig">
<bean name="DefaultPartition-HAPartitionCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="jgroups.mux:name=Multiplexer"/></property>
+ <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
</bean>
</property>
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2007-06-07 21:24:09 UTC (rev 63399)
@@ -59,9 +59,10 @@
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.system.server.ServerConfigUtil;
import org.jgroups.Channel;
+import org.jgroups.ChannelFactory;
import org.jgroups.Event;
import org.jgroups.ExtendedMessageListener;
-import org.jgroups.JChannel;
+//import org.jgroups.JChannel;
import org.jgroups.MembershipListener;
import org.jgroups.MergeView;
import org.jgroups.Message;
@@ -71,7 +72,6 @@
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.MethodCall;
import org.jgroups.blocks.RpcDispatcher;
-import org.jgroups.jmx.JChannelFactoryMBean;
import org.jgroups.stack.IpAddress;
import org.jgroups.util.Rsp;
import org.jgroups.util.RspList;
@@ -174,7 +174,7 @@
/** me as a ClusterNode */
protected ClusterNode me = null;
/** The JGroups partition channel */
- protected JChannel channel;
+ protected Channel channel;
/** The cluster replicant manager */
protected DistributedReplicantManager replicantManager;
/** The cluster instance log category */
@@ -202,9 +202,9 @@
// Static --------------------------------------------------------
- private static JChannel createMuxChannel(ClusterPartitionConfig config)
+ private static Channel createMuxChannel(ClusterPartitionConfig config)
{
- JChannelFactoryMBean factory = config.getMultiplexer();
+ ChannelFactory factory = config.getMultiplexer();
if (factory == null)
throw new IllegalStateException("HAPartitionConfig has no JChannelFactory");
String stack = config.getMultiplexerStack();
@@ -212,7 +212,7 @@
throw new IllegalStateException("HAPartitionConfig has no multiplexer stack");
try
{
- return (JChannel) factory.createMultiplexerChannel(stack, config.getPartitionName());
+ return factory.createMultiplexerChannel(stack, config.getPartitionName());
}
catch (RuntimeException e)
{
@@ -1377,7 +1377,7 @@
return Version.description + "( " + Version.cvs + ")";
}
- public JChannelFactoryMBean getMultiplexer()
+ public ChannelFactory getMultiplexer()
{
return config.getMultiplexer();
}
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java 2007-06-07 21:24:09 UTC (rev 63399)
@@ -27,7 +27,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.ha.framework.interfaces.DistributedState;
import org.jboss.system.server.ServerConfigUtil;
-import org.jgroups.jmx.JChannelFactoryMBean;
+import org.jgroups.ChannelFactory;
/**
* Configuration POJO for {@link ClusterPartition}.
@@ -43,7 +43,7 @@
// Attributes ----------------------------------------------------
private Cache cache;
- private JChannelFactoryMBean multiplexer;
+ private ChannelFactory multiplexer;
private DistributedState distributedState;
private String stackName;
private String partitionName = ServerConfigUtil.getDefaultPartitionName();
@@ -139,7 +139,7 @@
this.allow_sync_events = allowSync;
}
- public JChannelFactoryMBean getMultiplexer()
+ public ChannelFactory getMultiplexer()
{
return multiplexer;
}
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java 2007-06-07 21:24:09 UTC (rev 63399)
@@ -30,7 +30,7 @@
import org.jboss.ha.framework.interfaces.DistributedState;
import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.mx.util.ObjectNameFactory;
-import org.jgroups.jmx.JChannelFactoryMBean;
+import org.jgroups.ChannelFactory;
/**
* MBean interface for ClusterPartition. It will start a JGroups
@@ -138,7 +138,7 @@
/**
* Gets the JGroups multiplexer channel factory used by ClusterPartition.
*/
- JChannelFactoryMBean getMultiplexer();
+ ChannelFactory getMultiplexer();
/**
* Used with multiplexer injection, specifies stack to be used (e.g., fc-fast-minimalthreads)
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2007-06-07 21:24:09 UTC (rev 63399)
@@ -50,7 +50,7 @@
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
* @version $Revision$
*/
-public class JChannelFactory extends org.jgroups.jmx.JChannelFactory
+public class JChannelFactory extends org.jgroups.JChannelFactory
{
protected static Logger log = Logger.getLogger(JChannelFactory.class);
Modified: trunk/cluster/src/resources/jgroups/multiplexer-beans.xml
===================================================================
--- trunk/cluster/src/resources/jgroups/multiplexer-beans.xml 2007-06-07 20:08:40 UTC (rev 63398)
+++ trunk/cluster/src/resources/jgroups/multiplexer-beans.xml 2007-06-07 21:24:09 UTC (rev 63399)
@@ -2,18 +2,12 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- An example for setting up the JChannelFactory MBean
- Author: Bela Ban
- Version: $Id: jboss-service.xml 55482 2006-08-10 05:06:17Z bstansberry at jboss.com $
- -->
- <bean name="jgroups.mux:name=Multiplexer" class="org.jboss.ha.framework.server.JChannelFactory">
- <!--bean name="jgroups.mux:name=Multiplexer" class="org.jgroups.jmx.JChannelFactory" -->
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jgroups.mux:name=Multiplexer", exposedInterface=org.jgroups.jmx.JChannelFactoryMBean.class, registerDirectly=true)</annotation>
-
- <property name="domain">jgroups.mux</property>
+ <!-- The pojo ChannelFactory. We use a JBoss AS subclass of the standard
+ JGroups JChannelFactory in order to ensure additional_data is set
+ on any shared channel -->
+ <bean name="JChannelFactory" class="org.jboss.ha.framework.server.JChannelFactory">
+
+ <property name="domain">jboss.jgroups</property>
<property name="multiplexerConfig">META-INF/multiplexer-stacks.xml</property>
<property name="exposeChannels">true</property>
<property name="exposeProtocols">true</property>
@@ -21,6 +15,17 @@
<!-- The address used to determine the node name -->
<property name="nodeAddress">${jboss.bind.address}</property>
+ </bean>
+
+ <!-- The JMX wrapper for the factory -->
+ <bean name="JChannelFactoryJMXWrapper" class="org.jgroups.jmx.JChannelFactory">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jgroups:service=MultiplexerChannelFactory", exposedInterface=org.jgroups.jmx.JChannelFactoryMBean.class, registerDirectly=true)</annotation>
+
+ <constructor>
+ <parameter><inject bean="JChannelFactory"/></parameter>
+ </constructor>
+
</bean>
</deployment>
More information about the jboss-cvs-commits
mailing list