Jean-Sebastien Delfino wrote:
Comments inline.

Luciano Resende wrote:
I have modified the SCADomain to utilize sca-contribution.xml to find the root of the contribution and the deployable composites when these are not explicitly passed to the SCADomain. This helps simplify our webApp story and
promote a consistent way to identify deployable composites.

Below, you can find a summary of the usage scenarios of the SCADomain and
how it would use sca-contribution.xml or sca-contribution-generated.xml

newInstance() or newInstance("http://localhost";, null) -> assumes an
sca-contribution.xml, finds the contribution root from it, uses the
deployables specified in it.

newInstance("http://localhost";, ".") -> assumes an sca-contribution.xml,
uses the given location, uses the deployables in contrib.xml

... and determines the actual location of the contribution root using sca-contribution.xml (same algorithm as in the next case where we determine the actual location of the contribution using the given path to a composite, here we use META-INF/sca-contribution.xml instead).


newInstance("http://localhost";, ".", "MyComposite.composite") -> does not
require sca-contribution.xml, finds the contribution from the given
composite and adds the given composite to the domain.

I have also modified the implementation-composite sample to use
sca-contribution.xml to define the deployable composite.

During this exercise, I found that the SCADomain spi is confusing, and would
like to propose the following signatures to be available :

public static SCADomain newInstance(String domainURI)
public static SCADomain newInstance(String domainURI, String
contributionLocation, String... composites)

and remove the current

public static SCADomain newInstance(String composite)

This should help avoid further confusion

+1, SCADomain.newInstance(domainURI) replaces SCADomain.newInstance(composite)


Thoughts ?


Further thoughts:

I looked at the samples and how they're using SCADomain.newInstance("MyComposite.composite") and I think that it will unnecessarily complicate them to change them to call SCADomain.newInstance("http://localhost:8080, "/", "MyComposite.composite"). In most cases the domain URI is http://localhost:8080 and the contribution is located at the root of the classpath. What varies and is really useful is the path to the composite to activate. So I now suggest to keep the current SCADomain.newInstance(composite).

I also suggest to change the contribution location from "." to "/". It resolves to the same location but I think "/" more clearly indicates that your SCA contribution is at the root of the classpath.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to