You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gd...@apache.org on 2004/07/17 05:54:13 UTC
cvs commit: incubator-geronimo/sandbox/messaging maven.xml project.xml
gdamour 2004/07/16 20:54:13
Modified: sandbox/messaging project.xml
Added: sandbox/messaging/src/plan
template-leader-clustered-plan.xml
template-system-plan.xml
template-clustered-plan.xml
sandbox/messaging maven.xml
Log:
Adds a goal, namely patch, which can be used to patch the distribution folder with some clustered configurations
to simplify the debugging/testing of this proto.
Revision Changes Path
1.1 incubator-geronimo/sandbox/messaging/src/plan/template-leader-clustered-plan.xml
Index: template-leader-clustered-plan.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is a template plan for the leader node of a cluster. The dynamic tokens
are:
- @clusterInfo@: cluster info as per the ClusterInfoEditor format; and
- @nodeInfo@: node info as per the NodeInfoEditor format.
-->
<configuration
xmlns="http://geronimo.apache.org/xml/ns/deployment"
configId="org/apache/geronimo/LeaderCluster"
>
<dependency>
<uri>concurrent/jars/concurrent-1.3.4.jar</uri>
</dependency>
<dependency>
<uri>geronimo/jars/geronimo-core-1.0-SNAPSHOT.jar</uri>
</dependency>
<dependency>
<uri>geronimo/jars/geronimo-network-1.0-SNAPSHOT.jar</uri>
</dependency>
<dependency>
<uri>geronimo-sandbox/jars/geronimo-sandbox-messaging-1.0-SNAPSHOT.jar</uri>
</dependency>
<gbean name="geronimo.cluster:type=ThreadPool" class="org.apache.geronimo.pool.ThreadPool">
<attribute name="keepAliveTime" type="long">1000</attribute>
<attribute name="poolSize" type="int">10</attribute>
<attribute name="poolName" type="java.lang.String">TP Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=ClockPool" class="org.apache.geronimo.pool.ClockPool">
<attribute name="poolName" type="java.lang.String">CP Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=SelectorManager" class="org.apache.geronimo.network.SelectorManager">
<attribute name="timeout" type="long">500</attribute>
<reference name="ThreadPool">geronimo.cluster:type=ThreadPool</reference>
<attribute name="threadName" type="java.lang.String">SM Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=MessagingTransportFactory" class="org.apache.geronimo.messaging.remotenode.network.NetworkTransportFactory">
<reference name="SelectorManager">geronimo.cluster:type=SelectorManager</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
</gbean>
<gbean name="geronimo.cluster:type=Node" class="org.apache.geronimo.messaging.NodeImpl">
<attribute name="nodeInfo" type="org.apache.geronimo.messaging.NodeInfo">@nodeInfo@</attribute>
<reference name="ThreadPool">geronimo.cluster:type=ThreadPool</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
<reference name="MessagingTransportFactory">geronimo.cluster:type=MessagingTransportFactory</reference>
</gbean>
<gbean name="geronimo.cluster:type=Cluster" class="org.apache.geronimo.messaging.cluster.ClusterImpl">
<attribute name="clusterInfo" type="org.apache.geronimo.messaging.cluster.ClusterInfo">@clusterInfo@</attribute>
<reference name="Node">geronimo.cluster:type=Node</reference>
<attribute name="topologyManager" type="org.apache.geronimo.messaging.cluster.topology.TopologyManager">Ring</attribute>
</gbean>
<gbean name="geronimo.cluster:type=ClusterHBSender" class="org.apache.geronimo.messaging.cluster.ClusterHBSender">
<reference name="Node">geronimo.cluster:type=Node</reference>
<reference name="Cluster">geronimo.cluster:type=Cluster</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
<attribute name="delay" type="long">500</attribute>
</gbean>
<gbean name="geronimo.cluster:type=ClusterHBReceiver" class="org.apache.geronimo.messaging.cluster.ClusterHBReceiver">
<reference name="Cluster">geronimo.cluster:type=Cluster</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
<attribute name="nbMissed" type="int">3</attribute>
</gbean>
</configuration>
1.1 incubator-geronimo/sandbox/messaging/src/plan/template-system-plan.xml
Index: template-system-plan.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Template of the standard org/apache/geronimo/System configuration, except that
the RMI port is a dynamic token, namely @rmiPort@.
-->
<configuration
xmlns="http://geronimo.apache.org/xml/ns/deployment"
configId="org/apache/geronimo/System"
>
<!-- ServerInfo service -->
<gbean name="geronimo.system:role=ServerInfo" class="org.apache.geronimo.system.serverinfo.ServerInfo"/>
<!-- URLFactory service -->
<gbean name="geronimo.system:role=URLFactory" class="org.apache.geronimo.system.url.GeronimoURLFactory"/>
<!-- Configuration Store service -->
<gbean name="geronimo.system:role=ConfigurationStore,type=Local" class="org.apache.geronimo.system.configuration.LocalConfigStore">
<attribute name="root" type="java.net.URI">config-store</attribute>
<reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
</gbean>
<!-- Persistent List of running Configurations service -->
<gbean name="geronimo.boot:role=PersistentConfigurationList" class="org.apache.geronimo.system.configuration.FileConfigurationList">
<reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
<attribute name="configFile" type="java.lang.String">var/config/config.list</attribute>
</gbean>
<!-- Repository -->
<gbean name="geronimo.system:role=Repository" class="org.apache.geronimo.system.repository.ReadOnlyRepository">
<attribute name="root" type="java.net.URI">repository/</attribute>
<reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
</gbean>
<!-- Logging service -->
<gbean name="geronimo.system:role=Logger" class="org.apache.geronimo.system.logging.log4j.Log4jService">
<attribute name="rootLoggerLevel" type="java.lang.String">DEBUG</attribute>
<attribute name="refreshPeriod" type="int">60</attribute>
<attribute name="configurationFile" type="java.lang.String">var/log/log4j.xml</attribute>
<reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
</gbean>
<gbean name="geronimo.system:role=LogAppender,type=ConsoleAppender" class="org.apache.geronimo.system.logging.log4j.appender.ConsoleAppenderService">
<attribute name="threshold" type="java.lang.String">INFO</attribute>
<attribute name="layoutPattern" type="java.lang.String">%d{ABSOLUTE} %-5p [%c{1}] %m%n</attribute>
<attribute name="target" type="java.lang.String">System.out</attribute>
</gbean>
<gbean name="geronimo.system:role=LogAppender,type=DailyRollingFileAppender" class="org.apache.geronimo.system.logging.log4j.appender.RollingFileAppenderService">
<attribute name="threshold" type="java.lang.String">DEBUG</attribute>
<attribute name="layoutPattern" type="java.lang.String">%d{ABSOLUTE} %-5p [%c{1}] %m%n</attribute>
<attribute name="append" type="boolean">true</attribute>
<attribute name="file" type="java.lang.String">var/log/geronimo.log</attribute>
<attribute name="bufferedIO" type="boolean">false</attribute>
<attribute name="bufferedSize" type="int">8192</attribute>
<attribute name="maxBackupIndex" type="int">1</attribute>
<attribute name="maxFileSize" type="java.lang.String">10MB</attribute>
<reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
</gbean>
<!-- RMI Registry -->
<gbean name="geronimo.server:role=RMIRegistry" class="org.apache.geronimo.system.RMIRegistryService">
<attribute name="port" type="int">@rmiPort@</attribute>
</gbean>
</configuration>
1.1 incubator-geronimo/sandbox/messaging/src/plan/template-clustered-plan.xml
Index: template-clustered-plan.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is a template plan for a clustered node. The dynamic tokens are:
- @port@: listening port of the node;
- @clusterInfo@: cluster info as per the ClusterInfoEditor format; and
- @nodeInfo@: node info as per the NodeInfoEditor format.
-->
<configuration
xmlns="http://geronimo.apache.org/xml/ns/deployment"
configId="org/apache/geronimo/Cluster@port@"
>
<dependency>
<uri>concurrent/jars/concurrent-1.3.4.jar</uri>
</dependency>
<dependency>
<uri>geronimo/jars/geronimo-core-1.0-SNAPSHOT.jar</uri>
</dependency>
<dependency>
<uri>geronimo/jars/geronimo-network-1.0-SNAPSHOT.jar</uri>
</dependency>
<dependency>
<uri>geronimo-sandbox/jars/geronimo-sandbox-messaging-1.0-SNAPSHOT.jar</uri>
</dependency>
<gbean name="geronimo.cluster:type=ThreadPool" class="org.apache.geronimo.pool.ThreadPool">
<attribute name="keepAliveTime" type="long">1000</attribute>
<attribute name="poolSize" type="int">10</attribute>
<attribute name="poolName" type="java.lang.String">TP Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=ClockPool" class="org.apache.geronimo.pool.ClockPool">
<attribute name="poolName" type="java.lang.String">CP Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=SelectorManager" class="org.apache.geronimo.network.SelectorManager">
<attribute name="timeout" type="long">500</attribute>
<reference name="ThreadPool">geronimo.cluster:type=ThreadPool</reference>
<attribute name="threadName" type="java.lang.String">SM Node</attribute>
</gbean>
<gbean name="geronimo.cluster:type=MessagingTransportFactory" class="org.apache.geronimo.messaging.remotenode.network.NetworkTransportFactory">
<reference name="SelectorManager">geronimo.cluster:type=SelectorManager</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
</gbean>
<gbean name="geronimo.cluster:type=Node" class="org.apache.geronimo.messaging.NodeImpl">
<attribute name="nodeInfo" type="org.apache.geronimo.messaging.NodeInfo">@nodeInfo@</attribute>
<reference name="ThreadPool">geronimo.cluster:type=ThreadPool</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
<reference name="MessagingTransportFactory">geronimo.cluster:type=MessagingTransportFactory</reference>
</gbean>
<gbean name="geronimo.cluster:type=Cluster" class="org.apache.geronimo.messaging.cluster.ClusterImpl">
<attribute name="clusterInfo" type="org.apache.geronimo.messaging.cluster.ClusterInfo">@clusterInfo@</attribute>
<reference name="Node">geronimo.cluster:type=Node</reference>
<attribute name="topologyManager" type="org.apache.geronimo.messaging.cluster.topology.TopologyManager">Ring</attribute>
</gbean>
<gbean name="geronimo.cluster:type=ClusterHBSender" class="org.apache.geronimo.messaging.cluster.ClusterHBSender">
<reference name="Node">geronimo.cluster:type=Node</reference>
<reference name="Cluster">geronimo.cluster:type=Cluster</reference>
<reference name="ClockPool">geronimo.cluster:type=ClockPool</reference>
<attribute name="delay" type="long">500</attribute>
</gbean>
</configuration>
1.6 +4 -1 incubator-geronimo/sandbox/messaging/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/project.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- project.xml 11 Jul 2004 21:48:46 -0000 1.5
+++ project.xml 17 Jul 2004 03:54:13 -0000 1.6
@@ -76,6 +76,9 @@
<groupId>geronimo</groupId>
<artifactId>geronimo-network</artifactId>
<version>${pom.currentVersion}</version>
+ <properties>
+ <repository>true</repository>
+ </properties>
</dependency>
<!-- TODO START reverse dependency -->
1.1 incubator-geronimo/sandbox/messaging/maven.xml
Index: maven.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Revision: 1.1 $ $Date: 2004/07/17 03:54:13 $ -->
<project default="default"
xmlns:u="jelly:util"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant">
<!-- Determine what the top-level project root is -->
<j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
<!-- Determine what the top-level project root is -->
<j:set var="distDir" value="${project.root}/target"/>
<!--
Patch the distribution directory in order to simplify the test of the proto.
After having patched the distribution, the following commands can be used
to debug/test the proto:
Start the leader server:
java -jar target/bin/server.jar org/apache/geronimo/LeaderCluster
Start some other nodes of this cluster:
java -jar target/bin/server-1101.jar org/apache/geronimo/Cluster8091
java -jar target/bin/server-1102.jar org/apache/geronimo/Cluster8092
java -jar target/bin/server-1103.jar org/apache/geronimo/Cluster8093
java -jar target/bin/server-1104.jar org/apache/geronimo/Cluster8094
-->
<goal name="patch">
<j:set var="destDir" value="${distDir}/repository/geronimo-sandbox/jars"/>
<ant:mkdir dir="${destDir}"/>
<ant:copy file="target/geronimo-sandbox-messaging-${pom.currentVersion}.jar" todir="${destDir}"/>
<ant:copy todir="${distDir}/repository">
<ant:fileset dir="${maven.repo.local}">
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dependency" value="${artifact.dependency}"/>
<j:if test="${dependency.getProperty('repository') == 'true'}">
<ant:include name="${dependency.getArtifactDirectory()}/${dependency.getType()}s/${dependency.getArtifact()}"/>
</j:if>
</j:forEach>
</ant:fileset>
</ant:copy>
<j:set var="srcPlan" value="src/plan"/>
<j:set var="destPlan" value="target/instantiated-plan"/>
<u:tokenize var="tokenRMIPorts" delim=";">1101;1102;1103;1104</u:tokenize>
<j:forEach var="port" items="${tokenRMIPorts}">
<j:set var="curPlan" value="${destPlan}/system-${port}-plan.xml"/>
<ant:copy tofile="${curPlan}" overwrite="true" file="${srcPlan}/template-system-plan.xml"/>
<ant:replace file="${curPlan}" token="@rmiPort@" value="${port}"/>
<ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
<ant:jvmarg value="-ea"/>
<ant:arg value="--install"/>
<ant:arg value="--plan"/>
<ant:arg value="${curPlan}"/>
<ant:arg value="--outfile"/>
<ant:arg value="${distDir}/bin/server-${port}.jar"/>
<ant:arg value="--mainClass"/>
<ant:arg value="org.apache.geronimo.system.main.Daemon"/>
<ant:arg value="--classPath"/>
<ant:arg value="../lib/geronimo-kernel-1.0-SNAPSHOT.jar ../lib/geronimo-system-1.0-SNAPSHOT.jar ../lib/cglib-full-2.0.jar ../lib/commons-cli-1.0.jar ../lib/commons-logging-1.0.3.jar ../lib/log4j-1.2.8.jar ../lib/mx4j-2.0.1.jar ../lib/mx4j-remote-2.0.1.jar ../lib/xercesImpl-2.6.0.jar ../lib/xmlParserAPIs-2.2.1.jar"/>
</ant:java>
</j:forEach>
<j:set var="clusterInfo" value="235.0.0.1,1066"/>
<u:tokenize var="tokenNodes" delim=";">Node1,127.0.0.1,8091;Node2,127.0.0.1,8092;Node3,127.0.0.1,8093;Node4,127.0.0.1,8094</u:tokenize>
<j:forEach var="node" items="${tokenNodes}">
<u:tokenize var="nodeInfo" delim=",">${node}</u:tokenize>
<j:forEach var="curInfo" items="${nodeInfo}">
<j:set var="port" value="${curInfo}"/>
</j:forEach>
<j:set var="curPlan" value="${destPlan}/clustered-${port}-plan.xml"/>
<ant:copy tofile="${curPlan}" overwrite="true" file="${srcPlan}/template-clustered-plan.xml"/>
<ant:replace file="${curPlan}" token="@port@" value="${port}"/>
<ant:replace file="${curPlan}" token="@nodeInfo@" value="${node}"/>
<ant:replace file="${curPlan}" token="@clusterInfo@" value="${clusterInfo}"/>
<ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
<ant:jvmarg value="-ea"/>
<ant:arg value="--install"/>
<ant:arg value="--plan"/>
<ant:arg value="${curPlan}"/>
</ant:java>
</j:forEach>
<j:set var="curPlan" value="${destPlan}/leader-clustered-plan.xml"/>
<ant:copy tofile="${curPlan}" overwrite="true" file="${srcPlan}/template-leader-clustered-plan.xml"/>
<ant:replace file="${curPlan}" token="@nodeInfo@" value="LeaderNode,127.0.0.1,8090"/>
<ant:replace file="${curPlan}" token="@clusterInfo@" value="${clusterInfo}"/>
<ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
<ant:jvmarg value="-ea"/>
<ant:arg value="--install"/>
<ant:arg value="--plan"/>
<ant:arg value="${curPlan}"/>
</ant:java>
</goal>
</project>