You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Use of URIs

URI can be used at serveral places inside ServiceMix.

Endpoint resolution

when calling context.resolveEndpointReference(epr)

ActivationSpec
<sm:activationSpec targetUri="interface:http://www.foo.bar/MyInterface">
 ...
 </sm:activationSpec>
EIP component
WS-Addressing

URI syntax

The ServiceMix container can parse the following URIs:

  • interface:qname
  • operation:qname[sep]name

  • service:qname
  • endpoint:qname[sep]name

QName will be represented as:
namespace[sep]name

The seprator used will be:

  • '/' if the namespace looks like 'http://'
  • ':' if the namespace looks like 'urn:foo:bar'

Other protocols will be given to components for endpoint resolution.
These uris will be given inside an xml fragment:

<epr>
   <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">
     uri
   </wsa:Address>
 </epr>

It is up to binding components to resolve such EPR and provide an adequate ServiceEndpoint.
If used to resolve an EPR, only the endpoint: protocol can be used.

Examples

Basic idea

Use a simple URI syntax to refer to explicit JBI endpoints. e.g.

Auto-creation

One of the neat things about using ActiveMQ is that once its up and running, you can refer to JMS endpoints (queues/topics) by name and things are auto-created for you by default. If required you can apply security access roles to this to prevent certain users creating new endpoints within a namespace.

So having a default broker with ActiveMQ installed as a component, it would be nice to just send to a new URI of the users choosing, such as

  • jms://activemq/queue/FOO.BAR

and for the JBI endpoint to be auto-created (or the endpoint handled by a single endpoint for all URIs etc).

  • No labels