Luciano Resende wrote:
From what you are describing, there is a lot going on behind the
scenes to provide the right URI to use based on multiple criterias.
Have you thought about using something like a IP Sprayer to handle the
load balancing and high availability of your service and use the IP
Sprayer URI as constant URI ?
On Tue, Jun 24, 2008 at 2:45 PM, Dean H Mitchell <[EMAIL PROTECTED]> wrote:
Hi-
One of my components is implemented as a distributed web service under
Tomcat/Axis2. Currently the IP address of this service is hardcoded in my
.composite XML file passed to SCADomain.newInstance. A problem we're trying
to figure out is how to handle this when that IP address has to change? It
might change for a number of reasons..the original machine is down and
another has to fulfill the request, load balancing, or because of some other
routing criteria we might employ. Is there any clean way in SCA to handle
this? E.g. handling dynamic IP addresses in the composite file? The only
options I've come up with are a bit of a hack...programmatically altering
the XML composite file with the new IP address before loading it in, or
traversing the Component/ComponentReference/Binding lists post-load and
finding the proper binding and doing a setURI with the new IP.
thanks,
Dean.
Is this on the service or reference side? If it is on the service side,
this sounds like a redeployment of the SCA service whose binding exposes
the endpoint for the URI. When the service is redeployed, its URI can
change. Currently, the URI can be specified either in the composite file
or in a WSDL file that the composite file refers to. Patching the URI
into the model using setURI() is not a good idea and probably won't work
in 1.3 because of a change in the code that that calculates URIs.
How about using a WSDL service with multiple ports to represent all the
possible URIs that might be used by clients? This will be supported in
the 1.3 release using the wsdlElement/wsdl.service attribute on <binding.ws>.
This would allow the URI used by clients to change without redeploying
the SCA service.
Simon