Skip navigation
This project is read only now. Read more.

JBoss AS

6 posts

HornetQ was introduced in EAP5/AS5.  In that version of the server, HornetQ configuration metadata was spread over a set of XML files.

  • hornetq-configuration.xml
  • connection-factories-service.xml
  • destinations-service.xml
  • messaging-service.xml


In compliance with EAP6 and AS7's configuration model its metadata was moved into a "messaging" subsystem[1].  In this new design a 1:1 mapping between old XML and the new could not be maintained.


The attached zip file contains Windup rules that will assist migration of your HornetQ configuration data.  The rules check for the old style config files and run the contents through an XSLT transformation whose output can be cut and pasted into the server messaging subsystem.


You need a buildable copy of Windup[2].  Unzip the attached zip file in its base directory.  Build Windup and run as directed  here



Here is the metadata mapping between the old and new systems.


HornetQ config filesMessaging subsystem
<configuration> tag<hornetq-server>   ;replaces that tag
configuration.clusteredhornetq-server.clustered    ;Deprecated. .. is considered clustered if it has at least one cluster-connection.
dose not   ; only in subsystem
configuration.password-codecdoes not exist
configuration.mask-passworddoes not exist
configuration.log-delegate-factory-class-namedoes not exist
configuration.paging-directoryhornetq-server.paging-directory relative-to="" path=""  ; attrib additons or relative-to and path
configuration.bindings-directoryhornetq-server.bindings-directory relative-to="" path=""  ; attrib additons or relative-to and path
configuration.journal-directoryhornetq-server.journal-directory relative-to="" path=""  ; attrib additons or relative-to and path
configuration.large-messages-directoryhornetq-server.large-messages-directory relative-to="" path=""  ; attrib additons or relative-to and path

There is a major difference in the connector XML.  All connector def use a single template

      <connector name="##REQUIRED##" >
           <param key="##REQUIRED##"   value="##REQUIRED##"/>

This XML has 3 different templates depending on the connector type.


<netty-connector name="##REQUIRED##"

          <param key="##REQUIRED##" value="##REQUIRED##"/>

<in-vm-connector  name="##REQUIRED##"

           <param key="##REQUIRED##" value="##REQUIRED##"/>

<connector name="##REQUIRED##"

            <param key="##REQUIRED##" value="##REQUIRED##"/>

There is a major difference in the acceptor XML.  All acceptor def use a single template


<acceptor name="##OPTIONAL##" >
         <param key="##REQUIRED##" value="##REQUIRED##"/>

This XML has 3 different templates depending on the acceptor type.


<netty-acceptor name="##OPTIONAL##" socket-binding="##REQUIRED##">
            <param key="##REQUIRED##" value="##REQUIRED##"/>

<in-vm-acceptor name="##OPTIONAL##"  server-id="##OPTIONAL##">
            <param key="##REQUIRED##" value="##REQUIRED##"/>

<acceptor name="##OPTIONAL##"  server-id="##OPTIONAL##">



broadcast-group.jgroups-stack  ; does this replace jgroups-file?



broadcast-group.local-bind-address  ; Deprecated. use socket-binding instead

broadcast-group.local-bind-port  ; Deprecated. use socket-binding instead  ; Deprecated. use socket-binding instead  ; Deprecated. use socket-binding instead


discovery-group.jgroups-stack  ; does this replace jgroups-file?



discovery-group.local-bind-address  ; Deprecated. use socket-binding instead

discovery-group.local-bind-port  ; Deprecated. use socket-binding instead  ; Deprecated. use socket-binding instead  ; Deprecated. use socket-binding instead

bridges.failover-on-server-shutdown  ; Deprecated. ignored
bridges.reconnect-attempts-same-nodedoes not exist
address-settings.address-setting.expiry-delaynot supported
address-settings.address-setting.redelivery-delay-multipliernot supported
address-settings.address-setting.max-redelivery-delaynot supported
address-settings.address-setting.max-delivery-attemptsnot supported
address-settings.address-setting.address-full-policy  ; an ENUM defines legal valuesENUM value 'FAIL' is not offered.
configuration is the tagjms-connection-factories    ;the tag being used.
<connection-factory name=""  "signature="">

<connection-factory name=""  "signature="">   ; attribute removed


jms-connection-factories.connection-factory.factory-type  ; new in subsystem.  It is an ENUM.  Does it replace attribute signature?

configuration.jmx-domaindoes not exist
connection-factory.xadoes not exist
connection-factory.failover-on-server-shutdownDeprecated. and ignored





[1] $SERVER_HOME/docs/schema/jboss-as-messaging_1_3.xsd.




