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