[hornetq-commits] JBoss hornetq SVN: r8885 - in trunk: src/config and 6 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Feb 17 17:13:32 EST 2010


Author: clebert.suconic at jboss.com
Date: 2010-02-17 17:13:31 -0500 (Wed, 17 Feb 2010)
New Revision: 8885

Added:
   trunk/src/config/jboss-6/
   trunk/src/config/jboss-6/clustered/
   trunk/src/config/jboss-6/clustered/hornetq-configuration.xml
   trunk/src/config/jboss-6/clustered/hornetq-jboss-beans.xml
   trunk/src/config/jboss-6/clustered/hornetq-jms.xml
   trunk/src/config/jboss-6/clustered/jms-ds.xml
   trunk/src/config/jboss-6/clustered/login-config.xml
   trunk/src/config/jboss-6/non-clustered/
   trunk/src/config/jboss-6/non-clustered/hornetq-configuration.xml
   trunk/src/config/jboss-6/non-clustered/hornetq-jboss-beans.xml
   trunk/src/config/jboss-6/non-clustered/hornetq-jms.xml
   trunk/src/config/jboss-6/non-clustered/jms-ds.xml
   trunk/src/config/jboss-6/non-clustered/login-config.xml
Modified:
   trunk/build-hornetq.xml
   trunk/src/main/org/hornetq/api/core/management/AddressControl.java
   trunk/src/main/org/hornetq/core/management/impl/AddressControlImpl.java
   trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java
Log:
Integration with AS6 work

Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml	2010-02-17 15:32:21 UTC (rev 8884)
+++ trunk/build-hornetq.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -804,6 +804,9 @@
            <include name="ra.xml"/>
            <exclude  name="**/build.xml"/>
          </fileset>
+         <fileset dir="${src.config.dir}">
+           <include  name="jboss-6/**"/>
+         </fileset>
          <fileset dir="${native.bin.dir}">
            <include  name="**/*.so"/>
          </fileset>

Added: trunk/src/config/jboss-6/clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-6/clustered/hornetq-configuration.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/clustered/hornetq-configuration.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,89 @@
+<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>
+
+   <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.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </connector>
+
+      <connector name="in-vm">
+         <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      </connector>
+
+   </connectors>
+
+   <acceptors>
+      <acceptor name="netty">
+         <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </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="createTempQueue" roles="guest"/>
+         <permission type="deleteTempQueue" 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>-1</max-size-bytes>
+         <page-size-bytes>10485760</page-size-bytes>         
+         <message-counter-history-day-limit>10</message-counter-history-day-limit>
+      </address-setting>
+   </address-settings>
+
+</configuration>

Added: trunk/src/config/jboss-6/clustered/hornetq-jboss-beans.xml
===================================================================
--- trunk/src/config/jboss-6/clustered/hornetq-jboss-beans.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/clustered/hornetq-jboss-beans.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+                   factoryMethod="locateJBoss"/>
+   </bean>
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>   
+
+	<!-- The security manager -->
+   <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+      <depends>JBossSecurityJNDIContextEstablishment</depends>
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="HornetQSecurityManager"/>
+         </parameter>        
+      </constructor>
+      <start ignored="true"/>
+      <stop ignored="true"/>   
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="HornetQServer"/>
+         </parameter>         
+      </constructor>
+   </bean>
+
+</deployment>

Added: trunk/src/config/jboss-6/clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-6/clustered/hornetq-jms.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/clustered/hornetq-jms.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,33 @@
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+   <connection-factory name="NettyConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="netty"/>
+      </connectors>
+      <entries>
+         <entry name="/ConnectionFactory"/>
+         <entry name="/XAConnectionFactory"/>
+      </entries>
+   </connection-factory>
+   
+   <connection-factory name="InVMConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="in-vm"/>
+      </connectors>
+      <entries>
+         <entry name="java:/ConnectionFactory"/>
+         <entry name="java:/XAConnectionFactory"/>
+      </entries>
+   </connection-factory>
+
+   <queue name="DLQ">
+      <entry name="/queue/DLQ"/>
+   </queue>
+   
+   <queue name="ExpiryQueue">
+      <entry name="/queue/ExpiryQueue"/>
+   </queue>
+
+</configuration>
\ No newline at end of file

