Ok, so this will be tricky. Here is a plan of how it might be achieved
but it's hacky and I'd have to give it a spin to confirm that it's
doable...
In you main program
Create an SCA Node and store it in a static (yuck!)
Use the node to load your composite that holds the configuration
service and the event service
In the composite
The configuration service exposes a web service
The event service exposes a JMS service and defines an unwired
reference with multiplicity 0..n
In the configuration service - when a message arrives containing a new URL
Find the node (using the static)
Use the node to find the event service component model
Programmatically construct a new ws binding model with the new URL,
add it to the unwired reference in the event service component
Get the composite activator from the node and activate the
component reference
In the event service - when an event message arrives
Retrieve the list of references that are currently available and
choose the one you want to use.
Not sure how you choose which of the configured URIs to use?
So I could give this a spin to see if it works but, as I say, this
would be an experimental approach.
Simon