- Google Web Toolkit version 2.0.\r
- JBoss Application Server version 5.1.0 built with JDK 1.6.\r
- JUnit version 3.\r
+- HornetQ version 2.0.0.\r
\r
\r
Building from the command line\r
jboss.prod.home=/path/to/production/deployment/jboss-5.1.0.GA\r
gwt.path=/path/to/gwt-2.0.0\r
junit.path=/path/to/junit\r
+hornetq.path=/path/to/hornetq\r
\r
Run "ant".\r
\r
Alternatively, you can set them in the command line, or specify them as environment variables:\r
\r
-ant -Djboss.version=5.1.0 -Djboss.home=/path/to/jboss-5.1.0.GA -Dgwt.path=/path/to/gwt-2.0.0 -Djunit.path=/path/to/junit\r
+ant -Djboss.version=5.1.0 -Djboss.home=/path/to/jboss-5.1.0.GA -Dgwt.path=/path/to/gwt-2.0.0 -Djunit.path=/path/to/junit -Dhornetq.path=/path/to/hornetq\r
\r
The final build artifact is the file "gss.ear" in the directory "bin", which has already been deployed to the server.\r
\r
<property name="jboss.prod.home" value="${env.JBOSS_PROD_HOME}" />
<property name="jboss.version" value="${env.JBOSS_VERSION}" />
<property name="gwt.path" value="${env.GWT_PATH}" />
+ <property name="hornetq.path" value="${env.HORNETQ_PATH}" />
<property name="src.dir" value="${basedir}/src"/>
<property name="jboss.project" value="${basedir}/jboss-config/${jboss.version}" />
</path>
<target name="install" description="Installs the configuration files of the application server">
+ <!-- Install HornetQ configuration -->
+ <copy todir="${jboss.run_conf.lib.dir}">
+ <fileset dir="${hornetq.path}/lib">
+ <include name="hornetq-*.jar"/>
+ <include name="netty*.jar"/>
+ </fileset>
+ </copy>
+ <property name="hornetq.sar.dir" value="${jboss.deploy.dir}/hornetq.sar"/>
+ <mkdir dir="${hornetq.sar.dir}"/>
+ <copy todir="${hornetq.sar.dir}">
+ <fileset dir="${hornetq.path}/config/jboss-as/non-clustered" includes="*" excludes="**/jboss-as-4/**"/>
+ </copy>
+ <unzip src="${hornetq.path}/lib/hornetq-ra.rar" dest="${jboss.deploy.dir}/hornetq-ra.rar"/>
+ <delete dir="${jboss.deploy.dir}/messaging" failonerror="false"/>
+ <mkdir dir="${jboss.bin.dir}/META-INF/lib/linux2/x86"/>
+ <mkdir dir="${jboss.bin.dir}/META-INF/lib/linux2/x64"/>
+ <copy todir="${jboss.bin.dir}/META-INF/lib/linux2/x86" file="${hornetq.path}/bin/libHornetQAIO32.so"/>
+ <copy todir="${jboss.bin.dir}/META-INF/lib/linux2/x64" file="${hornetq.path}/bin/libHornetQAIO64.so"/>
+ <!-- Install gss configuration -->
<copy todir="${jboss.bin.dir}" overwrite="true" failonerror="false">
<fileset dir="${jboss.project}/bin"/>
</copy>
</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.
--- /dev/null
+#
+# user=role1,role2,...
+#
+guest=guest
--- /dev/null
+#
+# user=password
+#
+guest=guest
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
- <!--
- The GSS indexing queue.
- -->
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.messaging.destination:service=Queue,name=gss-indexingQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">
- jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-</server>
\ No newline at end of file
--- /dev/null
+<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="IndexingQueue">
+ <entry name="/queue/gss-indexingQueue"/>
+ </queue>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Messaging Connection Factories deployment descriptor.
-
- $Id: connection-factories-service.xml 85945 2009-03-16 19:45:12Z dimitris@jboss.org $
- -->
-
-<server>
-
- <!-- The default connection factory does not support automatic failover or load balancing-
- this is so we can maintain compatiblity with applications written for JBoss MQ which use this
- connection factory.
- -->
- <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.connectionfactory:service=ConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
-
- <attribute name="JNDIBindings">
- <bindings>
- <binding>/ConnectionFactory</binding>
- <binding>/XAConnectionFactory</binding>
- <binding>java:/ConnectionFactory</binding>
- <binding>java:/XAConnectionFactory</binding>
- </bindings>
- </attribute>
- </mbean>
-
- <!-- A clustered connection factory that supports automatic failover and load balancing of created
- connections.
- This factory is not suitable to be used by MDBs.
- <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.connectionfactory:service=ClusteredConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
-
- <attribute name="JNDIBindings">
- <bindings>
- <binding>/ClusteredConnectionFactory</binding>
- <binding>/ClusteredXAConnectionFactory</binding>
- <binding>java:/ClusteredConnectionFactory</binding>
- <binding>java:/ClusteredXAConnectionFactory</binding>
- </bindings>
- </attribute>
-
- <attribute name="SupportsFailover">true</attribute>
- <attribute name="SupportsLoadBalancing">true</attribute>
- </mbean>
- -->
-
- <!-- A connection factory with no JNDI bindings that is used in clustering to create the connections that
- pull messages from one node to another
- <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="SupportsFailover">false</attribute>
- <attribute name="SupportsLoadBalancing">false</attribute>
- </mbean>
- -->
-
- <!-- An example connection factory with all attributes shown
-
- <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.connectionfactory:service=MyExampleConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
-
- <constructor>
-
- <!- - You can specify the default Client ID to use for connections created using this factory - ->
-
- <arg type="java.lang.String" value="MyClientID"/>
-
- </constructor>
-
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-
- <!- - The transport to use - can be bisocket, sslbisocket or http - ->
-
- <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
-
- <depends>jboss.messaging:service=PostOffice</depends>
-
- <!- - PrefetchSize determines the approximate maximum number of messages the client consumer will buffer locally - ->
-
- <attribute name="PrefetchSize">150</attribute>
-
- <!- - Paging params to be used for temporary queues - ->
-
- <attribute name="DefaultTempQueueFullSize">200000</attribute>
-
- <attribute name="DefaultTempQueuePageSizeSize">2000</attribute>
-
- <attribute name="DefaultTempQueueDownCacheSize">2000</attribute>
-
- <!- - The batch size to use when using the DUPS_OK_ACKNOWLEDGE acknowledgement mode - ->
-
- <attribute name="DupsOKBatchSize">5000</attribute>
-
- <!- - Does this connection factory support automatic failover? - ->
-
- <attribute name="SupportsFailover">false</attribute>
-
- <!- - Does this connection factory support automatic client side load balancing? - ->
-
- <attribute name="SupportsLoadBalancing">false</attribute>
-
- <!- - The class name of the factory used to create the load balancing policy to use on the client side - ->
-
- <attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
-
- <!- - Whether we should be strict TCK compliant, i.e. how we deal with foreign messages, defaults to false- ->
-
- <attribute name="StrictTck">true</attribute>
-
- <!- - Should acknowledgements be sent asynchronously? - ->
-
- <attribute name="SendAcksAsync">false</attribute>
-
- <!- - Disable JBoss Remoting Connector sanity checks - There is rarely a good reason to set this to true - ->
-
- <attribute name="DisableRemotingChecks">false</attribute>
-
- <!- - The connection factory will be bound in the following places in JNDI - ->
-
- <attribute name="JNDIBindings">
-
- <bindings>
-
- <binding>/acme/MyExampleConnectionFactory</binding>
-
- <binding>/acme/MyExampleConnectionFactoryDupe</binding>
-
- <binding>java:/xyz/CF1</binding>
-
- <binding>java:/connectionfactories/acme/connection_factory</binding>
-
- </bindings>
-
- </attribute>
-
- </mbean>
-
- -->
-
-</server>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Messaging beans
- $Id: messaging-jboss-beans.xml 88672 2009-05-11 20:49:47Z anil.saldhana@jboss.com $
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- messaging application-policy definition -->
- <application-policy xmlns="urn:jboss:security-beans:1.0" name="messaging">
- <authentication>
- <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
- <module-option name="unauthenticatedIdentity">guest</module-option>
- <module-option name="dsJndiName">java:/DefaultDS</module-option>
- <module-option name="principalsQuery">SELECT PASSWD FROM JBM_USER WHERE USER_ID=?</module-option>
- <module-option name="rolesQuery">SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?</module-option>
- </login-module>
- </authentication>
- </application-policy>
-
- <bean name="SecurityStore" class="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore">
- <!-- default security configuration -->
- <property name="defaultSecurityConfig">
- <![CDATA[
- <security>
- <role name="guest" read="true" write="true" create="true"/>
- </security>
- ]]>
- </property>
- <property name="suckerPassword">$uck3r</property>
- <property name="securityDomain">messaging</property>
- <property name="securityManagement"><inject bean="JNDIBasedSecurityManagement"/></property>
- <!-- @JMX annotation to export the management view of this bean -->
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.messaging:service=SecurityStore",exposedInterface=org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStoreMBean.class)</annotation>
- <!-- Password Annotation to inject the password from the common password utility
- <annotation>@org.jboss.security.integration.password.Password(securityDomain="messaging",methodName="setSuckerPassword")</annotation>
- -->
- </bean>
-
- <bean name="MessagingDeploymentTemplateInfoFactory"
- class="org.jboss.managed.plugins.factory.DeploymentTemplateInfoFactory"/>
-
- <bean name="QueueTemplate" class="org.jboss.profileservice.management.templates.JmsDestinationTemplate">
- <property name="info"><inject bean="QueueTemplateInfo"/></property>
- </bean>
- <bean name="QueueTemplateInfo"
- class="org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo">
- <constructor factoryMethod="createTemplateInfo">
- <factory bean="DSDeploymentTemplateInfoFactory"/>
- <parameter class="java.lang.Class">org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo</parameter>
- <parameter class="java.lang.Class">org.jboss.jms.server.destination.QueueServiceMO</parameter>
- <parameter class="java.lang.String">QueueTemplate</parameter>
- <parameter class="java.lang.String">A template for JMS queue *-service.xml deployments</parameter>
- </constructor>
- <property name="destinationType">QueueTemplate</property>
- </bean>
-
- <bean name="TopicTemplate" class="org.jboss.profileservice.management.templates.JmsDestinationTemplate">
- <property name="info"><inject bean="TopicTemplateInfo"/></property>
- </bean>
- <bean name="TopicTemplateInfo"
- class="org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo">
- <constructor factoryMethod="createTemplateInfo">
- <factory bean="DSDeploymentTemplateInfoFactory"/>
- <parameter class="java.lang.Class">org.jboss.profileservice.management.templates.JmsDestinationTemplateInfo</parameter>
- <parameter class="java.lang.Class">org.jboss.jms.server.destination.TopicServiceMO</parameter>
- <parameter class="java.lang.String">TopicTemplate</parameter>
- <parameter class="java.lang.String">A template for JMS topic *-service.xml deployments</parameter>
- </constructor>
- <property name="destinationType">TopicTemplate</property>
- </bean>
-
-</deployment>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- The JBoss Messaging service deployment descriptor.
-
- $Id: messaging-service.xml 85945 2009-03-16 19:45:12Z dimitris@jboss.org $
- -->
-
-<server>
-
- <!-- ServerPeer MBean configuration
- ============================== -->
-
- <mbean code="org.jboss.jms.server.ServerPeer"
- name="jboss.messaging:service=ServerPeer"
- xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
-
- <!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
-
- <attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>
-
- <!-- The default JNDI context to use for queues when they are deployed without specifying one -->
-
- <attribute name="DefaultQueueJNDIContext">/queue</attribute>
-
- <!-- The default JNDI context to use for topics when they are deployed without specifying one -->
-
- <attribute name="DefaultTopicJNDIContext">/topic</attribute>
-
- <attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
-
- <!-- The default Dead Letter Queue (DLQ) to use for destinations.
- This can be overridden on a per destinatin basis -->
-
- <attribute name="DefaultDLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute>
-
- <!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
- This can be overridden on a per destinatin basis -->
-
- <attribute name="DefaultMaxDeliveryAttempts">10</attribute>
-
- <!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
-
- <attribute name="DefaultExpiryQueue">jboss.messaging.destination:service=Queue,name=ExpiryQueue</attribute>
-
- <!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
-
- <attribute name="DefaultRedeliveryDelay">0</attribute>
-
- <!-- The periodicity of the message counter manager enquiring on queues for statistics -->
-
- <attribute name="MessageCounterSamplePeriod">5000</attribute>
-
- <!-- The maximum amount of time for a client to wait for failover to start on the server side after
- it has detected failure -->
-
- <attribute name="FailoverStartTimeout">60000</attribute>
-
- <!-- The maximum amount of time for a client to wait for failover to complete on the server side after
- it has detected failure -->
-
- <attribute name="FailoverCompleteTimeout">300000</attribute>
-
- <attribute name="StrictTck">false</attribute>
-
- <!-- The maximum number of days results to maintain in the message counter history -->
-
- <attribute name="DefaultMessageCounterHistoryDayLimit">-1</attribute>
-
- <!-- The name of the connection factory to use for creating connections between nodes to pull messages -->
-
- <attribute name="ClusterPullConnectionFactoryName">jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory</attribute>
-
- <!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
- by a particular consumer from a particular producer? -->
-
- <attribute name="DefaultPreserveOrdering">false</attribute>
-
- <!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover -->
-
- <attribute name="RecoverDeliveriesTimeout">300000</attribute>
-
- <!-- Set to true to enable message counters that can be viewed via JMX -->
-
- <attribute name="EnableMessageCounters">false</attribute>
-
- <!-- The password used by the message sucker connections to create connections.
- THIS SHOULD ALWAYS BE CHANGED AT INSTALL TIME TO SECURE SYSTEM
- -->
- <attribute name="SuckerPassword">$uck3r</attribute>
-
- <!-- The name of the server aspects configuration resource
- <attribute name="ServerAopConfig">aop/jboss-aop-messaging-server.xml</attribute>
- -->
- <!-- The name of the client aspects configuration resource
- <attribute name="ClientAopConfig">aop/jboss-aop-messaging-client.xml</attribute>
- -->
-
- <depends optional-attribute-name="PersistenceManager">jboss.messaging:service=PersistenceManager</depends>
-
- <depends optional-attribute-name="JMSUserManager">jboss.messaging:service=JMSUserManager</depends>
-
- <depends>jboss.messaging:service=Connector,transport=bisocket</depends>
- <depends optional-attribute-name="SecurityStore"
- proxy-type="org.jboss.jms.server.SecurityStore">jboss.messaging:service=SecurityStore</depends>
- </mbean>
-
-</server>
import org.apache.commons.httpclient.methods.multipart.StringPart;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.ejb3.annotation.ResourceAdapter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
*/
@MessageDriven(activationConfig={@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/gss-indexingQueue")})
+@ResourceAdapter("hornetq-ra.rar")
public class IndexerMDBean implements MessageListener {
/**
* The logger