Index: build/build.xml
===================================================================
--- build/build.xml	(revision 106974)
+++ build/build.xml	(working copy)
@@ -1893,10 +1893,18 @@
     </copy> -->
 
    <unzip src="${org.hornetq:hornetq-resources:jar}" dest="${install.default.deploy}/hornetq">
-	  <patternset includes="jboss-as-6/non-clustered/*" excludes="**/hornetq-users.properties,**/hornetq-roles.properties,**/hornetq-roles.properties,**/login-config.xml">
+	  <patternset includes="jboss-as-6/non-clustered/*" excludes="**/hornetq-configuration.xml,**/hornetq-users.properties,**/hornetq-roles.properties,**/hornetq-roles.properties,**/login-config.xml">
 	  </patternset>
 	  <mapper type="flatten"/>
    </unzip>
+   
+	<!-- JBAS-8148 AS specific HornetQ configuration -->
+	<copy todir="${install.default.deploy}/hornetq" filtering="no">
+        <fileset dir="${hornetq.module.output}/resources/config/non-clustered">
+          <include name="hornetq-configuration.xml"/>
+        </fileset>
+	</copy>
+   
     <mkdir dir="${install.default.deploy}/jms-ra.rar"/>
     <mkdir dir="${install.default.deploy}/jms-ra.rar/META-INF"/>
 
@@ -1910,12 +1918,19 @@
     </copy> -->
   	
     <unzip src="${org.hornetq:hornetq-resources:jar}" dest="${install.all.deploy}/hornetq">
-    	  <patternset includes="jboss-as-6/clustered/*" excludes="**/hornetq-users.properties,**/hornetq-roles.properties,**/hornetq-roles.properties,**/login-config.xml">
+    	  <patternset includes="jboss-as-6/clustered/*" excludes="**/hornetq-configuration.xml,**/hornetq-users.properties,**/hornetq-roles.properties,**/hornetq-roles.properties,**/login-config.xml">
     	  </patternset>
     	  <mapper type="flatten"/>
     </unzip>
-  	
 
+  	<!-- JBAS-8148 AS specific HornetQ configuration -->
+  	<copy todir="${install.all.deploy}/hornetq" filtering="no">
+          <fileset dir="${hornetq.module.output}/resources/config/clustered">
+            <include name="hornetq-configuration.xml"/>
+          </fileset>
+  	</copy>
+      
+
     <mkdir dir="${install.all.deploy}/jms-ra.rar"/>
     <mkdir dir="${install.all.deploy}/jms-ra.rar/META-INF"/>
     <unzip src="${org.hornetq:hornetq-resources:jar}" dest="${install.all.deploy}/jms-ra.rar/META-INF">
