-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat Fuse
Tooling User Guide
Developing and Debugging Applications
Red Hat
Copyright © 2011-2015 Red Hat, Inc. and/or its affiliates.
Abstract
Part I. Introducing the Fuse Tooling User Interface
Chapter 1. JBoss Perspective
Overview
Figure 1.1. route editor
- Canvas—the large grid area on which routes are constructed
- Palette—the pane to the right of the canvas from which Enterprise Integration Patterns (EIPs) are selected
- Project view—the pane on the left side of the canvas, which can display multiple views of the active project. The pane defaults to Project Explorer, which displays the project's folders and files in an hierarchical tree format.NoteRed Hat recommends you to close the JMX Navigator view and then drag Outline view from the upper right side of the workspace to the lower left side, beneath Project Explorer, to provide optimal space for the route editor. Outline view displays, in an outline of EIP icons, the contents of the current
<camelContext>
element in the routing context file. - Properties editor—the editor in which you configure the selected node's properties. It opens in a tab in the pane below the canvas.
Canvas
Palette
- Components—endpoint patterns that start or end a route
- Defined Endpoints—endpoint nodes that have been defined in the routing context
- Routing—patterns that direct the flow of messages based on specified criteria
- Control Flow—patterns that behave like control functions in a programming language. For example, some define loops, some handle error conditions, some handle transactions, and so on.
- Transformation—patterns that change the contents of a message as it passes through a route
- Miscellaneous—patterns that control the environment in which a route executes. For example, the
Threads
pattern specifies the number of threads available.
Project Explorer
Outline view
Properties editor
Figure 1.2. Properties editor's error reporting
Chapter 2. Debug Perspective
Overview
Figure 2.1. Debug perspective
- Debug viewFor the running routing context, Debug view displays the debug stack.You can switch between breakpoints within the same message flow, listed under the
Camel Context at service:jmx:rmi://jndi/rmi://localhost:1099/jmxrmi/camel
entry, to review and compare variable values in Variables view.Messages flows are identified by their unique breadcrumb ID, and the breadcrumb ID of each subsequent message flow is incremented by 2. For example, in Figure 2.1, “Debug perspective”, the breadcrumb ID for the first message flow isID-janemurpheysmbp-home-61339-11430424775526-0-1
, so the breadcrumbID for the second message flow would beID-janemurpheysmbp-home-61339-11430424775526-0-3
. - Variables viewFor each node in the routing context that has a breakpoint set, Variables view displays the value of the available variables when the breakpoint is hit. Each variable who's value changed since the preceding breakpoint is highlighted in yellow.You can change the value of editable variables to check whether such changes produce the expected results and to test the robustness of your routing context.You can also add variables to the watch list, so you can quickly and easily see whether their values change as expected at the expected point in the message flow.
- Breakpoints viewDisplays a list of the breakpoints set in the routing context, and shows whether they are enabled or disabled. You can enable and disable individual breakpoints by checking (enabling) or unchecking (disabling) them. This enables you to temporarily focus on nodes in your routing context that are behaving problematically.The button skips over disabled breakpoints to jump to the next active breakpoint in the routing context. In contrast, the button jumps to the next node of execution in the routing context, regardless of breakpoints.
- Camel Context: viewDisplays the running CamelContext:
<CamelId>.xml
in graphical mode. For nodes set with breakpoints, it shows the type of breakpoint set and whether the breakpoint is enabled or disabled. When a breakpoint is hit, its corresponding node on the canvas is outlined in red.To check a node's configuration, open Properties view and then select the node on the canvas in Camel Context: view. - Console viewDisplays the log output generated by the Camel debugger as it executes the routing context.
- Properties viewDisplays the properties set for the node selected on the canvas in CamelContext: view.
Related topics
Part III, “Debugging Routing Contexts” |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Chapter 3. Fuse Integration Perspective
Overview
Figure 3.1. Fuse Integration perspective
- Project Explorer—displays all of the projects known to the tooling. You can view all of the artifacts that make up each project. Project Explorer also displays all of the routing context
.xml
. files for a project under its Camel Contexts node. This makes it easy for you to find and open the routing context file of any route included in a project. - JMX Navigator—lists the JMX servers and the infrastructure they monitor. It allows you to browse JMX servers and the pocesses they are monitoring. It also identifies instances of Red Hat processes.
- Diagram View—displays a graphical tree representing the node selected in JMX Navigator. When you select a process, server, endpoint, or other node, Diagram view shows the selected node as the root and branches down to its children and grandchildren.When you select a broker, Diagram View displays up to three children: connections, topics, and queues. It also shows configured connections and destinations as grandchildren.When you select a route, Diagram view displays all of the nodes in the route and shows the different paths that messages can take through it. It also displays timing metrics for each processing step in the route when route tracing is enabled.
- Shell view—Displays the command console of the connected container. You can control the container by entering commands in Shell view.
- Messages View—lists the messages that have passed through the selected JMS destination or through Apache Camel endpoints when route tracing is enabled.
- Servers view—displays a list of servers (Red Hat JBosss Fuse, Apache Karaf, or Apache ServiceMix) managed by the tooling. It displays their runtime status and provides controls for starting and stopping them and for debugging projects deployed on them.
- Properties view—displays the properties of the selected node.
- Console view— displays the console output for recently executed actions.
JMX Navigator
Messages view
Chapter 4. Fabric8 Perspective
Figure 4.1. Fabric8 perspective
- Fabric Explorer—lists the fabrics and the containers, profiles, and versions of which they consist.
- Diagram View—provides a graphical representation of a node selected in Fabric Explorer.
- Shell— provides console access to any container running on the fabric.
- Log view—lists the log entries of the selected container or the selected JMX process.
- Messages View—lists the message instances that passed through the nodes in a selected route, after tracing was enabled on the route.
- Properties view—displays the properties of an object selected in Fabric Explorer.
Fabric Explorer
Diagram view
Log view
Messages view
Properties view
JMX viewer
Part II. Developing Applications
Chapter 5. Creating a New Fuse Project
Overview
Procedure
- Select File → New → Fuse Project to open the New Fuse Project wizard shown in Figure 5.1, “New Fuse Project Wizard's Project Location Page”.
Figure 5.1. New Fuse Project Wizard's Project Location Page
The wizard opens with the Use default workspace location option selected on the location page. - Enter the name of the Fuse project.
- Specify the location where the data for the project will be stored.
- To use the default workspace select Use default workspace location.
- To use an alternative location clear Use default workspace location and specify a new location in the provided field.Clicking opens a file browser.
- If you want to add the new project to an Eclipse working set, select Add project(s) to working set and enter the name of the working set.
Figure 5.2. New Fuse Project wizard's details page
- Select a project type from the list.NoteThe route editor works with these project types:
- camel-archetype-activemqCreates a new Apache Camel project that configures and interacts with Apache ActiveMQ.
- camel-archetype-blueprintCreates a new Apache Camel project with support for OSGi blueprint that is deployment-ready for OSGi.
- camel-archetype-cxf-code-first-blueprintCreates a new Apache Camel project with Apache CXF code-first example using OSGi Blueprint.
- camel-archetype-cxf-contract-first-blueprintCreates a new Apache Camel project with Apache CXF contract-first example using OSGi Blueprint.
- camel-archetype-javaCreates a new Apache Camel project using Java DSL.You cannot edit Java DSL in the route editor.
- camel-archetype-springCreates a new Apache Camel project with added support for Spring DSL.
- camel-archetype-spring-dmCreates a new Apache Camel project with added support for Spring DSL that is deployment-ready for OSGi.
- camel-archetype-webCreates a new Apache Camel web project that deploys the Camel routes as a WAR.
- cxf-jaxrs-serviceCreates a simple CXF JAX-RS web application service using Spring configuration.
- cxf-jaxws-javafirstCreates a project for developing a Web service starting from Java code.
- Enter a group ID for the project in the Group Id field, or accept the default.The tooling uses the group ID to form the first part of the dot-separated package name. For example, if you enter
Demo
for the group ID, it appears in the Package field asDemo.
. - Enter an artifact ID for the project in the Artifact Id field, or accept the default.The tooling uses the artifact ID as the name of the project and to form the second part of the dot-separated package name. For example, if you enter
BigRoute
for the artifact ID, it appears in the Package field asDemo.BigRoute
. - Enter a version for the project in the Version field, or accept the default.
- If you want to change the package name generated for the artifacts, enter the new package name in the Package field.
- Click Finish to create the Maven project, which contains starting point artifacts.
Resolving Maven dependency errors
- In Project Explorer, select the root project just created.
- Right-click it to open the context menu.
- Select Maven → Update Project...
- In the Update Maven Project wizard, check Force Update of Snapshots/Releases.
- Click OK.In the bottom, right corner of the workbench, you may see the progress status bar churning as missing dependencies are downloaded from the Maven repositories.
Related topics
New Fuse Project |
Red Hat JBoss Fuse Tooling Tutorials, To Create a New Route |
Chapter 6. Creating a New Camel XML file
Overview
camelContext
element. The tooling includes a wizard that simplifies adding an Apache Camel context file to your project. It creates a new XML file that has all of the required namespaces preconfigured and a template camelContext
element.
Procedure
- Select File → New → Other... → Fuse Tooling → Camel XML File from the main menu to open the Camel XML File wizard, as shown in Figure 6.1, “Camel XML File wizard”.
Figure 6.1. Camel XML File wizard
- In RouteContainer, enter the location for the new file, or accept the default.You can click to search for an appropriate location.ImportantThe Spring framework and the OSGi Blueprint framework require that all Apache Camel files be placed in specific locations under the project's
META-INF
orOSGI-INF
folder:- Spring—
projectName /src/main/resources/META-INF/spring/
- OSGi Blueprint—
projectName /src/main/resources/OSGI-INF/blueprint/
- In File Name, enter a name for the new context file, or accept the default.The file's name cannot contain spaces or special characters, and it must be unique within the JVM.
- In Framework, accept the default, or select which framework the routes will use:
- Spring—for routes that will be deployed in Spring containers, non-OSGi containers, or as standalone applications
- OSGi Blueprint—for routes that will be deployed in OSGi containers
- Routes—for routes that you can load and add into existing
camelContext
s
- Click Finish.The new context file is added to the project and opened in the route editor.
Related topics
New Camel XML File |
Chapter 7. Editing a routing context in the route editor
- Adding one or more routes to the routing context.
- Adding a starting point pattern to a route.
- Adding one or more endpoint patterns to a route.
- Adding one or more processor patterns that represent how messages will be transformed and routed between the starting point and endpoint(s).
- Connecting the patterns (referred to as nodes once they are placed on the canvas).
- Configuring the details for each of the endpoints and processors that make up the route.
- Adding any configuration beans to the context.
7.1. Adding routes to the routing context
Overview
camelContext
element within an XML context file creates a routing context. The camelContext
element can contain one or more routes, but the route editor's canvas can display only one of the routes at a time. Therefore the canvas is each route's delineator, and each route displayed on the canvas maps to a route
element in the generated camelContext
element.
camelContext.xml
file that is defined either as camel-context.xml
(Spring) or blueprint.xml
(Blueprint). You can view and edit the contents of the camelContext.xml
file in the route editor's Source view. In Design view, the route editor presents an empty canvas, which represents the empty route
element. You can drag patterns from the Palette and drop them onto the canvas to create a route. The design time tooling updates the empty route
element with XML code generated from the patterns you drop onto the canvas.
- From the menu bar, by opening the Routes menu, and then selecting Add Route
- In Design view, by right-clicking the canvas or a node to access the context menu, and then selecting Add → Route
- In Source view, by adding a
<route/>
element to the existing list within thecamelContext
element
Procedure
- Select one of the methods for adding a route.In Design view, a route icon appears in Outline view, and the Properties editor displays the list of the new route's properties for you to edit.
- In the Properties editor, enter an ID (for example, Route2) for the new route in the route's ID field.In Outline view, the new ID displays next to the new route icon.
- In the Properties editor, enter a description of the route in the Description field.
- On the menu bar, select File → Save to save the changes you made to the routing context file.
Related topics
Red Hat JBoss Fuse Tooling Tutorials, To Add a Content-Based Router |
Red Hat JBoss Fuse Tooling Tutorials, To Add Another Route to the CBR Routing Context |
7.2. Adding patterns to a route
7.2.1. Drag and drop a pattern
Overview
Procedure
- In the Palette, locate the desired pattern.
- Select the pattern, drag it to the canvas, and then release the mouse button.NoteYou need not place the pattern in its intended location. You can easily move any node on the canvas by dragging it to a new location.
Related topics
Section 7.5, “Rearranging patterns on the canvas” |
Section 7.4, “Configuring a pattern” |
Section 7.6, “Removing patterns from a route” |
7.2.2. Using the context menu
Overview
Procedure
- In the canvas, select the node to which you want to connect the new pattern.
- Right-click it to open the context menu.
- Select Add to display the list of patterns that can be connected to the selected node. The patterns are grouped according to function.
- Select the pattern to add to the route.
Related topics
Section 7.5, “Rearranging patterns on the canvas” |
Section 7.4, “Configuring a pattern” |
Section 7.6, “Removing patterns from a route” |
7.3. Connecting patterns to make a route
Overview
route
element in the context file until all nodes are linked together to form a complete route. A complete route typically consists of a starting endpoint, a string of processing nodes, and one or more destination endpoints.
Procedure
- On the canvas, select the source node to display its connector arrow.
- Click-drag the source node's connector arrow ( ) to the target node.The direction of the connection represents the direction messages flow between the nodes in the route.
- While hovering over the target node, release the mouse button to drop the connector on it.The route editor updates the
<route>
element with the xml generated from the connection. You can view the xml in Source view. - When you are done, save your work by selecting File → Save from the menu bar.
7.4. Configuring a pattern
Overview
- validating that all required properties have values
- drop-down lists for properties that have a fixed set of values
- drop-down lists that are populated with the available bean references from the Apache Camel Spring configuration
Procedure
- On the canvas, select the node you want to configure.The Details tab in the Properties editor lists all of the selected node's properties for you to edit. The Documentation tab describes the pattern and each of its properties.
- Edit the fields in the Properties editor to configure the node.
- When done, save your work by selecting File → Save from the menu bar.
Related topics
7.5. Rearranging patterns on the canvas
7.5.1. Rearranging patterns by dragging them
Overview
Procedure
- Determine which node or nodes you want to move.
- Select one node, or select a group of nodes by dragging a box around them.
- Drag the node or nodes to their new location, then release the mouse button.
7.5.2. Automatically aligning patterns
Overview
Procedure
- Right-click the canvas to open the context menu.
- Select Layout Diagram.
7.6. Removing patterns from a route
Overview
Procedure
- Select the node you want to delete.
- Right-click it to open the context menu.
- Select Remove.
Related topics
Section 7.2, “Adding patterns to a route” |
7.7. Disconnecting two patterns
Overview
Procedure
- Select the connector you want to delete.
- Right-click it to open the context menu.
- Select Remove.
Related topics
Section 7.3, “Connecting patterns to make a route” |
7.8. Deleting a route
Overview
Procedure
- If the routing context contains more than one route, first select the route you want to delete in Outline view.
- Right-click on the canvas to open the context menu.
- Select Remove Route.
7.9. Adding beans and configuration
Overview
Procedure
- Open your routing context file in the route editor.
- Click the Source tab at the bottom of the route editor's canvas to switch to Source view, so you can edit the XML that defines the route.
- Enter the
bean
elements needed by your route before thecamelContext
element.NoteUse theid
attribute to identify the bean, not thename
attribute.ImportantDo not edit the contents of thecamelContext
element. overwrites thecamelContext
element when changes are made to the route diagram in Design view. - Save your changes by selecting File → Save on the menu bar.
- Click the Design tab at the bottom of the route editor's canvas to return to Design view and the route diagram.
Related topics
Chapter 9, The Source View |
Apache Camel Development Guide, Part IV Programming EIP Components |
7.10. Configuring the route editor
Overview
- The default language to use for expressions in EIPs
- The method for labeling nodes on the canvas
- The direction in which patterns flow on the canvas when creating routes
- Whether the canvas displays a grid overlay
- Colors used for various diagrammatic components
Procedure
- In JBoss Developer Studio, click Window → Preferences to open the Preferences dialog.
- Click Fuse Tooling → Editor to show the Editor preferences.
- Select, from the drop-down list, the default language you want to use for expressions in EIP nodes.
- Click the checkbox next to If enabled the ID values will be use for labels if existing to enable or disable using node IDs as labels.
- Select, from the drop-down list, the direction in which you want the route editor to align the patterns in a route.
- Click the checkbox next to Show diagram grid in Routes Editor to enable or disable displaying the grid overlay on the canvas.
- Click Apply to apply the changes to the Editor preferences.
- Click Fuse Tooling → Colors to show the Colors preferences.
- For each component whose color you want to change, click its color icon to open the color palette, and then select a color from the palette.
- When done, click Apply and then OK to close the Preferences dialog.You can restore the route editor's original color scheme at any time by returning to Fuse Tooling → Colors and clicking Restore Defaults.
Related topics
Editor |
Colors |
Chapter 8. Creating a new Apache Camel JUnit test case
Overview
Procedure
- In Project Explorer, select the
camel-context.xml
file in your routing project. - Right-click it to open the context menu, and then select New → Camel Test Case to open the New Camel JUnit Test Case wizard, as shown in Figure 8.1, “New Camel JUnit Test Case wizard”.
Figure 8.1. New Camel JUnit Test Case wizard
Alternatively, you can open the wizard by selecting File → New → Other... → Fuse Tooling → Camel Test Case from the menu bar. - In Source folder, accept the default location of the source code for the test case, or enter another location.You can click to search for a location.
- In Package, accept the default package name for the generated test code, or enter another package name.You can click to search for a package.
- In Camel XML file under test, accept the default pathname of the routing context file that contains the route you want to test, or enter another pathname.You can click to search for a context file.
- In Name, accept the default name for the generated test class, or enter another name.
- Select the method stubs you want to include in the generated code.
- If you want to include the default generated comments in the generated code, check the Generate comments box.
- Click to open the Test Endpoints page. For example, Figure 8.2, “New Camel JUnit Test Case page” shows a route's input and output file endpoints selected.
Figure 8.2. New Camel JUnit Test Case page
- Under Available endpoints, select the endpoints you want to test. Click the checkbox next to any selected endpoint to deselect it.
- Click .NoteIf prompted, add JUnit to the build path.
src/test/java
. The class implementing the test case opens in the Java editor.
Related topics
New Camel JUnit Test Case |
Test Endpoints |
Red Hat JBoss Fuse Tooling Tutorials, To Test a Route with JUnit |
Chapter 9. The Source View
Figure 9.1. Source view
camelContext
element in the routing context file, not all changes are preserved. Comments inserted into the camelContext
element are lost upon switching to Design view.
Chapter 10. Running routes inside Red Hat JBoss Fuse Tooling
10.1. Running routes as a local Camel context
Overview
Procedure
- In Project Explorer, select a routing context file.
- Right-click it to open the context menu, and then select Run As → Local Camel Context.NoteSelecting Local Camel Context (without tests) directs the tooling to run the project without performing validation tests, which may be faster.
Result
Related topics
Section 10.3.1, “Editing a Local Camel Context runtime profile” |
Red Hat JBoss Fuse Tooling Tutorials, To Run a Route |
10.2. Running routes using Maven
Overview
Procedure
- In Project Explorer, select the root of the project .
- Right-click it to open the context menu, and then select Run As → Maven build.
- The first time you run the project using Maven the Edit Configuration and launch editor opens, so you can create a Maven runtime profile.To create the runtime profile:
- Make sure the route directory of your Apache Camel project appears in the Base directory: field.For example on Linux the root of your project will be similar to
~/workspace/simple-router
. - In the Goals: field, enter
camel:run
. - Click Apply and then Run.
- Subsequent Maven runs use this profile, unless you modify it between runs.
Results
Related topics
Section 10.3.2, “Editing a Maven runtime profile” |
10.3. Working with runtime profiles
10.3.1. Editing a Local Camel Context runtime profile
Overview
main
to invoke, the command line options passed into the JVM, the JRE to use, the classpath to use, any environment variables that need to be set, and a few other pieces of information.
- Camel Context File—specifies the name of the new configuration and the full path of the routing context file that contains your routes.
- Main—specifies the fully qualified name of the project's base directory, a few options for locating the base directory, any goals required to execute before running the route, and the version of the Maven runtime to use.
- JRE—specifies the JRE and command line arguments to use when starting the JVM.
- Refresh—specifies how Maven refreshes the project's resource files after a run terminates.
- Environment—specifies any environment variables that need to be set.
- Common—specifies how the profile is stored and the output displayed.
Accessing the Local Camel Context's runtime configuration editor
- In Project Explorer, select the camelContext file for which you want to edit or create a custom runtime profile.
- Right-click it to open the context menu, and then select Run As... → Run Configurations to open the Run Configurations dialog.
- In the context selection pane, select Local Camel Context, and then click at the top, left of the context selection pane.
- In the Name field, enter a new name for your runtime profile.
Figure 10.1. Runtime configuration editor for Local Camel Context
Setting the camel context file
Changing the command line options
-fa context-file
Changing where output is sent
- Select the Common tab.
- In the Standard Input and Output pane, click the checkbox next to the File: field, and then enter the path to the file where you want to send the output.The Workspace..., File System..., and Variables... buttons facilitate building the path to the output file.
Related topics
Section 10.1, “Running routes as a local Camel context” |
10.3.2. Editing a Maven runtime profile
Overview
- Main—specifies the name of the new configuration, the fully qualified name of the project's base directory, a few options for locating the base directory, any goals required to execute before running the route, and the version of the Maven runtime to use.
- JRE—specifies the JRE and command line arguments to use when starting the JVM.
- Refresh—specifies how Maven refreshes the project's resource files after a run terminates.
- Environment—specifies any environment variables that need to be set.
- Common—specifies how the profile is stored and the output displayed.
Accessing the Maven runtime configuration editor
- In Project Explorer, select the root of the project for which you want to edit or create a custom runtime profile.
- Right-click it to open the context menu, and then select Run As... → Run Configurations to open the Run Configurations dialog.
- In the context selection pane, select m2 Maven Build, and then click at the top, left of the context selection pane.
Figure 10.2. Runtime configuration editor for Maven
Changing the Maven goal
camel:run
. It loads the routes into a Spring container running in its own JVM.
camel:embedded
goal that loads the Spring container into the same JVM used by Maven. The advantage of this is that the routes should bootstrap faster.
Changing the version of Maven
Changing where the output is sent
- Select the Common tab.
- Click the checkbox next to the File: field, and then enter the path to the file where you want to send the output.The Workspace..., File System..., and Variables... buttons facilitate building the path to the output file.
Related topics
Section 10.2, “Running routes using Maven” |
Chapter 11. Using the JBoss Fuse SAP Tool Suite
Abstract
11.1. Installing the JBoss Fuse SAP Tool Suite
Overview
Platform restrictions for SAP tooling
Prerequisites
- You will require an SAP Service Marketplace Account to download the JCo and IDoc client archives.
- Choose the appropriate JCo and IDoc libraries for your operating system.
- Only version 3.0.11 or greater of the JCo library is supported.
- Only version 3.0.10 or greater of the IDoc library is supported.
- For this installation procedure, you can leave the downloaded files in archive format. There is no need to extract the contents.
Procedure
- In JBoss Developer Studio, select File → Import to open the Import wizard.
- In the Select screen of the Import wizard, select JBoss Fuse → Install JBoss Fuse SAP Tool Suite, and click Next.
- The Install the JBoss Fuse SAP Tool Suite screen opens, which displays the instructions for downloading the JCo and IDoc libraries from the SAP Service Marketplace. Click Next.
- The Select JCo3 and IDoc3 Archive to Import screen opens. Next to the JCo Archive File field, use the Browse button to select the JCo archive that you downloaded from the SAP Service Marketplace. After selecting the JCo archive, the Archive Version and Archive OS Platform fields are automatically filled in, so that you can check whether the library you are installing has the correct version and OS platform.Next to the IDoc3 Archive File field, use the Browse button to select the IDoc archive that you downloaded from the SAP Service Marketplace.After selecting both archive files, click Finish.
- A new Install wizard (for installing Eclipse plug-ins) opens automatically. This wizard displays the following to plug-ins to be installed:
- JBoss Fuse SAP Tool Suite
- SAP JCo3 and IDoc3 Libraries
Make sure that both of these plug-ins are selected. Click Next.NoteThe SAP JCo3 and IDoc3 Libraries plug-in is dynamically constructed from the selected JCo and IDoc libraries. - The Install Details screen allows you to review the plug-ins to be installed. Click Next.
- The Review Licenses dialog opens. Select the I accept radiobutton option, and then click Finish.
- If you encounter a Security Warning dialog (warning of unsigned content), click OK to ignore the warning and continue installing.
- The Restart Eclipse dialog opens. Click OK to restart Eclipse.
11.2. Create and Test an SAP Destination Connection
Overview
Procedure
- If you have not already added the SAP Connections view to your perspective, select Window → Show View → Other to open the Show View dialog. Select SAP Connections and click OK. The SAP Connections view opens on the left of your perspective (under Project Explorer).
- In the SAP Connections view, right-click on Destination Data Store and select New Destination, to open the Create Destination dialog.
- Enter a name for the destination in the New Destination Name field and click OK.
- Select the newly created destination in the Destination Data Store tree, so that its properties show up in the Properties view.
- In the Properties view, click on the Basic tab to configure the basic properties required to connect to an SAP destination. In this tab, fill in the following property fields to configure the connection:
- SAP Application Server
- SAP System Number
- SAP Client
- Logon User
- Logon Password
- Logon Language
These are standard SAP client connection properties. If you need more information about these settings, please consult the SAP documentation. - You are now ready to test the destination connection. In the SAP Connection view, right-click on the destination name and select Test.
- The Test Destination Connection dialog opens. Click Test.
- The dialog uses the current destination configuration settings to connect to the SAP server. If the test is successful, you will see the following message in the status area:
Connection test for destination 'YourDestination' succeeded.
Otherwise, an error report appears in the status area. - Click Close, to close the Test Destination Connection dialog.
11.3. Create and Test an SAP Server Connection
Overview
Procedure
- If you have not already added the SAP Connections view to your perspective, select Window → Show View → Other to open the Show View dialog. Select SAP Connections and click OK. The SAP Connections view opens on the left of your perspective (under Project Explorer).
- In the SAP Connections view, right-click on Server Data Store and select New Server, to open the Create Server dialog.
- Enter a name for the server connection in the New Server Name field and click OK.
- Select the newly created server connection in the Server Data Store tree, so that its properties show up in the Properties view.
- In the Properties view, click on the Mandatory tab to configure the basic properties required for an SAP server connection. In this tab, fill in the following property fields to configure the connection:
- Gateway Host
- Gateway Port
- Program ID
- Repository Destination
- Connection Count
In the Repository Destination field, you can fill in one of the destination names from the Destination Data Store tree (see Section 11.2, “Create and Test an SAP Destination Connection”). An SAP server endpoint uses this destination to retrieve meta-data from a remotely hosted meta-data repository.The other properties are standard SAP server connection properties. Please consult the SAP documentation for more information. - You are now ready to test the server connection. In the SAP Connection view, right-click on the server connection name and select Test.
- The Test Server Connection dialog opens. Click Server.
- The dialog uses the current server configuration settings to start up a server endpoint and connect to the gateway host. If the test is successful, you will see the following messages in the status area:
Server state: STARTED Server state: ALIVE
If the test fails, the server status is reported asDEAD
. - Click Stop, to shut down the test server.
- Click Close, to close the Test Server Connection dialog.
11.4. Export SAP Connection Configuration to a File
Overview
Procedure
- In the SAP Connections view, right-click on Sap Connection Configuration and select Export to open the Export SAP Connection Configuration dialog.
- Enter the location of the export file in the Export Location field, either directly or using the Browse button.
- Select the Export File Type using the drop-down menu. The supported file types are: Blueprint XML or Spring XML. Select the file type that matches the file type you will use to create your Camel routes.
- Click Finish.
11.5. Create a New SAP Endpoint
Overview
Prerequisites
Procedure
- It is assumed that you already have a Fuse project and a Camel XML file to work with (which could either be in Blueprint XML or Spring XML format).
- Open your Camel XML file in the Camel editor. If you have already installed the JBoss Fuse SAP Tool Suite, you should be able to see the SAP components under the Components palette in the Camel editor. The following SAP components are provided by the tool suite:
- SAP IDoc Destination
- SAP IDoc List Destination
- SAP IDoc List Server
- SAP qRFC Destination
- SAP Queued IDoc Destination
- SAP Queued IDoc List Destination
- SAP sRFC Destination
- SAP sRFC Server
- SAP tRFC Destination
- SAP tRFC Server
In the Design view of the Camel editor, drag one of these components onto the canvas to create a new SAP endpoint in the current camelContext.NoteThe SAP Netweaver component does not belong to the JBoss Fuse SAP Tool Suite. It is hosted in the Apache Camel project. - Switch to the Source view of the Camel editor, by clicking on the Source tab at the bottom of the canvas. In this view, you can see the XML source of the routes.
- Open an exported SAP connection configuration file that you exported earlier (see Section 11.4, “Export SAP Connection Configuration to a File”), making sure that the type of the exported SAP connection configuration file matches the type of your Camel XML file (Blueprint XML or Spring XML).
- The SAP connection configuration data is encoded as a
bean
element, with theid
value,sap-configuration
. Copy thisbean
element. - Return to the Source view of the Camel editor. Paste the
bean
element as a child of the rootbeans
element in the Camel XML file. - You might not need all of the entries in the SAP connection configuration. Delete any unneeded destination connection and server connection entries (
entry
elements).NoteRemember that server connections usually also depend on a destination connection (for retrieving meta-data from a remote repository). So, even if you only need a server connection, do not delete all of the destination connection entries. - When specifying an SAP endpoint URI, you must embed either a destination name or a server connection name in the URI format. For example, the
sap-srfc-destination
component has the following URI format:sap-srfc-destination:destinationName:rfcName
To reference a particular destination, use the value of the relevantentry
element'skey
attribute as thedestinationName
in this URI.
Chapter 12. Getting Started with Data Transformation
12.1. Fuse Transformation Tooling
12.2. Your First Data Transformation
Prerequisites
- JBoss Fuse tooling is installed on JBoss Developer Studio. See Install Red Hat JBoss Developer Studio Integration Stack.
- Maven is installed and configured correctly. See Red Hat JBoss Fuse Maven Repositories.
- You have downloaded the transformation quickstart applications for use with this technical preview.
Procedure
Import the
starter
quickstart application in JBoss Developer Studio.- Select File → Import. Expand Maven and select Existing Maven Projects, then select Next.
- You are prompted to select a Maven project to import. Select Browse and navigate to the root directory of the
starter
quickstart application, then select OK. Review the selection and select Finish. The starter application will appear in the Project Explorer. - Expand the
starter
project in the Project Explorer and navigate tostarter/src/main/resources/META-INF/spring/camel-context.xml
. Open this file to view the Camel route. By default, the file is presented visually on the Design tab.Select the Source tab to view the underlying XML. You can see that an XML file is produced from a source endpoint and a JSON file is consumed by a target endpoint.
Add a data transformation to the Camel route.
- Select the Design view for the
camel-context.xml
file. - Remove the arrow connecting the two endpoints.NoteDo not save your project at this point. If you save your project now, the endpoints will disappear.
- Click on the Transformation drawer in the Palette. Drag a Data Transformation endpoint onto the canvas.This will invoke the New Transformation wizard. If the Palette is not yet visible, select Window → Show View → Other, then expand General and select Palette.
- In the New Transformation wizard, set the following values (leaving all other default values) then select Next.
Field Value Transformation ID xml2json
Source Type XML
Target Type JSON
- Now you are prompted to provide the source type definition. You can do this by supplying either an XML Schema (default) or an example XML Instance Document. Leave the default option and browse to select a Source File. Choose
abc-order.xsd
, then select OK. You are provided with a preview of the XML. Select Next to continue. - Now you are prompted to describe the target type definition in the same way. Browse to select a Target File. Choose
xyz-order.json
, then select OK. Because this is an example file, the JSON Type Definition is updated automatically to reflect this. Select Finish.
You are now presented with the transformation editor with source fields on the left and target fields on the right. Map one set to the other.
- Expand all of the fields on both sides of the transformation editor.
- Drag the source
customerNum
field from the left onto the targetcustId
field on the right. The transformation (or mapping) will appear in the center.Continue to map the fields as follows:Source Target orderNum
orderId
status
priority
item
lineItems
id
itemId
price
cost
quantity
amount
Map any remaining fields.
- Click on Hide mapped fields for both source and target to determine whether all fields have been mapped.You will find that the target
approvalCode
andorigin
fields remain unmapped. - Map the
origin
field to a constant variable: click on the Variables tab on the Source side. Select Add a new variable. - You are prompted to Enter a new variable name. Enter
ORIGIN
and select OK. The variable is created and appears on the left in the Variables window. - Select the default value and change it to
Web
. - Drag the new variable onto the target
origin
field. - Associate the
approvalCode
field with a dynamic evaluation of a Camel language expression: select Add a new mapping.An empty transformation is added. - Drag
approvalCode
from the target list into the target box of the empty transformation. You will notice that the selected transformation also appears in a window below. When you move your cursor over the source field in this view, an arrow appears. Select this arrow to open the menu from which you select Set expression. - You are prompted to select the expression language, and to enter an expression. Set the following values, then select OK:
Field Value Language Header
Expression ApprovalID
Connect the endpoints.
- Select the
camel-context.xml
tab to focus on the Camel route again. - When you hover your cursor over each endpoint, you are presented with an option to Create connection.Create a connection from the source endpoint to the transformation endpoint and then from the transformation endpoint to the target endpoint. Save your changes. The endpoints are automatically arranged horizontally.
Test your data transformation.
- Select File → New → Other. Expand Fuse Tooling and select Fuse Transformation Test, then select Next. This will invoke the New Transformation Test wizard.
- In the New Transformation Test wizard, set the following values:
Field Value Package example
Transformation ID xml2json
- In the Project Explorer navigate to
starter/src/test/java/example
and then open theTransformationTest.java
file. - Add the following code to the
transform
method:startEndpoint.sendBodyAndHeader(readFile("src/data/abc-order.xml"), "approvalID", "AUTO_OK");
- Ensure the
TransformationTest.java
file has focus, then select Run → Run As → JUnit Test. - The output will be presented in the Console window. Here you can see both the source XML and the resulting target JSON.
Example 12.1. Source XML
<ABCOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com"> <header> <status>GOLD</status> <customer-num>ACME-123</customer-num> <order-num>ORDER1</order-num> </header> <order-items> <item id="PICKLE"> <price>2.25</price> <quantity>1000</quantity> </item> <item id="BANANA"> <price>1.25</price> <quantity>400</quantity> </item> </order-items> </ABCOrder>
Example 12.2. Target JSON
{"custId":"ACME-123","priority":"GOLD","orderId":"ORDER1","origin":"Web","approvalCode":"AUTO_OK","lineItems":[{"itemId":"PICKLE","amount":1000,"cost":2.25},{"itemId":"BANANA","amount":400,"cost":1.25}]}
Part III. Debugging Routing Contexts
- Setting conditional and unconditional breakpoints on nodes in the route editor
- Autolaunching the debugger and switching to Debug Perspective
- Interacting with the running routing context:
- Switch between breakpoints to quickly compare variable values of message instances
- Examine and change the value of variables of interest
- Add variables of interest to the Watch list to track them throughout the debug session
- Disable and re-enable breakpoints on-the-fly
- Track message flow graphically in the routing context runtime
- Examine Console logs to track Camel and debugger actions
.xml
file to find the logic errors in it and fix them. Invoking the Camel debugger runs the routing context in debug mode and opens the Debug perspective (Chapter 2, Debug Perspective).
Chapter 13. Setting Breakpoints
Overview
.xml
file must be open in the route editor's Design View.
- Unconditional breakpoints—triggered whenever one is encountered during a debugging session
- Conditional breakpoints—triggered only when the breakpoint's specified condition is met during a debugging session
camelContext
element and each node for which a breakpoint is set to have a unique ID. You can set IDs manually in a node's Properties editor or directly in the CamelContext file in Source view, or you can let Fuse Tooling generate and apply them automatically. The Please confirm... dialog opens whenever you set a breakpoint on a node that does not already have a unique ID.
Setting unconditional breakpoints
- Select a node whose state you want to examine during the debugging session.
- Click its icon to set an unconditional breakpoint.
- In the Please Confirm... dialog, click OK to have the Route Editor automatically generate and apply a unique ID to the <camelContext> element and to the node or nodes that need it, or click Cancel if you want to manually enter unique IDs in the <camelContext> element and to each node that needs one.
- Repeat these steps for each node on which you want to set an unconditional breakpoint.
Setting conditional breakpoints
- Select a node whose state you want to examine during the debugging session.
- Click its icon to set a conditional breakpoint and open the Edit the condition and language of your breakpoint... dialog.
- Click the Language drop-down menu and select the expression langauge to use to create the condition that will trigger the breakpoint.Fuse Tooling supports twenty expression languages from which to choose. Except for
constant
,method
,property
, andref
, each of these languages provides variables for creating conditional expressions. - Click the Variables drop-down menu and select in sequence one or more of the language's supported variables to create the condition for triggering the breakpoint. The variables you select appear in the Condition text box.Alternatively, you can manually enter the expression directly into the Condition text box.
Disabling breakpoints
Deleting breakpoints
- Individual breakpoints—on the canvas, select the node whose breakpoint you want to delete, and click its icon.
- All breakpoints—right-click the canvas, and select Delete all breakpoints.
Related topics
Chapter 14, Starting the Camel Debugger |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Chapter 14. Starting the Camel Debugger
Overview
Procedure
- In Project Explorer, select the routing context file you want to debug.
- Right-click it to open the context menu, and then select Debug As... → Local Camel Context.Fuse Tooling builds the Camel route, starts up Apache Camel, starts the routing context, enables JMX, starts the route(s) in the routing context, adds the breakpoints to the nodes, and enables the Camel debugger.The Camel debugger suspends execution of the routing context at the first breakpoint it encounters, and asks whether you want it to open the Debug perspective.
- Click Yes to open Debug perspective.Debug perspective opens with the routing context suspended at the first breakpoint in the running routing context.ImportantBreakpoints are held for a maximum of five minutes, after which debugging automatically resumes, moving on to the next breakpoint or to the end of the routing context if there are no more breakpoints.NoteTo see the console output, you'll need to open Console view if it was not open when you switched perspectives.NoteBy default, Debug perspective opens displaying Outline view, which provides the means to switch between separate routes in a routing context. If your routing context contains a single route, closing Outline view will provide more space to expand the other views, making it easier to access and examine debugger output.
Watching message exchanges progress through the routing context
Related topics
Chapter 15, Stopping the Camel Debugger |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Chapter 15. Stopping the Camel Debugger
Overview
Camel Context
thread (both displayed in Debug view).
Terminating the Camel Debugger before the session ends
target/.CamelContextInDebug_xxxxxxxx_temp/camel-context.xml
lines in the root project's src/main/resources/framework-INF/framework_name
folder. InFuse Integration perspective, You may also see them in the project's Camel Contexts folder.
Related topics
Chapter 14, Starting the Camel Debugger |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Chapter 16. Changing Variable Values
Overview
Procedure
- If necessary, start up the debugger. See Chapter 14, Starting the Camel Debugger.
- In Variables view, select a variable whose value you want to change, and then click its Value field.The variable's value field turns a lighter shade of blue, indicating it is in edit mode.NoteAlternatively, you can right-click the variable to open its context menu, and select Change Value... to edit its value.
- Enter the new value and then click Enter.Console view displays an INFO level log entry noting the change in the variable's value (for example,
Breakpoint at node to1 is updating message header on exchangeId: ID-dhcp-97-16-bos-redhat-com-52574-1417298894070-0-2 with header: Destination and value: ChangedTarget
). - Continue stepping through the breakpoints and check whether the message is processed as expected. At each step, check Debug view, Variables view, and the Console output.
Related topics
Chapter 18, Disabling Breakpoints in a Running Context |
Chapter 17, Adding Variables to the Watch List |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Chapter 17. Adding Variables to the Watch List
Overview
Procedure
- If necessary, start up the debugger. See Chapter 14, Starting the Camel Debugger.
- In Variables view, right-click a variable you want to track to open the context menu.
- Select Watch.A new tab, Expressions, appears next to the Breakpoints tab.
- Click the Expressions tab to open it.Expressions view displays the name of the added variable and its current value.
- NoteThe variables you add will remain in the watch list until you remove them. To do so, right-click a variable in the list to open the context menu, and then click Remove.
- With Expressions view open, step through the routing context to track how the value of each variable in the Watch list changes at each step in the routing context.
Related topics
Chapter 16, Changing Variable Values |
Chapter 18. Disabling Breakpoints in a Running Context
Overview
camelContext
element in the project's routing context file.
Disabling and enabling breakpoints in Breakpoints view
Removing breakpoint to3
). Likewise, for each breakpoint you re-enable, Console view displays an INFO level log entry noting that it has been enabled (for example, Adding breakpoint to3
).
Disabling and enabling breakpoints on the running CamelContext: canvas
- On the canvas, select the node with the breakpoint you want to disable; for example:NoteThe icon denotes an unconditional breakpoint. A icon denotes a conditional breakpoint.
- Click the icon in the node's side bar.The icon replaces the icon in the node's upper left corner, indicating that the breakpoint is now disabled:The node's check box in Breakpoints view is clear, also indicating that the breakpoint is disabled:Console view contains a log of the event:NoteTo re-enable the breakpoint, select the node, and then click the icon in its side bar.
Deleting and resetting breakpoints on the running CamelContext: canvas
- On the CamelContext: <xxxxxx> canvas, select the node whose breakpoint you want to delete; for example, setHead_usa:Note that the node's breakpoint is enabled in Breakpoints view.NoteIn the above graphic, the dotted red line surrounding the setHead_usa node identifies the breakpoint on which the debugger is currently suspended.
- Click the icon in the node's side bar:The breakpoint is removed from the node on the canvas and also from the list of breakpoints in Breakpoints view:NoteTo reset the breakpoint, select the node, and then click the or icon in its side bar, depending on whether you want to set an unconditional or conditional breakpoint.
Related topics
Chapter 13, Setting Breakpoints |
the section called “Disabling breakpoints” |
the section called “Deleting breakpoints” |
chapter "To Debug a Routing Context" in "Tooling Tutorials" |
Part IV. Monitoring and Testing Applications
Chapter 19. JMX Navigator
Figure 19.1. JMX Navigator
- Local Processes
- Server Connections
- User-defined connections
19.1. Viewing Processes in JMX
Overview
Viewing processes in a local JMX server
- Expand the Local Processes entry in JMX Navigator.
- Double-click one of the top-level entries under Local Processes to connect to the JMX server.
- Double-click it to open a connection.
- Click the icon that appears next to the entry to display the list of all components running in the JVM.
Viewing processes in alternate JMX servers
- Add the JMX server to JMX Navigator.
- Expand the server's entry in JMX Navigator using the icon that appears next to the entry to display the list of all components running in the JVM.
19.2. Adding a JMX server
Overview
Procedure
- Click New Connection on the JMX Navigator tab .
- In the Create a new JMX connection wizard, select Default JMX Connection.
- Click Next>.
- Select the Advanced tab.
- In the Name field, enter a name for the JMX server.The name can be any string. It is used to label the entry in the JMX Navigator tree.
- In the JMX URL field, enter the JMX URL of the server.
- If the JMX server requires authentication, enter your user name and password in the Username and Password fields.
- Click Finish.The new JMX server is displayed as a branch in the JMX Navigator tree.
Chapter 20. Viewing a component's properties
Overview
Procedure
- Locate the node for the component in the .You may have to expand nodes on the tree to locate low-level components.
- Select the Fuse component's node from the tree.
- Open the Properties view.The selected component's properties will be displayed in table format.You can use the Search box in Properties view to locate specific properties based on value.
Chapter 21. Browsing messages
Overview
- JMS destinations
- JMS routing endpoints
- Apache Camel routing endpoints
- SEDA routing endpoints
- Browse routing endpoints
- Mock routing endpoints
- VM routing endpoints
- DataSet routing endpoints
Procedure
- Select the JMS destination or endpoint from .The list of messages is displayed in the Messages View.
- Select an individual message to inspect from the list of messages in the Messages View.Message details and content are displayed in the Properties view.
Related topics
Section 22.3, “Tracing messages through a route” |
Chapter 22. Tracing Routes
- a message was improperly transformed
- a message failed to reach its destination endpoint
22.1. Creating test messages for route tracing
Overview
Procedure
- In Project Explorer, right-click the project to open the context menu.
- Select New → Fuse Message to open the New File wizard.
- Enter or select the folder in which you want to store the message.
- In the File name field, enter a name for the message.
- Click Finish.The new message opens in the XML editor.
- Fill in the contents (body and header text) of the message.
- On the menu bar, click File → Save to save the test message.
Related topics
Section 22.3, “Tracing messages through a route” |
New Fuse Message |
chapter "To Trace a Message Through a Route" in "Tooling Tutorials" |
22.2. Activating route tracing
Overview
Procedure
- In the tree, select the routing context on which you want to start tracing.You can select any route in the context to start tracing on the entire context.
- Right-click it to open the context menu, and then select Start Tracing to start the trace.If Stop Tracing Context is enabled on the context menu, then tracing is already active.
Related topics
Section 22.3, “Tracing messages through a route” |
Section 22.4, “Deactivating route tracing” |
22.3. Tracing messages through a route
Overview
Procedure
- Create one or more test messages as described in Section 22.1, “Creating test messages for route tracing”.
- Activate tracing for the route's routing context as described in Section 22.2, “Activating route tracing”.
- Drag one of the test messages onto the route's starting point.
- In the tree, select the route being traced.The Messages View is populated with a list of messages representing the message at each stage in the traced route.
- Open Diagram View to see a graphical representation of the selected route.
- In the Messages View, select one of the messages.In Diagram View, the route step in which the selected message is sitting is highlighted. The Properties view displays the full details and content of the test message.
Related topics
22.4. Deactivating route tracing
Overview
Procedure
- In the tree, select the routing context for which you want to deactivate tracing.You can select any route in the context to stop tracing for the context.
- Right-click it to open the context menu, and then select Stop Tracing Context.If Start Tracing appears on the context menu, tracing is not activated for the routing context.
Related topics
Section 22.2, “Activating route tracing” |
Section 22.3, “Tracing messages through a route” |
Chapter 23. Managing JMS destinations
23.1. Adding a JMS destination
Overview
Procedure
- In the Fuse JMX Navigator tree, select either the Queues child or the Topics child in the broker node where you want to add a destination.
- Right-click it to open the context menu, and then select Create Queue/Topic.
- In the naming dialog, enter a name for the destination.
- Click OK.The new destination appears in the tree.
Related topics
Section 23.2, “Deleting a JMS destination” |
23.2. Deleting a JMS destination
Overview
Procedure
- In the Fuse JMX Navigator tree, select the JMS destination you want to delete.
- Right-click it to open the context menu, and then select Delete Queue/Topic.
Related topics
Section 23.1, “Adding a JMS destination” |
Chapter 24. Managing routing endpoints
24.1. Adding a routing endpoint
Overview
Procedure
- In the JMX Navigator tree, select the Endpoints child in the routing context node where you want to add an endpoint.
- Right-click it to open the context menu, and then select Create Endpoint.
- In the naming dialog, enter a URL defining the new endpoint.
- Click OK.The new destination appears in the tree.
Related topics
Section 24.2, “Deleting a routing endpoint” |
24.2. Deleting a routing endpoint
Overview
Procedure
- In the JMX Navigator tree, select the endpoint you want delete.
- Right-click it to open the context menu, and then select Delete Endpoint.
Related topics
Section 24.1, “Adding a routing endpoint” |
Chapter 25. Editing running routes
Overview
Procedure
- In the JMX Navigator tree, select the context containing the route(s) you want to edit.
- Right-click to open the context menu, and select Edit Routes.Route editor displays the context and all of its routes.
- Edit the route(s) as described in Part II, “Developing Applications”.
- When done, save the edited route.
- Select File → Save to update the in-memory version of the routing context.Changes take effect immediately.
- >Select File → Save As to save the edited routing context in a new context file.
Related topics
Chapter 26. Managing routing contexts
26.1. Suspending a routing context
Overview
Procedure
- In the JMX Navigator tree, expand the project's Camel Contexts node, and select the routing context you want to suspend.
- Right-click it to open the context menu, and then select Suspend Camel Context.NoteIf Resume Camel Context appears on the context menu, the context is already suspended.
Related topics
Section 26.2, “Resuming a routing context” |
26.2. Resuming a routing context
Overview
Procedure
- In the JMX Navigator tree, expand the project's Camel Contexts node, and select the routing context you want to resume.
- Right-click it to open the context menu, and then select Resume Camel Context.NoteIf Suspend Camel Context appears in the context menu, the context and its routes are running.
Related topics
Section 26.1, “Suspending a routing context” |
Part V. Publishing Applications to a Container
Chapter 27. Managing servers
- Red Hat JBoss Fuse Server—versions 6.x
- Apache Karaf Server—versions 2.x, 3.0
- Apache ServiceMix Server—versions 4.5, 5.x
27.1. Adding a Server
Overview
/etc/users.properties
file and add user information, in the form of user=password,role
, to enable the tooling to establish an SSH connection to the server.
Procedure
- In Servers panel, click the link No servers are available. Click this link to create a new server....NoteThis link appears in Servers panel only when no server has been defined.
- Right-click in Servers panel to open the context menu, then select New → Server.
- On the menu bar, select File → New → Other → Server → Server.
- In the Define a New Server dialog, expand the
JBoss Fuse
node to expose the list of available server options: - Click the server you want to add.
- In Server's host name, accept the default (
localhost
).NoteThe address oflocalhost
is0.0.0.0
. - In Server name, accept the default, or enter a different name for the runtime server.
- Click Next > to open the server's Runtime definition page:NoteIf the server is not already installed on your machine, you can install it now by clicking the link Download and install runtime... and following the site's download instructions. Depending on the site, you may be required to provide valid credentials before you can continue the download process.
- Accept the default for Name.
- In Home Directory, enter the path where the server runtime is installed, or click Browse to find and select it.
- Select the runtime JRE from the drop-down menu next to Execution Environment.If the version you want does not appear on the list, click the Environments button and select the version from that list. The JRE version you select must be installed on your machine.NoteJBoss Fuse 6.2 requires either JRE versions 1.7 or 1.8.
- Leave the Alternate JRE option as is.
- Click Next > to save the server's runtime definition and open its Configuration details page:
- Accept the default for SSH Port (
8101
).The runtime uses the SSH port to connect to the server's Karaf shell. If this default is incorrect for your setup, you can discover the correct port number by looking in the server's installDir/etc/org.apache.karaf.shell.cfg
file. - In User Name, enter the name used to log into the server.In the case of Red Hat JBoss Fuse, this is a user name stored in the Red Hat JBoss Fuse installDir
/etc/users.properties
file.NoteIf the default user has been activated (uncommented) in the/etc/users.properties
file, the tooling autofills User Name and Password with the default user's name and password, as shown in Step 10. The default user is already activated in JBoss Fuse 6.2, but not in JBoss Fuse 6.0 or 6.1.If one has not been set, you can either add one to that file using the formatuser=password,role
(for example,joe=secret,Administrator
), or you can set one using the karafjaas
command set:jaas:realms
—to list the realmsjaas:manage --index 1
—to edit the first (server) realmjaas:useradd <username> <password>
—to add a user and associated passwordjaas:roleadd <username> Administrator
—to specify the new user's rolejaas:update
—to update the realm with the new user information
If a jaas realm has already been selected for the server, you can discover the user name by issuing the commandJBossFuse:karaf@root>
jaas:users
. - In Password, enter the password required for User Name to log into the server.
- Click Finish.The server runtime will appear in Servers panel. For example:Expanding the server node exposes the server's JMX node:
Related topics
Define a New Server |
New Server Configuration |
Add and Remove |
27.2. Starting a Server
Overview
Procedure
- In the Servers panel, select the server you want to start.
- Click .
- Console view opens and displays a message asking you to wait while the container is starting; for example:NoteIf you did not properly configure the user name and password for opening the remote console, a dialog opens asking you to enter the proper credentials. See Section 27.1, “Adding a Server”.
- After the container has started up, Shell view opens to display the container's management console; for example:
- The running server appears in Servers panel:
- The running server also appears in JMX Navigator under Server Connections:
27.3. Connecting to a Running Server
Overview
Connecting to a running server in Servers panel
- In Servers panel, expand the server runtime to expose its
JMX[Disconnected]
node. - Double-click the
JMX[Disconnected]
node:
Connecting to a running server in JMX Navigator
- In JMX Navigator, select the server to which you want to connect under the Server Connections node.
- Double-click it:
Viewing bundles installed on the connected server
- In either the Servers panel or JMX Navigator, 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:Using Properties view's Search tool, you can search for bundles by their Symbolic Name or by their Identifier, if you know it. As you type in the symbolic name or the identifier, the list updates, showing only the bundles that match the current search string.NoteThe Symbolic Name is the artifactId that you gave the project when you first created it. You can find the artifactId in the project's
pom.xml
file.
27.4. Disconnecting from a Server
Overview
Disconnecting from a server in Servers panel
- In Servers panel, expand the server runtime to expose its
JMX[Connected]
node. - Right-click the
JMX[Connected]
node to open the context menu, and then select Disconnect.
Disconnecting from a server in JMX Navigator
- In JMX Navigator, select the server from which you want to disconnect.
- Right-click it to open the context menu, and then select Disconnect.
27.5. Stopping a Server
Overview
- from Servers panel
- from the server's remote console in Shell view
Using Servers panel
- In Servers panel, select the server you want to stop.
- Click .
Using the remote console
- Open the Shell view hosting the server's remote console.
- Type CTRL+D.
27.6. Deleting a Server
Overview
Deleting a server
- In Servers panel, right-click the server you want to delete to open the context menu.
- Select Delete.
- Click OK.
Deleting the server's configuration
- On the menu bar, click JBoss Developer Studio → Preferences → Server.NoteOn Linux and Windows machines, you access Preferences through the Window menu.
- Expand the Server folder, and then select Runtime Environments to open the Server Runtime Environments page.
- From the list, select the runtime environment of the server that you previously deleted from Servers panel, and then click Remove.
- Click OK.
Chapter 28. Publishing Fuse Projects to a Server
Abstract
Overview
- Never publish automatically—You must select this option to manually publish projects.ImportantYou 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
- 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”.
- In the Servers panel, double-click the server runtime to open its Overview page.
- Expand Publishing, and then select Automatically publish when resources change.
- To increase or decrease the interval between publishing cycles, click the radio button next to Publishing interval (in seconds) up or down, as appropriate.
- 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.
- 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”). - 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.
- 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]
:NoteFor 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
- 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”.
- In the Servers panel, double-click the server runtime to open its Overview page.
- Expand Publishing, and then select Never publish automatically.
- If the Fuse project has already been assigned to the server runtime, make sure the If server started, publish changes immediately option is disabled.
- In the Servers panel, right-click the server runtime to open the context menu.
- Click Add and Remove... to open the server's Add and Remove page.
- If the If server started, publish changes immediately option is enabled, disable it.
- Skip to Step 6.
- If the Fuse project has not been assigned to the server runtime, assign it now.
- Do not enable the If server started, publish changes immediately option.
- Click Finish.The project appears in the Servers panel under the server runtime node, and the server runtime status reports
[Started]
: - In the Servers panel, right-click the project's node (in this case, the Fuse project
wildThing
) to open the context menu: - 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]
:NoteThe tooling does not support the Incremental Publish option. Clicking Incremental Publish results in a full publish.
Verifying the project was published to the server
- Connect to the server runtime. For details see the section called “Connecting to a running server in Servers panel”
- 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:
- 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, clickpom.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 |
Part VI. Working with Fabrics
Chapter 29. Setting up a Fabric Environment
Overview
- Providing the details for connecting to an existing fabric
- Connecting to the fabric
- Creating the containers that will host the various components of your distributed integration application
- Assigning each container one or more profiles, which provision containers by deploying and installing specified applications.
Opening the fabric perspective
Related topics
Chapter 30, Specifying and Connecting to a Fabric |
Chapter 30. Specifying and Connecting to a Fabric
30.1. Adding fabric details
Overview
Procedure
- In Fabric Explorer, right-click Fabrics to open the context menu, and then select Add Fabric details to open the Fabric Details wizard, as shown in Figure 30.1.
Figure 30.1. Fabric Details wizard
- In Name, enter the name of the fabric to which you want to connect. The name you enter identifies the fabric whose location you specify in Jolokia URL, and this name will appear in Fabric Explorer.The default Name is Local Fabric.
- In Jolokia URL, enter the url, in the form
http://hostname:port/jolokia/
, of the fabric to which you want to connect. This URL specifies the location of a fabric registry agent, whose default port is 8181.The default URL is http://localhost:8181/jolokia/. - In User name, enter the name used to log into the specified fabric.This is the user name that was either specified when the fabric was created or is defined in the Red Hat JBoss Fuse installDir
/etc/users.properties
file. In that file, user information is specified using this format:user=password,role
(for example,admin=admin,Administrator
).You can discover the user name by issuing the commandJBossFuse:karaf@root>jaas:users
, if the Jaas realm has been selected for the fabric. - In Password, enter the password required for User name to log into the specified fabric.This is the password that was either specified for User name when the fabric was created or is defined in the Red Hat JBoss Fuse installDir
/etc/users.properties
file. - In Zookeeper Password, enter the password required for logging into the specified fabric's zookeeper registry.This is the password that was either specified when the fabric was created or is the password of the first user defined in the Red Hat JBoss Fuse installDir
/etc/users.properties
file.You can discover the Zookeeper password by issuing the commandJBossFuse:karaf@root>fabric:ensemble-password
. - Click OK.The fabric's name appears in Fabric Explorer as a node beneath Fabrics.NoteBefore you can view or modify a fabric's containers, profiles or versions, you must connect to the fabric. For details see Section 30.2, “Connecting to a fabric”
Related topics
Section 30.5, “Deleting a fabric's details” |
30.2. Connecting to a fabric
Overview
Procedure
- In Fabric Explorer, select the fabric to which you want to connect, then right-click it to open the context menu.
- Select Connect.An expand arrow ( ) appears next to the fabric you selected in Fabric Explorer.
- Click ( ) to expand the fabric's tree and browse its containers, profiles, and versions.From here, you can create and deploy new containers or modify existing ones by assigning them new profiles or modified versions of existing profiles.
Related topics
Section 30.1, “Adding fabric details” |
30.3. Disconnecting from a fabric
Overview
Procedure
- In Fabric Explorer, select the fabric from which you want to disconnect, then right-click it to open the context menu.
- Select Disconnect.The tooling closes the connection with the selected fabric.
30.4. Editing a fabric's details
Overview
Procedure
- In Fabric Explorer, select the fabric whose details you want to edit, and right-click it to open the context menu.
- Select Edit Fabric details to open the Fabric Details dialog, as shown in Figure 30.1, “Fabric Details wizard”.
- In Name, enter a new name for the fabric, if necessary.
- In Jolokia URL, enter the new url of the fabric, if necessary.
- In User name, enter a name with which the new user will log into the selected fabric, if necessary.
- In Password, enter the new password to use for logging into the selected fabric, if necessary.
- Click OK.
30.5. Deleting a fabric's details
Overview
Procedure
- In Fabric Explorer, select the fabric whose details you want to delete, then right-click it to open the context menu.
- Select Delete Fabric details.The tooling closes the connection with the selected fabric, and then deletes the fabric's details.
Related topics
Section 30.1, “Adding fabric details” |
Chapter 31. Working with Fabric Containers
31.1. Creating a new child container
Overview
Procedure
- If necessary, in Fabric Explorer, expand the tree of the selected fabric in which you want to create the new child container.
- Right-click the target parent container to open the context menu, and then select Create a new child container.
Figure 31.1. Create Child Container wizard
- In Container name, enter a name for the new child container.We recommend that you replace the default name with a meaningful name that identifies the container's role or function.
- If multiple versions exist, you can select one from the Version drop-down list. Otherwise, accept the default value.
- Under Profiles, click the checkbox next to the profile or profiles you want to assign to the new child container.Profiles determine the function of containers; what applications they run. You can assign multiple profiles to a container, as long as the applications they install do not conflict with one another.ImportantDo not assign a base profile (one ending in
-base
) to a container. - Click OK.The new child container appears in Fabric Explorer as a node under ContainersNoteSelecting the new container in Fabric Explorer populates its Profiles and Profile Details pages in Properties viewer.
Related topics
Section 32.1, “Creating a new profile” |
Section 33.1, “Creating a new version of a profile” |
31.2. Creating a container on a remote host
Overview
Procedure
- If necessary, in Fabric Explorer, expand the tree of the fabric for which you want to create the new remote container.
- Right-click Containers to open the context menu, and then select Create a new container via SSH.
Figure 31.2. Create Container via SSH wizard
NoteAn error icon ( ) marks required fields that lack a valid value, and the dialog banner displays the number of errors detected. - In Container name, enter a name for the new container.We recommend that you replace the default name with a meaningful name that identifies the container's role or function.
- If multiple versions exist, you can select one from the Version drop-down list. Otherwise, accept the default value.
- In Host, enter the name or the IP address of the remote host.
- In User name, enter the name of a user authorized to log into the remote host.
- In Password, enter the password for User name.
- In Path, accept the default (~/containers/), or enter the path of the new container's location on the remote host.
- In Port, accept the default port number (22), or enter a new port number to use for establishing an ssh connection on the remote host.
- In SSH retries, accept the default (1), or enter the maximum number of retries to attempt at establishing an ssh connection on the remote host.
- In Retry delay, accept the default (1), or enter the delay, in milliseconds, between retry attempts.
- Under Profiles, click the checkbox next to the profile or profiles you want to assign to the container.Profiles determine the function of a container; what applications it runs. You can assign multiple profiles to a container, as long as the applications they install do not conflict with one another.ImportantDo not assign a base profile (one ending in
-base
) to a container. - Click OK.The new container appears in Fabric Explorer as a container node under ContainersSelecting the new container in Fabric Explorers populates its Profiles and Profile Details pages in Properties viewer.
Related topics
Section 32.1, “Creating a new profile” |
Section 33.1, “Creating a new version of a profile” |
31.3. Creating a new container on a cloud
Overview
Procedure
- In Fabric Explorer, if necessary, expand the tree of the fabric for which you want to create the new container on the cloud. Right-click Containers to open the context menu.
- Select Create a new container on the cloud to open the Create Container in a Cloud wizard.
Figure 31.3. Create Container in a Cloud/Choose the Cloud page
NoteUnless the connection details for a cloud have already been added to the tooling, this dialog opens devoid of selections. You can add a cloud's connection details now by clicking Add Cloud details and following the procedure in Section 34.1, “Adding cloud details”. - Select a cloud from the list, and click Next to open the New Containers Details page.
Figure 31.4. New Containers Details page
NoteAn error icon ( ) marks required fields that lack a valid value, and the dialog banner displays the number of errors detected. - In Container name, enter a name for the new container.We recommend that you replace the default name with a meaningful name that identifies the container's role or function.
- If multiple versions exist, you can select one from the Version drop-down list. Otherwise, accept the default version.
- In Group, accept the default (fabric), or enter the group in which to start up the new container.
- In User, accept the default (admin), or enter the name of another user who is authorized to log into the new cloud container.This is the user that was either specified when the fabric was created or is defined in the Red Hat JBoss Fuse installDir
/etc/users.properties
file (see Section 30.1, “Adding fabric details”). - In Password, enter the pasword required for User to log into the new cloud container.This is the password that was specified for User when the fabric was created or is defined for the user in the Red Hat JBoss Fuse installDir
/etc/users.properties
file. - In Zookeeper Password, accept the default generated password for logging into the cloud container's zookeeper registry, or enter the zookeeper password that was used when the fabric was created.You can discover the zookeeper password by issuing the commmand
JBossFuse:karaf@root>fabric:ensemble-password
. - In Hardware ID, select from the drop-down list the ID of the hardware archetype to use.Hardware archetypes specify the amount of memory and compute power available for running applications on machine images.ImportantThe next three fields provide two methods for specifying the software configuration (operating system, application server, and applications) you want to use. Either select an OS Family (and optionally a version), or select an Image ID.
- In OS Family, select from the drop-down list the family name of the operating system you want to use.If you select an OS Family, do not also select an Image ID.
- In OS Version, optionally select from the drop-down list the version for the operating system you selected.
- If you selected an OS Family, skip this step. Otherwise, in Image ID, select from the drop-down list the ID of the image template to use for the software configuration.NoteThe tooling starts an instance of the image in the cloud, and then installs a fabric agent and provisions the new agent with the selected profiles. Depending on the cloud provider, instantiation and provisioning could take some time.
- Under Profiles, select the profile or profiles you want to assign to the container.Profiles determine the function of containers—what applications they run. You can assign a container multiple profiles, as long as the applications they install do not conflict with one another.ImportantDo not assign a base profile (one ending in
-base
) to a container. - Click OK.The new container appears in Fabric Explorer as a container node under ContainersNoteSelecting the new container in Fabric Explorer populates its Profiles and Profile Details pages in Properties viewer.
Related topics
Chapter 34, Creating a Fabric in the Cloud |
Section 32.1, “Creating a new profile” |
Section 33.1, “Creating a new version of a profile” |
31.4. Starting a container
Overview
Procedure
- If necessary, in Fabric Explorer, expand the tree of the fabric whose container you want to start.
- Select the container and right-click it to open the context menu.
- Click Start Container.NoteTo check whether the tooling started the container, click Containers in Fabric Explorer, and open the Properties view. You should see something similar to Figure 31.5, where
mycamelExample
was started and provisioned successfully.Figure 31.5. Container status in Properties view
The status indicators in the Status column of the Properties view indicate the startup state of the container, as shown Table 31.1:Table 31.1. Container startup status
Icon Meaning Container stopped Container started; analysis and provisioning in progress Container started and provisioned successfully Failure occurred during startup or provisioning
Related topics
Section 31.6, “Stopping a container” |
31.5. Changing a Container's Profiles
Overview
Procedure
- Select the container.
- In the Properties view, select the Profiles tab.
- From the list, select the profile or profiles you want to deploy to the container by highlighting them.NoteTo select multiple profiles, hold down the CTRL key while you select them.
31.6. Stopping a container
Overview
Procedure
- If necessary, in Fabric Explorer, expand the tree of the fabric whose container you want to stop.
- Select the container and right-click it to open the context menu.
- Click Stop Container.NoteTo check whether the tooling stopped the container, click Containers in Fabric Explorer, and open the Properties view. You should see something similar to Figure 31.6, where
myRoute
was stopped successfully.Figure 31.6. Container status in Properties view
For information on the meaning of the status indicators that might appear in the Status column of the Properties view, see Table 31.1, “Container startup status”.
Related topics
Section 31.4, “Starting a container” |
Section 31.7, “Deleting a container” |
31.7. Deleting a container
Overview
Procedure
- If necessary, in Fabric Explorer, expand the tree of the fabric whose container you want to delete.
- Click Containers to populate Properties view with a list of the fabric's containers.
- In Properties view, select the container you want to delete, and then click on the right-hand side of the toolbar.
Figure 31.7. Container selected for deletion in Properties view
- In the Destroy Container(s) dialog, click OK to delete the selected container.The tooling displays a message that removal is in progress. In Properties view, the container's status briefly changes to
stopped
, and then the container disappears from the list. - In Fabric Explorer, open the fabric's context menu, and click Refresh to update Containers and remove the deleted container from the tree.NoteIf you have the Red Hat JBoss Fuse console open in Shell view, you can verify that the container and its configuration have been removed from the fabric by entering at the command line
fabric:container-list
.
Related topics
Section 31.6, “Stopping a container” |
Section 31.1, “Creating a new child container” |
Section 31.2, “Creating a container on a remote host” |
Section 31.3, “Creating a new container on a cloud” |
Chapter 32. Working with Fabric Profiles
32.1. Creating a new profile
Overview
Procedure
- In Fabric Explorer, expand the fabric in which you want to create a new profile.
- Expand the fabric's tree to the level of the profiles, as shown in Figure 32.1.
Figure 32.1. Accessing the profiles
- Select the profile on which you want to base the new profile, and right-click it to open the context menu.ImportantBecause the selected profile is the parent of the new profile, the new profile inherits the selected profile's configurations, properties, features, repositories and bundles as well as those of the selected profile's ancestors. However, a child's configurations override an ancestor's when their configuration files have the same name.NoteNeither configuration files nor properties are visible within the tooling, but you can view them in the Red Hat JBoss Fuse Management Console. For details, see the Red Hat JBoss Fuse Management Console documentation at https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/.
- Select Create a new Profile.
Figure 32.2. Create Profile dialog
- In Profile name, enter a name for the new profile.Use a name that is descriptive of the new profile's function.
- Click OK to create and save the new profile.The new profile is added to the list of profiles in Fabric Explorer, under its parent profile.
- In Fabric Explorer, select the new profile to populate the Properties editor with the new profile's properties information and profile details.
- In the Properties editor, click the Details tab.
Figure 32.3. Profiles page
On the Profiles page, you can add, delete, or edit features, the repositories from which features are downloaded, and bundles. You can also add or remove parent profiles. Profiles can have multiple parents, and they inherit the qualities of eachFeatures are files that aggregate references to interdependent or related bundles that together define a feature. Typically, you'd use bundles only if the feature they define is not already included in a features file. For more information on bundles and features, see Deploying Features.Child profiles inherit everything (configurations, properties, features, repositories, and bundles) from their immediate parents and from all of their parents' ancestors. When the child's and any ancestor's configuration file have the same name, the child's configuration file replaces the ancestor's file. Otherwise, configurations are cumulative.NoteThe Profiles page displays only the features, repositories, and bundles added by the child profile, not those contributed by the profile's parents or other ancestors. The Parents pane shows (highlighted) the profile's immediate parents only. - Make the changes you want to the new profile to configure it.Changes are automatically saved as you make them.NoteIn Fuse Integration perspective, you can easily add a Fuse project to the new profile by dragging it from Project Explorer and dropping it onto the new profile in Fabric Explorer. When you do, the fabric tooling builds the project, runs all tests, installs the project in the new profile, and uploads the profile into the fabric's internal Maven repository. Because profiles are stored in a fabric's internal repository, they cannot be shared across other fabrics.ImportantIf you drop your project on a fabric container, rather than on a profile, the next time that container is provisioned, your project is wiped out.You can now assign the new profile to a container.
- In Fabric Explorer, select the container to which you want to assign the new profile.The fabric tooling populates the Properties editor with the container's properties information and profile details.
- Open the container's Details tab, and then select the new profile in the Profiles list.
Related topics
Section 33.1, “Creating a new version of a profile” |
32.2. Deleting a profile
Overview
Procedure
- In Fabric Explorer, expand the fabric which contains the profile you want to delete.
- Expand the fabric's tree to the level of versions, and then expand the version that contains the target profile.
- Select the target profile, and right-click it to open the context menu.
- Select Delete Profile.
Chapter 33. Working with Versions
33.1. Creating a new version of a profile
Overview
Creating a new version
- In Fabric Explorer, select the fabric in which you want to create a new version.
- Expand the fabric's tree to the level of Versions, shown in Section 32.1, “Creating a new profile”.
- Select Versions, and then right-click it to open the context menu.
- Select Create Version.
- In the Create Version wizard, enter a new version or accept the default value.The default version is always a minor increment of the highest-numbered version. So, if the highest-numbered version is 1.3, the new version will default to 1.4, and all of the profiles in version 1.3 will be copied into version 1.4.ImportantVersion names are important! The tooling sorts version names based on the numeric version string, according to major.minor numbering, to determine the version on which to base a new one. You can safely add a text description to a version name as long as you append it to the end of the generated default name like this:
1.3<.description>
. If you abandon the default naming convention and use a textual name instead (for example,Patch051312
), the next version you create will be based, not on the last version (Patch051312
), but on the highest-numbered version determined by dot syntax. - Click OK.The tooling copies all of the base version's profiles into the new version and displays the new version in Fabric Explorer, directly under the base version.
Modifying profiles in the new version
- In Fabric Explorer, expand the newly created version.
- Select a profile that you want to modify.The tooling populates the Properties editor with the profile's details for you to edit.
- In the Properties editor, click the Details tab to access the Profiles page.
- Make the changes you want to the new profile to configure it.Changes are automatically saved as you make them.
Related topics
Section 32.1, “Creating a new profile” |
33.2. Setting a container's version
Overview
Procedure
- In Fabric Explorer, select the container whose profiles you want to change.
- Right-click it to open the context menu, and then select Select Version.The Select Version submenu lists all available versions.
- Click the version you want to assign the selected container.The container is immediately provisioned with the new version of any profile assigned to it.
Chapter 34. Creating a Fabric in the Cloud
- Have established an account with a cloud provider
- Provide the tooling the account details for connecting to the cloud
- Specify the details required for creating the fabric and the machine image on which it will run
34.1. Adding cloud details
Overview
Procedure
- In Fabric Explorer, right-click Clouds to open the context menu, and then select Add Cloud details.
Figure 34.1. Cloud Details wizard
NoteAn error icon ( ) marks required fields that lack a valid value, and the dialog banner displays the number of errors detected. - In Name, enter a name for the cloud.ImportantThe next three fields provide two methods for specifying the provider's information. You select either a provider's name, or you select both an API and its endpoint.
- In Provider name, select the name of the cloud provider from the drop-down list.If you select a provider name, the tooling autofills Api name and Endpoint with the selected provider's information, so you can skip to Step 6.
- In Api name, select from the drop-down list the name of the API you want to use.This list displays only APIs that have been installed on your local machine or environment.
- In Endpoint, enter the uri of the web service that exposes the API you selected in Step 4.If you have an on-premises, private cloud installed, you need to get this uri from the cloud administrator.
- In Identity, enter the account identifier supplied by the cloud provider.For example, for Amazon Elastic Compute Cloud (EC2) accounts, you'd enter the Access Key ID.
- In Credential, enter the account password supplied by the cloud provider.For example, for Amazon Elastic Compute Cloud (EC2) accounts, you'd enter the Secret Access Key.
- In Owner, for EC2 only, enter the id assigned to a custom image.This option is EC2-specific and applies only to custom images. To query or use a custom image, you must enter the owner id assigned to it by EC2; otherwise, the image will not appear in the list of instances.
Related topics
Section 31.3, “Creating a new container on a cloud” |
34.2. Specifying fabric details
Overview
Procedure
- In Fabric Explorer, right-click Fabrics to open the context menu, and then select Create Fabric in the cloud.
- On the Create Fabric in the cloud wizard's Choose the Cloud page, select the cloud from the list, and then click Next to open the wizard's Fabric Details page.
Figure 34.2. Fabric Details page
NoteAn error icon ( ) marks required fields that lack a valid value, and the dialog banner displays the number of errors detected.You may have to wait a few seconds while the tooling retrieves the location, hardware, and image IDs from your cloud provider to populate the wizard's corresponding fields. - In Fabric Name, accept the default name, or enter a different name for the new fabric.
- In Container name, accept the default name, or enter a different name for the new container that will host the fabric registry.
- In Group, accept the default name, or enter a different name for the group in which to start up the new fabric registry container.
- In User, accept the default user name, or enter a different user name to use for logging into the new fabric registry container.
- In Password, enter the password required for User to log into the specified fabric.
- In Zookeeper Password, accept the default, generated password for logging into the cloud fabric's zookeeper registry, or enter a different password.
- In Location ID, select from the drop-down list the ID of the region in which the machines you want to use are located.
- In Hardware ID, select from the drop-down list the ID of the hardware archetype you want to use.Hardware archetypes specify the amount of memory and compute power available for running applications on machine images.ImportantThe next three fields provide two methods for specifying the software configuration (operating system, application server, and applications) you want to use. Either select an OS Family (and optionally a version), or select an Image ID.
- In OS Family, select from the drop-down list the family name of the operating system you want to use.If you select an OS Family, do not also select an Image ID.
- In OS Version, optionally select from the drop-down list the version for the operating system you selected.
- If you selected an OS Family, skip this step. Otherwise, in Image ID, select from the drop-down list the ID of the image template to use for the software configuration.
- In Maven proxy URI, accept the default URI, or enter the URI to the Maven proxy repository you want to use.
- Click Finish.The tooling creates the container, then provisions it with all of the bundles, features, and profiles required to create a fabric registry. This process can take up to ten minutes. When it's done, the container specified in Step 4 appears in Fabric Explorer as a node under Fabrics.NoteIt's a good idea to access your cloud account and verify that the new fabric registry container is up and running.
Related topics
Section 34.1, “Adding cloud details” |
Section 31.3, “Creating a new container on a cloud” |
Appendix A. Wizard field references
Name
New Camel XML File — Creates a new XML file for editing routes with the route editor
Properties
Table A.1. New Camel XML File properties
Name | Default | Description |
---|---|---|
RouteContainer | Specifies the folder into which the new file will be placed. | |
File Name | camelContext.xml | Specifies the name of the new routing context file. |
Framework | Spring | Specifies whether the context file is intended to be used in a Spring container or in an OSGi container that supports Blueprint or to be added to into existing camelContext s. |
META-INF
folder:
- Spring—
projectName /src/main/resources/META-INF/spring/
- OSGi Blueprint—
projectName /src/main/resources/META-INF/blueprint/
Related topics
Chapter 6, Creating a New Camel XML file |
Name
New Fuse Project — Creates a new Fuse project
Properties
Table A.2. New Fuse IDE project: select project location properties
Name | Default | Description |
---|---|---|
Project Name | Specifies the name of the new project. | |
Use default Workspace location | Enabled | Specifies whether to create the new project in the default workspace. |
Location | Specifies the full path to an alternate workspace when the default workspace location option is disabled. | |
Add project(s) to working set | Disabled | Specifies whether to add the new project to one or more established working sets. |
Working set | Specifies the working sets in which to add the new project when the working set option is enabled. |
Related topics
Chapter 5, Creating a New Fuse Project |
Name
New Fuse Project — Creates a new Fuse project
Properties
Table A.3. New Fuse project: select project archetype and specify its details properties
Name | Default | Description |
---|---|---|
Archetype | Specifies the Maven archetype to use to create the new project. | |
Group ID | Specifies the group ID Maven uses when generating the new project. This ID is mapped to the POM file's groupId element. | |
Artifact ID | Specifies the artifact ID Maven uses when generating the new project. This ID is mapped to the POM file's artifactId element. | |
Version | 1.0.0-SNAPSHOT | Specifies the version name Maven uses when generating the new project. You can accept the default version name, or enter a new one. This value is mapped to the POM file's version element. |
Package | <groupID>.<artifactID> | Specifies the package name for the generated artifacts. You can accept the default package name, or enter a new one. |
Related topics
Chapter 5, Creating a New Fuse Project |
Name
New Fuse Message — Creates a new message to use in route tracing.
Properties
Table A.4. Fuse Message File properties
Name | Default | Description |
---|---|---|
Parent Folder | The selected folder | Specifies the folder into which the new message file will be placed. |
File Name | message.xml | Specifies the name of the new message file. |
Related topics
Section 22.1, “Creating test messages for route tracing” |
Name
New Camel JUnit Test Case — Configures the JUnit artifacts created to test a Apache Camel route.
Properties
Table A.5. New Camel JUnit properties
Name | Default | Description |
---|---|---|
Source Folder | project/src/test/java | Specifies the folder into which the JUnit code is placed. |
Package | Name of the package when the project was created | Specifies the package name for the JUnit code. |
Camel XML file under test | Selected context file, or blank if other than a context file is selected | Specifies the Camel XML file containing the routes to be tested. |
Name | classname based on the selected context file (for example, CamelContextXMLTest), or empty if none selected | Specifies the name of the JUnit class. |
Method stubs | Specifies the JUnit method stubs to include in the generated test class. | |
Generate comments | Specifies whether to generate comments in the new test class. |
Related topics
Chapter 8, Creating a new Apache Camel JUnit test case |
Name
Test Endpoints — Lists the endpoints that can be tested by a JUnit test case.
Properties
Table A.6. Test Endpoint properties
Name | Default | Description |
---|---|---|
Available endpoints | all | Specifies the endpoints to test in the Camel JUnit test case. |
Related topics
Chapter 8, Creating a new Apache Camel JUnit test case |
Name
Define a New Server — Defines a new server instance.
Properties
Table A.7. New Server properties
Name | Default | Description |
---|---|---|
Server type | Specifies the type of server to define. | |
Server's host name | Specifies the name of the machine running the server. | |
Server name | Specifies the name of the server. | |
Server runtime environment | Selected server's runtime | Specifies the runtime environment of the server. |
Related topics
Section 27.1, “Adding a Server” |
Name
New Server Configuration — Configures access details for the server.
Properties
Table A.8. Server Configuration details properties
Name | Default | Description |
---|---|---|
Host Name | For localhost, 0.0.0.0 | Specifies the address of the machine running the server. |
Port Name | 8101 | Specifies the port used to contact the server. |
User Name | [Optional] Specifies the name of a user authorized to access the server remotely. | |
Password | [Optional] Specifies the password the authorized user must enter to access the server remotely. |
Related topics
Section 27.1, “Adding a Server” |
Name
Add and Remove — Specifies the resources available to a server.
Properties
Table A.9. Add and Remove properties
Name | Description |
---|---|
Available | Specifies the resources that are available to the server. |
Configured | Specifies the resources that the server is configured to use. |
Related topics
Section 27.1, “Adding a Server” |
Name
Fabric Details — Specifies information needed to connect to a fabric.
Properties
Table A.10. Fabric Details properties
Name | Default | Description |
---|---|---|
Name | Local Fabric | Specifies the name of the fabric to connect to. |
Jolokia URL | https://localhost:8181/jolokia | Specifies the url, in the form of https://hostname:port/jolokia, of the specified fabric. |
User name | Specifies the name of a user that has login privileges. | |
Password | Specifies the password of the specified user. | |
Zookeeper Password | Specifies the password for accessing the fabric registry. |
Name
Create Child Container — Specifies information needed to create a container on the local host.
Properties
Table A.11. Create Child Container properties
Name | Default | Description |
---|---|---|
Container name | Container# | Specifies the name of the new container. |
Version | The highest-numbered version according to major.minor numbering | Specifies the version of the profiles to use. |
Profiles | Specifies the profile(s) to install in the new container. |
Related topics
Section 31.1, “Creating a new child container” |
Name
Create Container via SSH — Specifies information needed to create a container on a remote host.
Properties
Table A.12. Create Container via SSH properties
Name | Default | Description |
---|---|---|
Container name | Container# | Specifies the name of the new container. |
Version | The highest-numbered version according to major.minor numbering | Specifies the version of the profiles to use. |
Host | Specifies the name or the IP address of the remote host. | |
User name | Specifies the name of a user authorized to login to the remote host. | |
Password | Specifies the password of the specified user. | |
Path | ~/containers | Specifies the path of the new container's location on the remote host. |
Port | 22 | Specifies the port number to use for establishing an ssh connection on the remote host. |
SSH retries | 1 | Specifies the maximum number of retries to attempt at establishing an ssh connection on the remote host. |
Retry delay | 1 | Specifies the delay, in milliseconds, between retry attempts. |
Profiles | Specifies the profile(s) to install in the new container. |
Related topics
Section 31.2, “Creating a container on a remote host” |
Name
Create Container in a Cloud — Specifies information needed to create a container in a cloud.
Properties
Table A.13. Create Container in a Cloud:New Containers details properties
Name | Default | Description |
---|---|---|
Container name | Container# | Specifies the name of the new container. |
Version | The highest-numbered version according to major.minor numbering | Specifies the version of the profiles to use. |
Group | fabric | Specifies the name of the group in which to start up the new container. |
User | admin | Specifies the name of a user authorized to login to the new container. |
Location ID | Selects the region in which the machines you want to use are located. | |
Hardware ID | Selects the hardware archetype to use. | |
OS Family | Selects the general operating system to use. | |
OS Version | Selects the version of the operating system you selected. | |
Image ID | Selects a specific image template to use for the software configuration. | |
Profiles | Specifies the profile(s) to install in the new container. |
Related topics
Section 31.3, “Creating a new container on a cloud” |
Name
Create Version — Specifies the identifier for the new version of the fabric's profiles.
Properties
Table A.14. Create Version properties
Name | Default | Description |
---|---|---|
Create a new version for rolling upgrades to Profiles | The highest-numbered version according to major.minor numbering | Specifies the identifier for the new version of fabric's profiles. |
Related topics
Section 33.1, “Creating a new version of a profile” |
Name
Cloud Details — Specifies information needed to connect to a cloud.
Properties
Table A.15. Cloud Details properties
Name | Default | Description |
---|---|---|
Name | Specifies the name of the cloud to connect to. | |
Provider name | Selects the cloud provider. | |
Api name | Selects the API to use on the specified cloud. | |
Endpoint | Specifies the cloud endpoint uri. | |
Identity | Specifies the account identifier (supplied by the cloud provider). | |
Credential | Specifies the account password (supplied by the cloud provider). | |
Owner | Specifies the name of the account owner. |
Related topics
Section 34.1, “Adding cloud details” |
Name
Create Fabric in the Cloud — Specifies information needed to create a fabric in a cloud.
Properties
Table A.16. Create Fabric in a Cloud:Fabric details properties
Name | Default | Description |
---|---|---|
Fabric name | Cloud Fabric | Specifies the name of the new fabric. |
Container name | Registry | Specifies the name of the fabric registry container. |
Group | fabric | Specifies the name of the group in which to start up the fabric registry container. |
User | admin | Specifies the name of a user authorized to login to the fabric registry container. |
Password | Specifies the user's password for logging into the the fabric. | |
Zookeeper Password | **************** | Specifies the zookeeper password for logging into the cloud fabric's zookeeper registry. |
Location ID | Selects the region in which the machines you want to use are located. | |
Hardware ID | Selects the hardware archetype to use. | |
OS Family | Selects the general operating system to use. | |
OS Version | Selects the version of the operating system you selected. | |
Image ID | Selects a specific image template to use for the software configuration. | |
Maven proxy URI | http://repo.fusesource.com/nexus/content/groups/ea | Specifies the Maven proxy repository to use. |
Related topics
Section 34.2, “Specifying fabric details” |
Appendix B. Tooling preferences
Name
Editor — Sets the default value for some route editor properties.
Properties
Table B.1. Editor Properties
Name | Default | Description |
---|---|---|
Language | Simple | Specifies the default expression language used by the route editor. |
ID values | Enabled | Determines whether ID values are used to label EIP nodes on the route editor's canvas. |
Layout direction | Right | Specifies the direction in which routes are laid out on the route editor's canvas. |
Diagram grid | Enabled | Determines whether a grid overly is displayed in the background on the route editor's canvas. |
Related topics
Section 7.10, “Configuring the route editor” |
Name
Colors — Sets the default colors for diagrammatic components of Route editor.
Properties
Table B.2. Colors Properties
Name | Description |
---|---|
Route Editor Diagram Grid Color | Specifies the default color for the diagram grid. |
Route Editor Diagram Connection Color | Specifies the default color for the connection in the diagram. |
Route Editor Diagram Text Color | Specifies the default color for the text in the diagram. |
Route Editor Diagram Figure Background | Specifies the default color of EIP node background. |
Route Editor Diagram Figure Foreground | Specifies the default color of EIP node foreground. |
Related topics
Section 7.10, “Configuring the route editor” |
Legal Notice
Trademark Disclaimer