Version 15

    JBossMQ integration with JBossWeb

     

    Overview

     

    TODO

     

     

    Step 1: Install JBossWeb

     

     

     

    Get the latest version from http://www.jboss.com/products/jbossweb

     

     

     

     

     

    We'll call the JBossWeb install directory JBOSSWEB_HOME

     

     

    Step 2: Download JBossAS

     

     

     

    Get the correct version of JBossAS that JBossWeb is based on. For instance JBossWeb 1.0.1GA is based on JBossAS 4.0.5GA

     

     

     

     

    We'll call the JBossAS install directory JBOSS_HOME

     

    ===============================================================================
    .
      JBoss Web Server 1.0.1.GA Bootstrap Environment
    ......
    ===============================================================================
    .
    15:19:41,872 INFO  [Server] Starting JBoss (MX MicroKernel)...
    15:19:41,888 INFO  [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
    

     

     

    Step 3: Import the JBossMQ configuration

     

     

     

    Import JBOSS_HOME/server/default/lib/jbossmq.jar into JBOSSWEB_HOME/server/default/lib/

     

     

     

     

    Import JBOSS_HOME/server/default/deploy/jms into JBOSSWEB_HOME/server/default/deploy

     

    Step 4: Reconfigure the JMS provider loader

     

     

     

    The JMS Provider loader configuration has to be updated in order to access the connection factories bound on the remote jndi tree.

     

     

     

     

     

    Edit JBOSSWEB_HOME/server/default/deploy/jms/jms-ds.xml

     

     

      <!-- The JMS provider loader -->
      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
          name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
        <attribute name="ProviderName">DefaultJMSProvider</attribute>
        <attribute name="ProviderAdapterClass">
          org.jboss.jms.jndi.JNDIProviderAdapter
        </attribute>
        <!-- The combined connection factory -->
        <attribute name="FactoryRef">XAConnectionFactory</attribute>
        <!-- The queue connection factory -->
        <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
        <!-- The topic factory -->
        <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
        
        <attribute name="Properties">
           java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
           java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           java.naming.provider.url=192.168.4.151:1099
        </attribute>
    

     

    Step 5: Write a JSP client

     

     

     

    The client should create connections from the connection factory bound by the JMS Resource Adapter at "java:/JmsXA"

     

    Check out the following wiki page for details JBossJMSRA

     

     

     

     

     

     

    Example: JSP client

     

     

     

    Create a folder named test.war into /deploy and drop in it the attached JSP page (test.jsp)

     

     

     

    Open a browser window and go to http://localhost:8080/test/test.jsp

     

     

     

     

     

     

     

    Resources

     

    TODO