Index: hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml
===================================================================
--- hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml	(revision 0)
+++ hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml	(revision 0)
@@ -0,0 +1,99 @@
+<!--
+  ~ Copyright 2009 Red Hat, Inc.
+  ~  Red Hat licenses this file to you under the Apache License, version
+  ~  2.0 (the "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  ~  implied.  See the License for the specific language governing
+  ~  permissions and limitations under the License.
+  -->
+
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+   <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+   
+   <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+   <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+   
+   <!-- Default journal file size is set to 1Mb for faster first boot -->
+   <journal-file-size>${hornetq.journal.file.size:1048576}</journal-file-size>
+
+   <!-- Default journal min file is 2, increase for higher average msg rates -->
+   <journal-min-files>${hornetq.journal.min.files:2}</journal-min-files> 
+
+
+   <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+   <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+   <connectors>
+      <connector name="netty">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </connector>
+      
+      <connector name="netty-throughput">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+         <param key="batch-delay" value="50"/>
+      </connector>
+
+      <connector name="in-vm">
+         <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+         <param key="server-id" value="${hornetq.server-id:0}"/>
+      </connector>
+
+   </connectors>
+
+   <acceptors>   
+      <acceptor name="netty">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </acceptor>
+      
+      <acceptor name="netty-throughput">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+         <param key="batch-delay" value="50"/>
+         <param key="direct-deliver" value="false"/>
+      </acceptor>
+
+      <acceptor name="in-vm">
+        <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+        <param key="server-id" value="0"/>
+      </acceptor>
+
+   </acceptors>
+
+   <security-settings>
+      <security-setting match="#">
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+   <address-settings>
+      <!--default for catch all-->
+      <address-setting match="#">
+         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+         <redelivery-delay>0</redelivery-delay>
+         <max-size-bytes>10485760</max-size-bytes>       
+         <message-counter-history-day-limit>10</message-counter-history-day-limit>
+         <address-full-policy>BLOCK</address-full-policy>
+      </address-setting>
+   </address-settings>
+
+</configuration>
Index: hornetq-int/src/resources/config/clustered/hornetq-configuration.xml
===================================================================
--- hornetq-int/src/resources/config/clustered/hornetq-configuration.xml	(revision 0)
+++ hornetq-int/src/resources/config/clustered/hornetq-configuration.xml	(revision 0)
@@ -0,0 +1,125 @@
+<!--
+  ~ Copyright 2009 Red Hat, Inc.
+  ~  Red Hat licenses this file to you under the Apache License, version
+  ~  2.0 (the "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  ~  implied.  See the License for the specific language governing
+  ~  permissions and limitations under the License.
+  -->
+
+<configuration xmlns="urn:hornetq"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+   <clustered>true</clustered>
+   
+   <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+   <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+   <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+   
+   <!-- Default journal file size is set to 1Mb for faster first boot -->
+   <journal-file-size>${hornetq.journal.file.size:1048576}</journal-file-size>
+
+   <!-- Default journal min file is 2, increase for higher average msg rates -->
+   <journal-min-files>${hornetq.journal.min.files:2}</journal-min-files> 
+   
+
+   <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+   <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+   <connectors>
+      <connector name="netty">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </connector>
+      
+      <connector name="netty-throughput">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+         <param key="batch-delay" value="50"/>
+      </connector>
+
+      <connector name="in-vm">
+         <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+         <param key="server-id" value="${hornetq.server-id:0}"/>
+      </connector>
+
+   </connectors>
+
+   <acceptors>
+      <acceptor name="netty">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </acceptor>
+      
+      <acceptor name="netty-throughput">
+         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${jboss.bind.address:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
+         <param key="batch-delay" value="50"/>
+         <param key="direct-deliver" value="false"/>
+      </acceptor>
+
+      <acceptor name="in-vm">
+        <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+        <param key="server-id" value="0"/>
+      </acceptor>
+
+   </acceptors>
+
+   <broadcast-groups>
+      <broadcast-group name="bg-group1">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>5000</broadcast-period>
+         <connector-ref connector-name="netty"/>
+      </broadcast-group>
+   </broadcast-groups>
+
+   <discovery-groups>
+      <discovery-group name="dg-group1">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+   </discovery-groups>
+   
+   <cluster-connections>
+      <cluster-connection name="my-cluster">
+         <address>jms</address>	 
+	      <discovery-group-ref discovery-group-name="dg-group1"/>
+      </cluster-connection>
+   </cluster-connections>
+   
+   <security-settings>
+      <security-setting match="#">
+         <permission type="createNonDurableQueue" roles="guest"/>
+         <permission type="deleteNonDurableQueue" roles="guest"/>
+         <permission type="consume" roles="guest"/>
+         <permission type="send" roles="guest"/>
+      </security-setting>
+   </security-settings>
+
+   <address-settings>
+      <!--default for catch all-->
+      <address-setting match="#">
+         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+         <redelivery-delay>0</redelivery-delay>
+         <max-size-bytes>10485760</max-size-bytes>       
+         <message-counter-history-day-limit>10</message-counter-history-day-limit>
+         <address-full-policy>BLOCK</address-full-policy>
+      </address-setting>
+   </address-settings>
+
+</configuration>
