3.3. Preparing your JBoss Enterprise Application Platform

The JBoss Enterprise Application Platform needs to be set up to run your application. This step involves:
  • setting up the Spring deployer
  • creating a Destination for JMS-related features
  • creating a security domain
The Spring deployer is set up by extracting the Snowdrop and Spring modules and copying them to the $JBOSS_HOME/modules directory and adding the Snowdrop subsystem to the target profile. Refer to the Spring deployer section of the Snowdrop User Guide for details.
For creating the required JMS destination, add the highlighted definition to the messaging subsystem, in $JBOSS_HOME/standalone/configuration/standalone-full.xml:

<subsystem xmlns="urn:jboss:domain:messaging:1.3">
    ...
        <hornetq-server>
            ...
                <jms-destinations>
            ...
            <!-- Code to be added starts here -->
                <jms-queue name="sportsclub">
                     <entry name="queue/sportsclub"/>
                </jms-queue>
            <!-- Code to be added ends here -->
        </jms-destinations>
    </hornetq-server>
</subsystem>
For creating the security domain, add the indicated highlighted definition to the security subsystem:
<subsystem xmlns="urn:jboss:domain:security:1.2">
    <security-domains>
        ...
        <!-- Code to be added starts here -->
            <security-domain name="employees">
                <authentication>
                    <login-module code="Database" flag="required">
                        <module-option name="dsJndiName" value="java:jboss/datasources/ExampleDS"/>
                        <module-option name="principalsQuery" value="select passwd from SPORTSCLUB_USERS where username=?"/>
                        <module-option name="rolesQuery" value="select userRoles,'Roles' from SPORTSCLUB_ROLES where username=?"/>
                    </login-module>
                </authentication>
            </security-domain>
        <!-- Code to be added ends here -->
    </security-domains>
</subsystem>