Added: trunk/src/config/jboss-6/clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-6/clustered/jms-ds.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/clustered/jms-ds.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,26 @@
+<connection-factories>
+   <!--
+    JMS Stuff
+   -->
+
+   <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+      <attribute name="ProviderName">DefaultJMSProvider</attribute>
+      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+      <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+   </mbean>
+   <!--
+    JMS XA Resource adapter, use this to get transacted JMS in beans
+   -->
+   <tx-connection-factory>
+      <jndi-name>JmsXA</jndi-name>
+      <xa-transaction/>
+      <rar-name>jms-ra.rar</rar-name>
+      <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+      <max-pool-size>20</max-pool-size>
+      <security-domain-and-application>JmsXARealm</security-domain-and-application>
+   </tx-connection-factory>
+</connection-factories>
\ No newline at end of file

Added: trunk/src/config/jboss-6/clustered/login-config.xml
===================================================================
--- trunk/src/config/jboss-6/clustered/login-config.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/clustered/login-config.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+  <authentication>
+    <login-module code="login.module1.class.name" flag="control_flag">
+      <module-option name = "option1-name">option1-value</module-option>
+      <module-option name = "option2-name">option2-value</module-option>
+      ...
+    </login-module>
+
+    <login-module code="login.module2.class.name" flag="control_flag">
+      ...
+    </login-module>
+    ...
+  </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen at redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+  <!-- Used by clients within the application server VM such as
+  mbeans and servlets that access EJBs.
+  -->
+  <application-policy name="client-login">
+    <authentication>
+      <login-module code="org.jboss.security.ClientLoginModule"
+        flag="required">
+         <!-- Any existing security context will be restored on logout -->
+         <module-option name="restore-login-identity">true</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- Security domains for testing new jca framework -->
+  <application-policy name="HsqlDbRealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">sa</module-option>
+        <module-option name="userName">sa</module-option>
+        <module-option name="password"></module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <application-policy name="JmsXARealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">guest</module-option>
+        <module-option name="userName">guest</module-option>
+        <module-option name="password">guest</module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for HornetQ. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+<application-policy name="hornetq">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+	<module-option name = "unauthenticatedIdentity">guest</module-option>
+        <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+        <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the jmx-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="jmx-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+        <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the web-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="web-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">web-console-users.properties</module-option>
+        <module-option name="rolesProperties">web-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!--
+    A template configuration for the JBossWS security domain.
+    This defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="JBossWS">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+        <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+        <module-option name="unauthenticatedIdentity">anonymous</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- The default login configuration used by any security domain that
+  does not have a application-policy entry with a matching name
+  -->
+  <application-policy name="other">
+    <!-- A simple server login module, which can be used when the number
+    of users is relatively small. It uses two properties files:
+    users.properties, which holds users (key) and their password (value).
+    roles.properties, which holds users (key) and a comma-separated list of
+    their roles (value).
+    The unauthenticatedIdentity property defines the name of the principal
+    that will be used when a null username and password are presented as is
+    the case for an unuathenticated web client or MDB. If you want to
+    allow such users to be authenticated add the property, e.g.,
+    unauthenticatedIdentity="nobody"
+    -->
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required"/>
+    </authentication>
+  </application-policy>
+
+</policy>

Added: trunk/src/config/jboss-6/non-clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-6/non-clustered/hornetq-configuration.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/non-clustered/hornetq-configuration.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,63 @@
+<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>
+
+   <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.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </connector>
+
+      <connector name="in-vm">
+         <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+      </connector>
+
+   </connectors>
+
+   <acceptors>   
+      <acceptor name="netty">
+         <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
+         <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
+      </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="createTempQueue" roles="guest"/>
+         <permission type="deleteTempQueue" 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>-1</max-size-bytes>
+         <page-size-bytes>10485760</page-size-bytes>         
+         <message-counter-history-day-limit>10</message-counter-history-day-limit>
+      </address-setting>
+   </address-settings>
+
+</configuration>

