[jboss-dev-forums] [Design of Management Features on JBoss] - Re: Using xinclude in config files

snacker do-not-reply at jboss.com
Thu Nov 15 15:54:11 EST 2007


So will xinclude work with the config files dropped in deploy.last?

We have multiple development environments and would like to do this:

cachea-service.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <server>
  |     <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
  |     <mbean code="org.jboss.cache.TreeCache"  name="jboss.cache:service=CacheA">
  |         <depends>jboss:service=Naming</depends>
  |         <depends>jboss:service=TransactionManager</depends>
  |         <depends>jboss:service=FarmMember,partition=${jboss.partition.name:DefaultPartition}</depends>
  | 
  |         <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
  |         <attribute name="IsolationLevel">NONE</attribute>
  |         <attribute name="CacheMode">REPL_ASYNC</attribute>
  |         <attribute name="ClusterName">CacheA-Cluster</attribute>
  |         <attribute name="ClusterConfig">
  |           <!--xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="/jboss/server/all/deploy/deploy.last/cache-setup.xml" xpointer="element(/1/1)"/>
  |           <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="/jboss/server/all/deploy/deploy.last/cache-setup.xml" xpointer="element(/1/2)"/-->
  |           <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="/jboss/server/all/deploy/deploy.last/cache-setup.xml" xpointer="cache-config-a-tcp"/>
  |           <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="/jboss/server/all/deploy/deploy.last/cache-setup.xml" xpointer="cache-config-a-tcpping"/>
  |           <MERGE2 min_interval="5000" max_interval="10000"/>
  |           <FD_SOCK />
  |           <FD shun="true" timeout="2500" max_tries="5" up_thread="true" down_thread="true" />
  |           <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" />
  |           <pbcast.NAKACK down_thread="true" up_thread="true" gc_lag="100" retransmit_timeout="300,600,1200,2400,4800" />
  |           <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" down_thread="false" up_thread="false" max_bytes="2100000"/>
  |           <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="false" print_local_addr="true"/>
  |           <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
  |         </attribute>
  | 
  |         <attribute name="SyncReplTimeout">20000</attribute>
  |         <attribute name="InitialStateRetrievalTimeout">600000</attribute>
  | 
  |         <!-- Max number of milliseconds to wait for a lock acquisition -->
  |         <attribute name="LockAcquisitionTimeout">15000</attribute>
  | 		<attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute> 
  |         <attribute name="EvictionPolicyConfig">
  |           <config>
  |              <attribute name="wakeUpIntervalSeconds">600</attribute>
  |              <region name="/_default_">
  |                 <attribute name="maxNodes">10000</attribute>
  |                 <attribute name="timeToIdleSeconds">14400</attribute>
  |              </region>
  |           </config>
  |         </attribute>
  |     </mbean>
  | </server>
  | 


config-setup.xml

    
  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!DOCTYPE config-setup[
  |   <!ELEMENT config-setup (TCP|TCPPING)*>
  |   <!ELEMENT TCP EMPTY>
  |   <!ATTLIST TCP
  |     id          ID      #REQUIRED
  |     bind_addr   CDATA   #IMPLIED
  |     start_port  CDATA   #IMPLIED
  |     loopback    CDATA   #IMPLIED
  |   >
  |   <!ELEMENT TCPPING EMPTY>
  |   <!ATTLIST TCPPING
  |     id                  ID      #REQUIRED
  |     initial_hosts       CDATA   #IMPLIED 
  |     port_range          CDATA   #IMPLIED 
  |     timeout             CDATA   #IMPLIED 
  |     num_initial_members CDATA   #IMPLIED
  |     up_thread           CDATA   #IMPLIED
  |     down_thread         CDATA   #IMPLIED
  |   >
  | ]>
  | 
  | <config-setup>
  |     <TCP     id="cache-config-a-tcp"     bind_addr="localhost" start_port="1111" loopback="true"/>
  |     <TCPPING id="cache-config-a-tcpping" initial_hosts="localhost[1111]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |                                          
  |     <TCP     id="cache-config-b-tcp"     bind_addr="localhost" start_port="1112" loopback="true"/>
  |     <TCPPING id="cache-config-b-tcpping" initial_hosts="localhost[1112]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |                                          
  |     <TCP     id="cache-config-c-tcp"     bind_addr="localhost" start_port="1113" loopback="true"/>
  |     <TCPPING id="cache-config-c-tcpping" initial_hosts="localhost[1113]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |                                          
  |     <TCP     id="cache-config-e-tcp"     bind_addr="localhost" start_port="1114" loopback="true"/>
  |     <TCPPING id="cache-config-e-tcpping" initial_hosts="localhost[1114]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |                                          
  |     <TCP     id="cache-config-f-tcp"     bind_addr="localhost" start_port="1115" loopback="true"/>
  |     <TCPPING id="cache-config-f-tcpping" initial_hosts="localhost[1115]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |     
  |     <TCP     id="cache-config-g-tcp"     bind_addr="localhost" start_port="1116" loopback="true"/>
  |     <TCPPING id="cache-config-g-tcpping" initial_hosts="localhost[1116]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |                                          
  |     <TCP     id="cache-config-h-tcp"     bind_addr="localhost" start_port="1117" loopback="true"/>
  |     <TCPPING id="cache-config-h-tcpping" initial_hosts="localhost[1118]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  |     
  |     <TCP     id="cache-config-tc5-cluster-tcp"      bind_addr="localhost" start_port="1119" loopback="true"/>
  |     <TCPPING id="cache-config-tc5-cluster-tcpping"  initial_hosts="localhost[1119]" port_range="1" timeout="3500" num_initial_members="1" up_thread="true" down_thread="true"/>
  | </config-setup>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105215#4105215

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105215



More information about the jboss-dev-forums mailing list