Yes the assembly model artifacts only refer to the Intents and PolicySets. I have them that way because ... - I did not see any reason for them to have their own instances. There wasn't any state that the assembly model would add to the intents and policysets. - This is the impression that I got from the assembly model and policy fwk specs.
However your view of looking at 'intent types' and 'intent instances' in interesting and tempting too ;-). Am trying to figure out how an instance would differ from the type other than being a clone of it. Maybe in the current context, operations are going to add some state to the intent instances. Do you see any other thing as well ? Thanks - Venkat On Dec 11, 2007 11:43 PM, Raymond Feng <[EMAIL PROTECTED]> wrote: > Why do these intents with the same name have to be the same instance? We > could have four instances and have each of them point to the corresponding > operation. > > If I understand correctly, you're trying to reference (instead of > instantiate) the intents by QName to the ones defined in definitions.xml. > Conceptually, I treat these two as different things: > > Intent type ...................... <intent name="tuscany:logging> from > definitions.xml (Defining an intent type) > Intent configuration .......... requires="tuscany:logging" from the > composite file (An intent whose type is tuscany:logging) > > Thanks, > Raymond > > ----- Original Message ----- > From: "Venkata Krishnan" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, December 11, 2007 8:54 AM > Subject: Re: svn commit: r602804 - in /incubator/tuscany/java/sca/modules: > assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ > assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ > assembly/src/main/java/org/apache/tuscany/sca/assem > > > > Hi, > > > > I went ahead and tried to implement this thinking thro some scenarios > > along. Here is one that seemed to have a problem with this approach. > > Take > > the composite... > > > > <composite... > > <component name="CalculatorServiceComponent"> > > <implementation.java class="calculator.CalculatorServiceImpl"> > > <operation name="add" requires="tuscany:logging"/> > > <operation name="subtract" requires="tuscany:logging"/> > > </implementation.java> > > </component > > > > <component name="AnotherCalculatorServiceComponent"> > > <implementation.java class="calculator.CalculatorServiceImpl"> > > <operation name="multiply" requires="tuscany:logging"/> > > <operation name="divide" requires="tuscany:logging"/> > > </implementation.java> > > </component > > </composite> > > > > While processing 'CalculatorServiceComponent' the add and subtract > > operations will be added to the logging Intent. While processing the > > 'AnotherCalculatorServiceComponent' the multiply and divide oeprations > > will > > be added to the logging intent. Since there is one instance of the > > logging > > intent that is shared by these two components, it ends up that the > logging > > intent gets to apply for all four methods in both components, which is > not > > what is intended. > > > > Thoughts ? > > > > Thanks > > > > - Venkat > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