Added: trunk/src/config/jboss-6/non-clustered/hornetq-jboss-beans.xml
===================================================================
--- trunk/src/config/jboss-6/non-clustered/hornetq-jboss-beans.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/non-clustered/hornetq-jboss-beans.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+                   factoryMethod="locateJBoss"/>
+   </bean>
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>   
+
+	<!-- The security manager -->
+   <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+      <depends>JBossSecurityJNDIContextEstablishment</depends>
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="HornetQSecurityManager"/>
+         </parameter>        
+      </constructor>
+      <start ignored="true"/>
+      <stop ignored="true"/>          
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="HornetQServer"/>
+         </parameter>         
+      </constructor>
+   </bean>
+
+</deployment>
\ No newline at end of file

Added: trunk/src/config/jboss-6/non-clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-6/non-clustered/hornetq-jms.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/non-clustered/hornetq-jms.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,33 @@
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+   <connection-factory name="NettyConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="netty"/>
+      </connectors>
+      <entries>
+         <entry name="/ConnectionFactory"/>
+         <entry name="/XAConnectionFactory"/>
+      </entries>
+   </connection-factory>
+   
+   <connection-factory name="InVMConnectionFactory">
+      <connectors>
+         <connector-ref connector-name="in-vm"/>
+      </connectors>
+      <entries>
+         <entry name="java:/ConnectionFactory"/>
+         <entry name="java:/XAConnectionFactory"/>
+      </entries>
+   </connection-factory>
+   
+   <queue name="DLQ">
+      <entry name="/queue/DLQ"/>
+   </queue>
+   
+   <queue name="ExpiryQueue">
+      <entry name="/queue/ExpiryQueue"/>
+   </queue>
+
+</configuration>
\ No newline at end of file

Added: trunk/src/config/jboss-6/non-clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-6/non-clustered/jms-ds.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/non-clustered/jms-ds.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,26 @@
+<connection-factories>
+   <!--
+    JMS Stuff
+   -->
+
+   <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+      <attribute name="ProviderName">DefaultJMSProvider</attribute>
+      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+      <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+      <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+   </mbean>
+   <!--
+    JMS XA Resource adapter, use this to get transacted JMS in beans
+   -->
+   <tx-connection-factory>
+      <jndi-name>JmsXA</jndi-name>
+      <xa-transaction/>
+      <rar-name>jms-ra.rar</rar-name>
+      <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+      <max-pool-size>20</max-pool-size>
+      <security-domain-and-application>JmsXARealm</security-domain-and-application>
+   </tx-connection-factory>
+</connection-factories>
\ No newline at end of file