Tubame and Windup are Java EE application migration productivity tools.  Each simplifies the migration of applications from other containers to the current release of JBoss application server.   Both tools analyze application code and produce a report of found issues.  They are both open source projects.  This survey compares the features of these two tools.





Tubame was developed by Nippon Telegraph and Telephone,(NTT).  It has been used by its internal engineering teams for several years.  It is a set of 6 Eclipse plugins.  In Sep 2013 NTT made 3 of the plugins available to the public via the open source project Tubame [1].


Windup was developed at Red Hat.  Internally it was known as project Cake and was used by Red Hat consultants.  Windup is a standalone Java application. It was made available to the public Jun 2013 via the open source project Windup [2].




Tool Design





Tubame is a set of 3 Eclipse plugins and an single external, customizable rules file.  The tool analyzes the source code based on the set of rules provided in the rules file.  The analysis is only preformed on text based, Java, JSP, and XML files provided in the project directory.  The results are saved to a file and subsequently formatted and displayed as a report in a custom Eclipse perspective, KnowledgeBase Search Tool.  Tubame enables the user to customize the external rules file and issue advise through its Knowledge Manager Tool perspective. The views in this perspective guide the user through editing the fields of the rules file.


Windup is a standalone Java application.  It loads multiple external, customizable rules files.  It analyzes files both in a directory structure and in archive files.  It analyzes text based Java, JSP, and XML files, as well as, compiled classes if a decompiler library is provided.   The report is a set of HTML documents.  The user can customize existing rules files and provide new ones, using any XML file editor.





Tubame and Windup are rules-based tools. Each has defined its own namespace and metadata format for its XML rules file [3],[4].  Each has a predefined, set of rules against which code is evaluated and a rules engine that preforms the analysis.  Both  provide a means for the user to add rules to the default set without having to rebuild the tool.


Windup's rule definitions are a small set of custom Spring beans.  Each bean takes several input parameters.  The key parameter is a search pattern defined by either a Regular Expression, (regex) or an XPath expression.  The rules engine uses Spring dependency injection to load its rules and Java regex and xpath utilities when evaluating the source files.


Tubame uses a single custom schema type for all its rules.  JAXB is used to load the rules into the engine.  The schema has defined 2 fields in which search text can be entered. The fields accept regex and XPath expressions.  There is a field to specify a custom Python object to execute during the code analysis phase.  When no custom Python object is present in the rule, the engine executes a default set of Python objects in its code analysis.





Tubame and Windup use different reporting frameworks but provide similar information.  Both reports group issues into categories, link to the offending source code, provide advise for issue resolution, and estimate the work effort.  Tubame uses a custom Eclipse perspective for its report.  The perspective provides a set of views.  There is a view that displays the analysis results, the detail advise for rules, and monitors work status.  Windup generates a set of HTML documents for its report.  There is a top level summary page and a detailed page for each file containing issue(s) to be addressed and advise on how to resolve the issue(s).  The reports differ in that Tubame lists all the rules it processes in its report.  The user must search the list for flagged issues.  Windup lists only the issues that need to be addressed.  Tubame and Windup use a different unit of measure for work effort.  Tubame uses man-hours.  Windup uses story points, a measure indicating level of complexity or difficultly.  It is left to the user to specify the man-hours base upon task complexity and their skill level.





Tubame and Windup both require Java 1.6 or higher.  Windup uses a maven multi-module archtype.  The project sources can be built from the command-line or with any IDE that supports maven.  Tubame plugins must be built from within Eclipse.  It is a multi-step process requiring compiling several foundational projects, manually copying JAR files into the plugin projects, and running the plugin-wizard on each plugin.





Windup's project wiki provides guides for building and running the tool, and customizing rules.  There is also a video overview of the tool, a detailed look at the report and walk through of enhancing the rule set.


Tubame's project wiki pages provides guides for building and installing the plugins, using the custom perspectives and adding rules to the project.




Feature Comparison


Tool TypeEclipse PluginsStandalone Java Application
Open Source Project

Open Source License

Apache License, Version 2.0Eclipse Public License v1.0
OS Supported

Windows XP/7,


Any platform that runs Java 1.6
JREJRE/JDK 1.6 or higherJRE/JDK 1.6 or higher

Execution Env

Eclipse 3.7 Indigo ONLY  (Juno and Kepler not supported)


(Optional Eclipse plugin available)

Project Technology Dependencies



Eclipse (Indigo) API

Python 2.7






Spring API  (3.1.0.RELEASE)

JDT api






Input Data Formats

Text files: Java, JSP, XML in an Eclipse Java Project

Text files, archive files: Java, JSP, XML, class* provided in a directory structure.

* user must provide decompiler library

Output Formats

custom .jbm file




Default Rules Files



























