Yang, see replies within. Greg Dritschler
On Thu, Apr 3, 2008 at 4:41 PM, Yang Lei <[EMAIL PROTECTED]> wrote: > Hello, > > I am interested in knowing how Tuscany supports SCA Assembly Spec 1.0 > section 1.8 > > 1.8 SCA Definitions > 2491 There are a variety of SCA artifacts which are generally useful > and which are not specific to a > 2492 particular composite or a particular component. These shared > artifacts include intents, policy > 2493 sets, bindings, binding type definitions and implementation type > definitions. > 2494 All of these artifacts within an SCA Domain are defined in a > global, SCA Domain-wide file named > 2495 definitions.xml. The definitions.xml file contains a definitions > element that conforms to the > 2496 following pseudo-schema snippet: > 2497 <?xml version="1.0" encoding="ASCII"?> > 2498 <!-- Composite schema snippet --> > 2499 <definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" > 2500 targetNamespace="xs:anyURI"> > 2501 > 2502 <sca:intent/>* > 2503 > 2504 <sca:policySet/>* > 2505 > 2506 <sca:binding/>* > 2507 > 2508 <sca:bindingType/>* > 2509 > 2510 <sca:implementationType/>* > 2511 > 2512 </definitions> > > What interest me are: > > 1. on a high level, how many places Tuscany can honor definitions.xml? > > e.g. definitions.xml is in a system class library, and/or > definitions.xml in a contribution that can be contributed to a SCA > domain by using > aEmbeddedSCADomain.getContributionService().contribute... > > I remember seeing a thread of discussion, will appreciate a link to > the answers . > A contribution can include definitions.xml file(s) at any location. Tuscany and Tuscany extensions also can provide definitions.xml files. The manner of doing this has changed several times. The current way I believe is to implement the SCADefinitionsProvider extension point. > > 2. I assume regardless how definitions.xml is introduced into a > domain, there is an aggregated view on the intents, policySets, > bindings, bindingTypes, implementationTypes supported for the system. > > Is there some API/SPI somewhere to do a query and return the list? > SCADefinitions/SCADefinitionsImpl holds the lists but it is somewhat internal to the builder at the moment. > > 3. What contents are supported for definitions.xml in Tuscany > > I understand we can define intents and policySets in definitions.xml > today. How about binding , bindingType and implementationType. bindingType and implementationType work too. > I > understand Tuscany has extension points to register binding types and > implementation types. I wonder if/how we plan to support using > definitions.xml for implementation type and binding type and how the > two will work together. E.g. if definitions.xml can introduce additional > binding type or > implementation type through contribution, it will mean the > implementation of the new bindingType or implementationType can be in > a contribution related classLibrary we can add and remove during the > lifecycle of a domain... > I would not expect a contribution to define a bindingType or an implementationType. A Tuscany extension that provides the binding or implementation functionality would do that. Note however that it is completely optional. A bindingType or implementationType is required only if the binding or implementation provides "built-in" intents. If the binding or implementation doesn't provide any built-in intents, it does not need to define a bindingType or implementationType as far as I understand. > > Looking forward to some answers. > > Yang. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