Added: trunk/src/config/jboss-6/non-clustered/login-config.xml
===================================================================
--- trunk/src/config/jboss-6/non-clustered/login-config.xml	                        (rev 0)
+++ trunk/src/config/jboss-6/non-clustered/login-config.xml	2010-02-17 22:13:31 UTC (rev 8885)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+  <authentication>
+    <login-module code="login.module1.class.name" flag="control_flag">
+      <module-option name = "option1-name">option1-value</module-option>
+      <module-option name = "option2-name">option2-value</module-option>
+      ...
+    </login-module>
+
+    <login-module code="login.module2.class.name" flag="control_flag">
+      ...
+    </login-module>
+    ...
+  </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen at redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+  <!-- Used by clients within the application server VM such as
+  mbeans and servlets that access EJBs.
+  -->
+  <application-policy name="client-login">
+    <authentication>
+      <login-module code="org.jboss.security.ClientLoginModule"
+        flag="required">
+         <!-- Any existing security context will be restored on logout -->
+         <module-option name="restore-login-identity">true</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- Security domains for testing new jca framework -->
+  <application-policy name="HsqlDbRealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">sa</module-option>
+        <module-option name="userName">sa</module-option>
+        <module-option name="password"></module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <application-policy name="JmsXARealm">
+    <authentication>
+      <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+        flag="required">
+        <module-option name="principal">guest</module-option>
+        <module-option name="userName">guest</module-option>
+        <module-option name="password">guest</module-option>
+        <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for hornetq. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+<application-policy name="hornetq">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+	<module-option name = "unauthenticatedIdentity">guest</module-option>
+        <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+        <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the jmx-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="jmx-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+        <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- A template configuration for the web-console web application. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="web-console">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">web-console-users.properties</module-option>
+        <module-option name="rolesProperties">web-console-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!--
+    A template configuration for the JBossWS security domain.
+    This defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="JBossWS">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+        <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+        <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+        <module-option name="unauthenticatedIdentity">anonymous</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+
+  <!-- The default login configuration used by any security domain that
+  does not have a application-policy entry with a matching name
+  -->
+  <application-policy name="other">
+    <!-- A simple server login module, which can be used when the number
+    of users is relatively small. It uses two properties files:
+    users.properties, which holds users (key) and their password (value).
+    roles.properties, which holds users (key) and a comma-separated list of
+    their roles (value).
+    The unauthenticatedIdentity property defines the name of the principal
+    that will be used when a null username and password are presented as is
+    the case for an unuathenticated web client or MDB. If you want to
+    allow such users to be authenticated add the property, e.g.,
+    unauthenticatedIdentity="nobody"
+    -->
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required"/>
+    </authentication>
+  </application-policy>
+
+</policy>

Modified: trunk/src/main/org/hornetq/api/core/management/AddressControl.java
===================================================================
--- trunk/src/main/org/hornetq/api/core/management/AddressControl.java	2010-02-17 15:32:21 UTC (rev 8884)
+++ trunk/src/main/org/hornetq/api/core/management/AddressControl.java	2010-02-17 22:13:31 UTC (rev 8885)
@@ -58,40 +58,4 @@
 
    // Operations ----------------------------------------------------
 
-   /**
-    * Adds a role to this address.
-    * 
-    * @param name name of the role
-    * @param send can the user send to this address?
-    * @param consume can the user consume from a queue bound to this address?
-    * @param createDurableQueue can the user create a durable queue bound to this address?
-    * @param deleteDurableQueue can the user delete a durable queue bound to this address?
-    * @param createNonDurableQueue can the user create a non-durable queue bound to this address?
-    * @param deleteNonDurableQueue can the user delete a non-durable queue bound to this address?
-    * @param manage can the user send management messages to this address?
-    * @throws Exception if an exception occurred while adding the role
-    */
-   @Operation(desc = "Add a Role to this address")
-   void addRole(@Parameter(name = "name", desc = "Name of the role to add") String name,
-                @Parameter(name = "send", desc = "Can the user send to this address?") boolean send,
-                @Parameter(name = "consume", desc = "Can the user consume from this address?") boolean consume,
-                @Parameter(name = "createDurableQueue", desc = "Can the user create a durable queue?") boolean createDurableQueue,
-                @Parameter(name = "deleteDurableQueue", desc = "Can the user delete a durable queue?") boolean deleteDurableQueue,
-                @Parameter(name = "createNonDurableQueue", desc = "Can the user create a temp queue?") boolean createNonDurableQueue,
-                @Parameter(name = "deleteNonDurableQueue", desc = "Can the user delete a temp queue?") boolean deleteNonDurableQueue,
-                @Parameter(name = "manage", desc = "Can the user send management messages?") boolean manage) throws Exception;
-
-   /**
-    * Removes the role corresponding to the specified name from this address.
-    * 
-    * @throws Exception if an exception occurred while removing the role
-    */
-   @Operation(desc = "Remove a Role from this address")
-   void removeRole(@Parameter(name = "name", desc = "Name of the role to remove") String name) throws Exception;
-   
-   /**
-    * This method will remove any matching associated with this address. This will basically reset the security for this address.
-    */
-   @Operation(desc = "Reset the security configuration for this address by using default values")
-   void resetSecurity();
 }

