Friends, I'm working on a demo to illustrate the flexibility SCA provides
to client applications. I want to take the exact same code and use it to
invoke different services using different access methods, etc., without
changing the code. As I see it, there are three ways to do this. In
order of elegance, imho, here are the three approaches:
Put the name of the .composite file into a Java .properties file. When I
call SCADomain.newInstance("x.composite"), I replace "x.composite" with
the property from the file. I can change the .properties file, re-run the
code, and I get different behavior from the client application.
Change the classpath so that the Java runtime finds one .composite file
instead of another.
Change the .composite file itself to point to a different service.
Any advice on how I should do this? I prefer solution #1 because it's the
most maintainable. I can use an XForms interface to read the different
.composite files and select one or the other.
The main thing I want to show is how to invoke different services in
different ways without changing the client application at all.
Cheers,
-Doug
p.s. I'll post the demo here as it matures, of course....