Web Configuration Interface

The embedded web app adds the possibility to create, configure and monitor service assemblies through a web interface.

Configuration of an service assembly for an JBI-compliant ESB is mainly done by editing xml-files. Build tools like maven help by providing support for building the deployment file. Still, writing the xml files manually is a time consuming task.

The provided web app should ease the process of creating, configuring and monitoring service assemblies by providing an intuitive interface and immediate validation.

Current Prototype

The web application is startable by running mvn jetty:run-war inside the openengsb-embedded project.

Note: All openengsb projects should be installed in your local maven repository. This starts an integrated ServiceMix in the background and the web app at the url http://localhost:8080. Currently, we provide descriptors for the following JBI components:

Creating a Service Assembly

The following Hello World style example creates a SA, which polls for new files in one directory and writes the polled file to another directory.

  • Create a new SA by clicking Create New Assembly. A view for adding a new SA appears.
  • Give the new SA a name and create it. The view for creating new endpoints and beans appears.
  • Create a new File Sender Endpoint endpoint.
  • Configure at least the following parameters for the sender:
    • Service: A unique name for the service, e.g. filesender.
    • Endpoint: A name for the endpoint, e.g. endpoint.
    • Outbox: Directory where the file sender should put incoming files.
  • Click Save Me! to save the endpoint configuration.
  • Now, create a second endpoint of type File Poller Endpoint.
  • Configure at least the following parameters for the poller endpoint:
    • Service: A unique name for the service, e.g. filepoller.
    • Endpoint: A name for the endpoint, e.g. endpoint.
    • Target Endpoint: Select the previously configured endpoint.
    • Inbox: Directory which the SU checks for incoming files.
  • Click Save Me! to save the endpoint.
  • Click Deploy to deploy the configured SA into the embedded ServiceMix.
  • Now it should be possible to put xml files into the inbox directory. The file will be picked up by ServiceMix and copied to the outbox directory.

Adding support for new JBI components

Adding support for a new jbi component is simply done by creating a descriptor file, containing the supported endpoints and beans and a language file for displaying meaningful information for endpoints/beans and their attributes/properties in the webapp. This files are currently located in the core/config/ui project in the src/main/webapp/descriptors directory.

Descriptor File

The descriptor currently supports definitions of endpoints with attributes and beans with properties (by setter injection). Take a look at the descriptor.xsd found in core/config/ui/src/main/resources. The following xml shows the description for the servicemix-file poller endpoint.

<endpoint name="poller">
  <attributes>
    <serviceName name="service" />
    <endpointName name="endpoint" />
    <endpointTarget name="target" serviceName="targetService" endpointName="targetEndpoint" />
    <bool name="autoCreateDirectory" defaultValue="true" />
    <int name="period" min="0" optional="true" defaultValue="5000" />
    <string name="file" />
    <bool name="deleteFile" defaultValue="true" />
    <bool name="recursive" defaultValue="false" />
  </attributes>
</endpoint>

Language File

The language file is a properties file containing display names for each described endpoint, bean and their attributes. E.g. for the servicemix-file poller endpoint the following language file has been created.

poller._name=File Poller Endpoint
poller.service=Service
poller.endpoint=Endpoint
poller.target=Target Endpoint
poller.autoCreateDirectory=Auto Create Directory
poller.period=Period (ms)
poller.file=Inbox
poller.deleteFile=Delete File
poller.recursive=Recursive