Version 4

     

     

     

     

    1. Check out a repository snapshot

     

    To check out the HEAD

     

    
    
               svn co  --username  <your-username> https://svn.jboss.org/repos/messaging/trunk messaging-head
    
    
    

     

    Note that you have to be registered on the JBoss website in order to be able to check out from the development SVN repository. If you prefer to check out from the anonymous repository, which is periodically synchronized with the development repository, you can use this command:

     

    
    
               svn co http://anonsvn.jboss.org/repos/messaging/trunk messaging-head
    
    
    

     

     

    Be aware there is a certain lag (max 10 minutes unless something is broken) between the developer's SVN and the anonymous SVN, so if you use anonymous access, it is possible to miss newly checked in files.

     

    To check out a specific branch

     

    
    
               svn co  --username  <your-username> https://svn.jboss.org/repos/messaging/branches/Branch_1_0 messaging-Branch_1_0
    
    
    

     

    To check out a specific tag (release)

     

    
    
               svn co  --username  <your-username> https://svn.jboss.org/repos/messaging/tags/JBossMessaging_1_0_1_GA messaging-1.0.1.GA
    
    
    

     

    *Note*

    The directory you used to check out Messaging in will be henceforth referred as $MESSAGING_HOME.

     

    2. Build

     

    
    
               cd $MESSAGING_HOME
               ant
    
    
    

     

    Are page changes monitored?  If so these directions need to be updated.  They generate the following error:

     

     

    ...
    compile-classes:
        [javac] Compiling 309 source files to c:\tools\jbossMessagingSnapshot5\messaging-head\output\classes
        [javac] c:\tools\jbossMessagingSnapshot5\messaging-head\src\main\org\jboss\messaging\core\impl\bdbje\integration\RealBDBJEDatabase.java:8: package com.sleepycat.bind does not exist
        [javac] import com.sleepycat.bind.EntryBinding;
        [javac]                          ^
    ...
    
    
    BUILD FAILED
    c:\tools\jbossMessagingSnapshot5\messaging-head\build.xml:92: The following error occurred while executing this line:
    c:\tools\jbossMessagingSnapshot5\messaging-head\build-messaging.xml:250: Compile failed; see the compiler error output for details.
    
    Total time: 37 seconds
    
    
    However if I add the jar to the following lib and re-ant the build is Successful.
    $ cd /cygdrive/c/tools/jbossMessagingSnapshot5/messaging-head/lib
    $ cp "c:/My Downloads/je-3.2.44.jar" .
    
    
    
    

     

     

     

     

     

    *Note*

    The first build will take a while (about 2 minutes, on a machine with broadband internet connection), since the build process connects to http://repository.jboss.com and download all required depencies. The dependencies are cached so subsequent builds will be a lot faster, unless $MESSAGING_HOME/build-thirparty.xml is modified or the thirdparty directory is deleted.

     

    3. Run functional tests

     

    DB prerequisites

     

      The test suite requires a MySQL database to run.

     

    • create a messaging database

    • download connector/j and install the driver in $MESSAGING_HOME/tests/lib/jdbc-drivers

    • check that the sa@localhost user can connect to the messaging database without a password

     

    Once the database is setup, you can run the functional tests:

     

    
    
               cd $MESSAGING_HOME/tests
               ./build.sh report
    
    
    If this page is monitored.  I receive an error about the minaService when I run the above.
    
    ...
        [junit] main 10:36:50,765 INFO  [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_3] - TransactionStatusManager started on port 1974 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
        [junit] main 10:36:53,125 INFO  [ServerManagement] Attempting to create local server 0
        [junit] main 10:36:53,203 INFO  [LocalTestServer] Deleted dir: C:\Documents and Settings\Charles Magid\bdbje\env deleted: true
        [junit] main 10:36:55,125 ERROR [AbstractKernelController] Error installing to Instantiated: name=MinaService state=Described
        [junit] java.lang.IllegalArgumentException: No enum const class org.jboss.messaging.core.remoting.TransportType.tcp
        [junit]      at java.lang.Enum.valueOf(Enum.java:192)
        [junit]      at org.jboss.reflect.plugins.ValueConvertor.convertValue(ValueConvertor.java:130)
        [junit]      at org.jboss.reflect.plugins.ClassInfoImpl.convertValue(ClassInfoImpl.java:485)
        [junit]      at org.jboss.beans.metadata.plugins.StringValueMetaData.getValue(StringValueMetaData.java:107)
        [junit]      at org.jboss.kernel.plugins.config.Configurator.getParameters(Configurator.java:857)
    
    ...
    
    
    

     

    To use a database other than mysql:

     

    
    Edit the database configuration in tests/etc/container.xml for the database you intend to use, say, oracle.
    Download and install the jdbc driver for your database in {{$MESSAGING_HOME/tests/lib/jdbc-drivers}}
    
    cd $MESSAGING_HOME/tests
    ./build.sh report -Dfunctional.tests.database=oracle -Dstress.tests.database=oracle -Dclustering.tests.database=oracle
    
    

     

    *Note*

    The final result of a functional test run is a $MESSAGING_HOME/tests/output/reports/html/index.html human-readable HTML page that can be viewed by loading it in a browser. A typical full test run takes about 30 minutes.

     

     

    4. Install Messaging within a JBoss AS instance

     

    Follow the instructions in the userguide for installing JBoss Messaging in JBoss AS

     

    5. Start the Messaging server

     

    To start the Messaging-enabled JBoss instance:

     

    
    
               cd $JBOSS_HOME/bin
               ./run.sh -c messaging
    
    
    

     

    A successful Messaging deployment generates logging output similar to:

     

    .....
    00:25:41,901 WARN  [JDBCPersistenceManager] 
    
    JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
                             Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
                             Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
    
    00:25:42,241 INFO  [ServerPeer] JBoss Messaging 1.0.1.CR5 server [server.0] started
    00:25:42,652 INFO  [ConnectionFactory] Connector socket://192.168.1.105:4457 has leasing enabled, lease period 20000 milliseconds
    00:25:42,652 INFO  [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] deployed
    00:25:42,672 INFO  [Queue] Queue[/queue/DLQ] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,692 INFO  [Topic] Topic[/topic/testTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,692 INFO  [Topic] Topic[/topic/securedTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,692 INFO  [Topic] Topic[/topic/testDurableTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,692 INFO  [Queue] Queue[/queue/testQueue] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,712 INFO  [Queue] Queue[/queue/A] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,712 INFO  [Queue] Queue[/queue/B] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,712 INFO  [Queue] Queue[/queue/C] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,712 INFO  [Queue] Queue[/queue/D] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,772 INFO  [Queue] Queue[/queue/ex] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,782 INFO  [Topic] Topic[/topic/openTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
    00:25:42,872 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
    .....
    

     

    *Note*

    The "warning" is something that you should normally expect if you use Messaging with HSQLDB.

     

    6. Run the examples

     

    Start the Messaging-enabled JBoss instance, as described above. Keep in mind that the environment in which examples are run must contain the same JBOSS_HOME definition as the one used to install Messaging.

     

    To run the "queue" example:

     

    
    
               cd $MESSAGING_HOME/docs/examples/queue
               ant
    
    
    

     

    A successful run output should be similar to:

     

    $ ant
    Buildfile: build.xml
    
    identify:
         [echo] ###########################################################################
         [echo] #                       Running the QUEUE example                         #
         [echo] ###########################################################################
         [echo] The queue:      testQueue
         [echo] The client jar: ../../../output/lib/jboss-messaging-client.jar
    
    sanity-check:
    
    init:
        [mkdir] Created dir: C:\work\src\svn\messaging-head\docs\examples\queue\output
        [mkdir] Created dir: C:\work\src\svn\messaging-head\docs\examples\common\output
    
    compile:
        [javac] Compiling 2 source files to C:\work\src\svn\messaging-head\docs\examples\common\output
        [javac] Compiling 1 source file to C:\work\src\svn\messaging-head\docs\examples\queue\output
    
    run:
         [java] Queue /queue/testQueue exists
         [java] The message was successfully sent to the testQueue queue
         [java] Received message: Hello!
         [java] The example connected to JBoss Messaging version 1.0.1.CR5 (1.0)
    
         [java] #####################
         [java] ###    SUCCESS!   ###
         [java] #####################
    
    BUILD SUCCESSFUL
    Total time: 5 seconds
    

     

    *Note*

    Available examples (at the time of writing): queue, topic, mdb, stateless, ejb3mdb and secure-socket.

     

    7. Deploy a test destination (under JBoss 4.x)

     

    Since JBoss Messaging is deployed in its own class loading domain, you need to deploy the destinations you want to use with JBoss Messaging within the same class loading domain. An example of a deployment descriptor that does that is presented below. Create a new deployment descriptor named myqueue-service.xml (or anything else that ends in -service.xml) and copy it in your deployment directory.

     

    <?xml version="1.0" encoding="UTF-8"?>
    
    <server>
    
       <loader-repository>jboss.messaging:loader=ScopedLoaderRepository
           <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
       </loader-repository>
    
       <mbean code="org.jboss.jms.server.jmx.Queue"
          name="jboss.messaging.destination:service=Queue,name=myQueue">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       </mbean>
      
    </server>
    

     

     

    8. Branches Used on 1.4

     

    • Branch_Stable contains all the fixes that are going against 1.4.1+ Which is used on JBoss 5

    • Branch_JBossMessaging_1_4_0_SP3_CP contains the upstream fixes for EAP versions

     

    Referenced by: