ant elder wrote:
On 10/1/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
ant elder wrote:
On 9/29/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

<snip>

Here's sample code to illustrate that use case:

http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/sebastien/java/sca/domain-and-node/samples/
SampleTuscanyDomainImplementation.java

Why does that sample need to add and start composites with:

          // Add the Calculator deployable composite to the domain
composite
          domain.addComposite(new QName("http://calc";, "Calculator"));

        // Start the Calculator composite
          domain.startComposite(new QName("http://calc";, "Calculator"));

The contribution jar is going to have the sca-contribution.xml (or the
composites in the "deployables" folder we once talked of supporting),
No, sca-contribution.xml is optional.

so
can't the simplest case just be adding the contribution and the
deployable
composites get started automatically?

I don't think that having to write a sca-contribution.xml file is the
simplest case.

<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0";
              targetNamespace="http://calc";
              xmlns:sample="http://calc";>
   <deployable composite="calc:Calculator"/>
</contribution>

vs

domain.addComposite(new QName("http://calc";, "Calculator"));

Placing the composite file under META-INF/deployables will appear simple
to some people, but will not necessarily play well with other people
using IDEs for example which often hide META-INF, or people who are not
used to place their development artifacts, .wsdl, .xsd, .componentType,
or .composite... under META-INF.


Agree about sca-contribution.xml not being simplest nor
META-INF/deployables, but we've had this discussion before and couldn't get
much agreement on anything else. Take the Tuscany/Geronimo integration as an
example, deploying an sca contribution jar on that and the code can only
tell which composites to add based on somethng like sca-contribution.xml or
doing some default behaviour like add all composites or add no composites.

Does the spec say anywhere that when there is no sca-contribution.xml then
composites in a contribution must not be added by default?

   ...ant


Assembly specification V1.0

2867 The contribution optionally contains a document that declares runnable composites, exported
2868 definitions and imported definitions.
...
2887 deployable element: Identifies a composite which is a composite within the contribution that is 2888 a composite intended for potential inclusion into the virtual domain-level composite. Other 2889 composites in the contribution are not intended for inclusion but only for use by other 2890 composites. New composites can be created for a contribution after it is installed, by using the 2891 add Deployment Composite capability and the add To Domain Level Composite capability.

This tells me that:

- sca-contribution.xml is optional
- composites not listed as deployables are not intended for inclusion
- composites can be included in the domain after contribution, manually using the addDeploymentComposite and addToDomainLevel operations - the spec says "potential inclusion" and does not even imply that deployable composites should be included in the domain by default

Including all composites in the domain by default when there's no sca-contribution.xml is going to be pretty inconvenient and confusing as it'll force people to ship an empty sca-contribution.xml file in all contributions containing only composites intended for use by other composites (aka implementations).

I don't think that this was the intent of the spec. If it's not clear, we should send an issue to the assembly spec OASIS TC.

Thoughts?

--
Jean-Sebastien


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

Reply via email to