Modified: trunk/src/main/org/hornetq/core/management/impl/AddressControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/AddressControlImpl.java	2010-02-17 15:32:21 UTC (rev 8884)
+++ trunk/src/main/org/hornetq/core/management/impl/AddressControlImpl.java	2010-02-17 22:13:31 UTC (rev 8885)
@@ -13,8 +13,6 @@
 
 package org.hornetq.core.management.impl;
 
-import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
 import javax.management.MBeanOperationInfo;
@@ -181,89 +179,6 @@
       }
    }
 
-   public synchronized void addRole(final String name,
-                                    final boolean send,
-                                    final boolean consume,
-                                    final boolean createDurableQueue,
-                                    final boolean deleteDurableQueue,
-                                    final boolean createNonDurableQueue,
-                                    final boolean deleteNonDurableQueue,
-                                    final boolean manage) throws Exception
-   {
-      clearIO();
-      try
-      {
-         Set<Role> roles = securityRepository.getMatch(address.toString());
-         HashSet<Role> newroles = new HashSet<Role>();
-         newroles.addAll(roles);
-         
-         Role newRole = new Role(name,
-                                 send,
-                                 consume,
-                                 createDurableQueue,
-                                 deleteDurableQueue,
-                                 createNonDurableQueue,
-                                 deleteNonDurableQueue,
-                                 manage);
-         boolean added = newroles.add(newRole);
-         if (!added)
-         {
-            throw new IllegalArgumentException("Role " + name + " already exists");
-         }
-         securityRepository.addMatch(address.toString(), newroles);
-      }
-      finally
-      {
-         blockOnIO();
-      }
-   }
-
-   public synchronized void removeRole(final String role) throws Exception
-   {
-      clearIO();
-      try
-      {
-         Set<Role> roles = securityRepository.getMatch(address.toString());
-         
-         HashSet<Role> newroles = new HashSet<Role>();
-         newroles.addAll(roles);
-
-         Iterator<Role> it = newroles.iterator();
-         boolean removed = false;
-         while (it.hasNext())
-         {
-            Role r = it.next();
-            if (r.getName().equals(role))
-            {
-               it.remove();
-               removed = true;
-               break;
-            }
-         }
-         if (!removed)
-         {
-            throw new IllegalArgumentException("Role " + role + " does not exist");
-         }
-
-         securityRepository.removeMatch(address.toString());
-         
-         securityRepository.addMatch(address.toString(), newroles);
-      }
-      finally
-      {
-         blockOnIO();
-      }
-   }
-   
-   /* (non-Javadoc)
-    * @see org.hornetq.api.core.management.AddressControl#resetSecurity()
-    */
-   public void resetSecurity()
-   {
-      securityRepository.removeMatch(address.toString());
-   }
-
-
    @Override
    MBeanOperationInfo[] fillMBeanOperationInfo()
    {

Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java	2010-02-17 15:32:21 UTC (rev 8884)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java	2010-02-17 22:13:31 UTC (rev 8885)
@@ -92,7 +92,7 @@
 
    /* use local tx instead of XA*/
    private Boolean localTx;
-
+   
    /**
     * Constructor
     */
@@ -735,4 +735,20 @@
    {
 
    }
+
+   /**
+    * @param keepAlive the keepAlive to set
+    */
+   public void setKeepAlive(boolean keepAlive)
+   {
+   }
+
+    /**
+    * @param keepAliveMillis the keepAliveMillis to set
+    */
+   public void setKeepAliveMillis(long keepAliveMillis)
+   {
+   }
+   
+   
 }



More information about the hornetq-commits mailing list