Chapter 28. Publishing Fuse Projects to a Server


Abstract

You deploy Fuse projects into a server runtime using the Eclipse publishing mechanism. To do so, you must have defined and added the server to the Servers panel in Fuse Integration perspective (for details, see Chapter 27, Managing servers. For a step-by-step demonstration, see Red Hat JBoss Fuse Tooling Tutorials, To Publish a Fuse Project to Red Hat JBoss Fuse.

Overview

You can set up supported servers to publish assigned Fuse projects automatically or to publish them only when you manually invoke the publish command.
Each server runtime added to the Servers panel has its own Overview page that contains its configuration, connection, and publishing details:
You may need to expand Publishing to expose the server runtime publishing options and default settings:
  • Never publish automatically—You must select this option to manually publish projects.
    Important
    You must also disable the If server started, publish changes immediately option on the server's Add and Remove page (for details see, the section called “Publishing Fuse projects manually”.
  • Automatically publish when resources change—[default] Enable this option to automatically publish or republish a Fuse project when you save changes made to it. How quickly projects are published depends on the Publishing interval (default is 15 seconds).
  • Automatically publish after a build event—For Fuse projects, works the same as Automatically publish when resources change.

Publishing Fuse projects automatically when resources change

The default publishing option for server runtimes is Automatically publish when resources change.
  1. If necessary, start up the server runtime to which you want to publish a Fuse project. For details, see Section 27.2, “Starting a Server”.
  2. In the Servers panel, double-click the server runtime to open its Overview page.
  3. Expand Publishing, and then select Automatically publish when resources change.
  4. To increase or decrease the interval between publishing cycles, click the radio button next to Publishing interval (in seconds) up or down, as appropriate.
  5. In the Servers panel, right-click the server runtime to open the context menu, and then select Add and Remove.
    All resources available for publishing appear in the Available column.
  6. To assign a resource (in this case, the wildThing Fuse project) to the server runtime:
    • double-click it, or
    • select it, and click Add >.
    The selected resource moves to the Configured column:
    At this stage, the time at which the assigned resource would actually be published would depend on whether the server runtime was running and on the Publishing interval setting. However, if the server was stopped, you would have to manually publish the project after you started the server (for details, see the section called “Publishing Fuse projects manually”).
  7. Click the If server started, publish changes immediately option to enable it:
    This option ensures that the configured project is published immediately once you click Finish. The Automatically publish when resources change option on the server runtime Overview page ensures that the configured project is republished whenever changes made to the local project are saved.
  8. Click Finish.
    The project appears in the Servers panel under the server runtime node, and the server runtime status reports [Started,Publishing...]:
    When publishing is done, the status of both the server runtime and the project report [Started,Synchronized]:
    Note
    For a server runtime, Synchronized means that all published resources on the server are identical to their local counterparts. For a published resource, Synchronized means that it is identical to its local counterpart.

Publishing Fuse projects manually

  1. If necessary, start up the server runtime to which you want to publish a Fuse project. For details, see Section 27.2, “Starting a Server”.
  2. In the Servers panel, double-click the server runtime to open its Overview page.
  3. Expand Publishing, and then select Never publish automatically.
  4. If the Fuse project has already been assigned to the server runtime, make sure the If server started, publish changes immediately option is disabled.
    1. In the Servers panel, right-click the server runtime to open the context menu.
    2. Click Add and Remove... to open the server's Add and Remove page.
    3. If the If server started, publish changes immediately option is enabled, disable it.
    4. Skip to Step 6.
  5. If the Fuse project has not been assigned to the server runtime, assign it now.
    1. Do not enable the If server started, publish changes immediately option.
  6. Click Finish.
    The project appears in the Servers panel under the server runtime node, and the server runtime status reports [Started]:
  7. In the Servers panel, right-click the project's node (in this case, the Fuse project wildThing) to open the context menu:
  8. Select Full Publish.
    During the publishing operation, the status of both the server runtime and the project report [Started,Republish]:
    When publishing is done, the status of both the server runtime and the project report [Started,Synchronized]:
    Note
    The tooling does not support the Incremental Publish option. Clicking Incremental Publish results in a full publish.

Verifying the project was published to the server

After you have published a Fuse project to a server runtime, you can connect to the server and check that the project's bundle was installed on it.
  1. Connect to the server runtime. For details see the section called “Connecting to a running server in Servers panel”
  2. In the Servers panel, expand the server runtime tree to expose the Bundles node and select it.
    The tooling populates Properties view with a list of bundles that are installed on the server:
  3. To find your project's bundle, either scroll down to the bottom of the list, or start typing the bundle's symbolic name in Properties view's Search box.
    The bundle's symbolic name is the artifactId you gave the project when you created it. You can find the artifactId at the very beginning of the project's pom.xml file. To open it in the tooling's XML editor, click pom.xml in Project Explorer, and then click the pom.xml tab in the XML editor.

Related topics

Red Hat JBoss Fuse Tooling Tutorials, To Publish a Fuse Project to Red Hat JBoss Fuse
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.