Time for action – opening the Chapter5 app

We will now take a look at the Chapter5 application and examine the configuration as it currently tands:

  1. Click on File menu and select Import.
  2. Choose Existing Projects into workspace and select the folder where the book samples have been extracted.
  3. Choose the Chapter5 project and click on Finish.
  4. Examine the jboss-esb.xml file and you will notice that the application defines two services but only one provider configuration. The second service makes use of the InVM transport, referenced through the use of the invmScope attribute on the service. The file will have the following content:
    <providers>
      <fs-provider name="Chapter5FSprovider">
        <fs-bus busid="Chapter5FileChannel">
          <fs-message-filter directory="${jboss.server.temp.dir}"
                      error-delete="false"
                      error-directory="${jboss.server.temp.dir}"
                      error-suffix=".IN_ERROR"
                      input-suffix=".dat" post-delete="false"
                      post-directory="${jboss.server.temp.dir}"
                      post-suffix=".sentToEsb"
                      work-suffix=".esbWorking"/>
        </fs-bus>
      </fs-provider>
    </providers>

    The list of services is as follows:

    <services>
      <service category="Chapter5Sample"
               description="A template for Chapter5"
               name="Chapter5Service">
        <listeners>
          <fs-listener busidref="Chapter5FileChannel"
                       name="Chapter5FSprovider"/>
        </listeners>
        <actions mep="OneWay">
          <action class="org.jboss.soa.esb.actions.SystemPrintln"
                  name="printMessage">
            <property name="message" value="Incoming"/>
          </action>
          <action class="org.jboss.soa.esb.actions.StaticRouter"
                  name="RouteToB">
            <property name="destinations">
              <route-to service-category="Chapter5Sample"
                        service-name="Chapter5BService"/>
            </property>
          </action>
        </actions>
      </service>
    
      <service category="Chapter5Sample"
               description="Chapter5 B Service"
               name="Chapter5BService"
               invmScope="GLOBAL">
        <actions mep="OneWay">
          <action class="org.jboss.soa.esb.actions.SystemPrintln"
                  name="printMessage">
            <property name="message" value="Incoming to B"/>
          </action>
        </actions>
      </service>
    </services>

    The following is a screenshot of this configuration loaded in the JBoss ESB editor:

    Time for action – opening the Chapter5 app
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset