Search

Chapter 29. Publishing Fuse Integration Projects to a Server

download PDF

You deploy Fuse Integration projects into a server runtime using the Eclipse publishing mechanism. To do so, you must have defined and added the server to the Servers view in the Fuse Integration perspective. For a step-by-step demonstration, see .

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 view has its own Overview page that contains its configuration, connection, and publishing details:

UGservRuntimeOverviewTab

You might 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 the server runtime to which you want to publish a Fuse project. For details, see Section 28.2, “Starting a Server”.
  2. In the Servers view, 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 view, right-click the server runtime to open the context menu, and then select Add and Remove.

    UGservAddRemove1

    All resources available for publishing appear in the Available column.

  6. To assign a resource (in this case, the CBRroute Fuse project) to the server runtime:

    • Double-click it, or
    • Select it, and click Add.

      The selected resource moves to the Configured column:

      UGservAddRemove2

      At this stage, the time at which the assigned resource would actually be published depends 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:

    UGservAddRemove3

    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 view 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 is [Started,Synchronized]:

    UGservPublishSynched
    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 the server runtime to which you want to publish a Fuse project. For details, see Section 28.2, “Starting a Server”.
  2. In the Servers view, double-click the server runtime to open its Overview page.
  3. Expand Publishing, and then select Never publish automatically.
  4. Click File Save to save the publishing option changes.
  5. If the Fuse project has already been assigned to the server runtime, make sure this option is disabled: If server started, publish changes immediately:

    1. In the Servers view, 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 following option is enabled, disable it: If server started, publish changes immediately.
    4. Skip to [finish].
  6. If the Fuse project has not been assigned to the server runtime, assign it now:

    1. Follow [startAssignResource] through [stopAssignResource] in the section called “Publishing Fuse projects automatically when resources change”.
    2. Do not enable the If server started, publish changes immediately option.
  7. Click Finish.

    The project appears in the Servers view under the server runtime node, and the server runtime status reports [Started]:

    UGservPublishSynched
  8. In the Servers view, right-click the project’s node. In this example, select the CBRroute Fuse project to open the context menu:

    UGassgnProjSrvViewCntxtMnu
  9. 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 the Servers view”.
  2. In the Servers view, expand the server runtime tree to expose the Bundles node and select it.

    The tooling populates the Properties view with a list of bundles that are installed on the server:

    UGsrvVerifyPublishedProj
  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 the Properties view’s Search box. The bundle’s Symbolic Name is the name you gave your project when you created it.

    Note

    Alternatively, you can issue the osgi:list command in the Terminal view to see a generated list of bundles installed on the Fuse server runtime. The tooling uses a different naming scheme for OSGi bundles displayed by the osgi:list command.

    In the <build> section of project’s pom.xml file, you can find the bundle’s symbolic name and its bundle name (OSGi) listed in the maven-bundle-plugin entry; for example:

    ugBundleNamesPomFile
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.