Build TechnologyJava and Eclipse plugin build processJava and Maven multi-module archtype



Bug Feporting



GitHub project



GitHub project

Windup Forum

Windup email list

Download Archive Formatmultiple zip filessingle jar file






[1] Tubame project page

[2] Windup project page

[3] Tubame Rules Schema

[4] Windup Rules Schema

Here is an example of a Windup xpath-value rule checking XML statements for non-default values.  Most users only write rules to flag a statement when a specific value is found.  The example is doing the opposite.


Here is the XML that the rule will evaluate.




        <!-- +++ This element is using all the default values. +++ -->

        <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"

         emptySessionPath="true" enableLookups="false" redirectPort="8443" />


        <!-- +++ This element is using a non-default port number. +++ -->

        <Connector port="5995" address="${jboss.bind.address}" protocol="AJP/1.3"

         emptySessionPath="true" enableLookups="false" redirectPort="8443" />






The first connector statement is using all the default values of the element.  The second connector is using a custom port.  I am going to provide a rule that determines that the first connector is using all the default settings and therefore will not be flagged, but flags the second connector as needing attention because a non-default value was found.


Here is the rule.  It uses a fairly complex XPath construct but it does the job.



    description="A custom connector attribute setting has been detected."

    xpath="//Server/Service/Connector[@protocol = 'AJP/1.3'

        and @port != '8009'

        or @address != '${jboss.bind.address}'

        or @emptySessionPath != 'true'

        or @enableLookups != 'false'

        or @redirectPort != '8443']"

        inline="true" effort="1">





If I was only interested in the connectors in a named service?




    <Service name="jboss.web">

        <!-- +++ This element is using all the default values. +++ -->

        <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"

         emptySessionPath="true" enableLookups="false" redirectPort="8443" />


        <!-- +++ This element is using a non-default port number. +++ -->

        <Connector port="5995" address="${jboss.bind.address}" protocol="AJP/1.3"

         emptySessionPath="true" enableLookups="false" redirectPort="8443" />






The rule would be



    description="A custom connector attribute setting has been detected."

    xpath="//Server/Service[@name = 'jboss.web']/Connector[@protocol = 'AJP/1.3'

        and @port != '8009'

        or @address != '${jboss.bind.address}'

        or @emptySessionPath != 'true'

        or @enableLookups != 'false'

        or @redirectPort != '8443']"

        inline="true" effort="1">






If I was interested only in services not named 'jboss.web'?



    <Service name="">







The rule would be



    description="A custom connector attribute setting has been detected."

    xpath="//Server/Service[@name != 'jboss.web']/Connector[@protocol = 'AJP/1.3'

        and @port != '8009'

        or @address != '${jboss.bind.address}'

        or @emptySessionPath != 'true'

        or @enableLookups != 'false'

        or @redirectPort != '8443']"

        inline="true" effort="1">


Migrating a whole running Java EE environment from one Java EE server implementation to another is like moving from one IDE to another.  All IDEs do pretty much the same thing.  All IDEs UI are similar yet different enough to be bothersome until you develop a sufficient familiarity. A majority of their underlying functionality is also the same yet each has its own nuances.  To help you make the transition from other Java EE server implementations to the current JBoss EAP or community releases, Red Hat JBoss provides a micro web-site, Migration Center. The web-site provides the following,

  • Migration planning and preparation advise 
  • Guides for becoming familiar with JBoss' server UI and features 
  • Vendor specific migration assistance, for example there is advise for replacing Oracle WebLogic's CommonJ Framework and the Work Manager API. 
  • Tools that simplify the migration of applications and server configuration settings.
    • Windup, a Java application that simplifies Java application migrations
    • WindRide, a JBoss server configuration migration tool
    • Tubame, a set of Eclipse plugins that assists in migrating Java EE applications
  • Access to the JBoss open source community for discussions, assistance, and topic contributions
    • Migration fourm
    • Migration IRC channel
    • Migration project repositories
  • Access to Red Hat Consulting Services, the JBoss migration professionals

AS 7's default persistence provider is Hibernate 4.   It is provided as a module.   A different persistence provider can be added to the server via a module definition.  Lets add Hibernate 3 to the server.   Lets find the Hibernate 4 module definiton and use it as the model to add a Hibernate 3 module.  Look for hibernate in your  ${JBOSS_HOME}/modules directory.


          cd ${JBOSS_HOME}

         find modules -name "*hibernate*"






















As you can see there are quit a few hibernate achives present.  Lets ferret out the one that is of interest to us.  But first I should tell you  there is a directory naming convention for modules.  Part or all of the package name of the APIs that make up the module's content is used as the directory path.  The dot-separated segments of the package's name are given as the directory name.  In addition a path ending with the name "main" indicates that it  is to be used as the default module.  When the last name is other than "main" it is the definition of a "slot" name.  The "slot" name is called out in the application to reference the module to be use.


With this information we can summize from the directory and jar file names that, modules/javax/persistence/api/main/hibernate-jpa-2.0-api-1.0.1.Final.jar is the java spec API for JPA, modules/org/hibernate/main/hibernate-commons-annotations-4.0.1.Final.jar are annotation related APIs, modules/org/hibernate/envers/main/hibernate-envers-4.0.1.Final.jar are support APIs, modules/org/hibernate/validator/main/hibernate-validator-4.2.0.Final.jar are the validator APIs, and modules/org/jboss/as/jpa/hibernate/main/jboss-as-jpa-hibernate4-7.1.1.Final.jar are the core APIs in which we are interested.  Lets look at the contents of directory, modules/org/jboss/as/jpa/hibernate/main.



     ls modules/org/jboss/as/jpa/hibernate/main






The directory contains 2 required files and 1 optional file. The JAR archive and the module.xml file are required.   The JAR file contains the APIs being referenced.  The module.xml file is the module descriptor; it describes the structure, content, dependencies, filtering, and other attributes of the module.  We will need to provide a Hibernate 3 jar file and create the corresponding module.xml file.


The index file is optional.  It is generated by the jandex utility, which processes Java annotations within a directory or jar file, and saves the resulting metadata in an index file.  This information fosters faster loading of the module.   You do not need to generate this file.  The application server will generated it for you the first time the module is loaded. 


Let create a Hibernate 3-7.1.2 module. The jar file can be downloaded from



Following the naming convention our Hibernate 3 module should have a directory path name of modules/org/jboss/as/jpa/hibernate.   We need to define an end directory name.  This will be the slot name for this module.  Lets name it 3.


     mkdir modules/org/jboss/as/jpa/hibernate/3


Copy the jar into this directory


    cp /tmp/jboss-as-jpa-hibernate3-7.1.2.Final.jar modules/org/jboss/as/jpa/hibernate/3


The module descriptor for this archive will be nearly the same as for Hibernate 4.  Copy the module.xml file from modules/org/jboss/as/jpa/hibernate/main into modules/org/jboss/as/jpa/hibernate/3 and edit it.


    cp  modules/org/jboss/as/jpa/hibernate/main/module.xml modules/org/jboss/as/jpa/hibernate/3


     <!-- contains the JPA integration classes for Hibernate 4.x -->

     <module xmlns="urn:jboss:module:1.1" name="">


             <property name="jboss.api" value="private"/>




             <resource-root path="jboss-as-jpa-hibernate4-7.1.1.Final.jar"/>

             <!-- Insert resources here -->




             <module name="javax.annotation.api"/>

             <module name="javax.persistence.api"/>

             <module name="javax.transaction.api"/>

             <module name="org.hibernate" services="import"/>

             <module name="org.hibernate.validator"/>

             <module name="org.infinispan"/>

             <module name=""/>

             <module name=""/>

             <module name=""/>

             <module name=""/>

             <module name=""/>

             <module name=""/>

             <module name="org.jboss.jandex"/>

             <module name="org.jboss.logging"/>

             <module name="org.jboss.msc"/>

             <module name="org.jboss.vfs"/>





Add attribute slot="3" to the module element.  Change the name of archive from jboss-as-jpa-hibernate4-7.1.1.Final.jar to jboss-as-jpa-hibernate3-7.1.2.Final.jar and save the file.


    <module xmlns="urn:jboss:module:1.1" name="" slot="3">





             <resource-root path="jboss-as-jpa-hibernate3-7.1.2.Final.jar "/>

             <!-- Insert resources here -->




The last step is to enable your application to reference the Hibernate 3 module.  Change your  application's persistence.xml file.  Add a property element to the persistence-unit element.  The name of the property is  The value is the name of the module as defined by the name attribute of the module in the module.xml file.  In addition, because this module has a slot name, append ":" followed by the slot name to the reference name.



     <persistence-unit name="${your unit name}">

              <description>Hibernate 3 persistence unit.</description>

              <jta-data-source>${your jpa src}</jta-data-source>


                       <property name=""





Your application should now run using Hibernate 3.



[1] Drop in a Hibernate 3.6.6.Final module:

[2] JBoss Modules, Introduction:

[3] How to Run JBoss Jandex:

The released quickstart ejb-multi-server is now available in the public JBoss Developer Framework github.


The example cointain several servers which are administered by a domain controller.

To invoke the EJB's there are web servers and a main ejb application which invoke other EJB's and a standalone client.


To get the sources use:


git clone

cd ejb-multi-server

mvn clean install