Thanks Jim, I think the confusion here was caused because there are two
calculator samples in the trunk, java/samples/sca/calculator and
java/sca/kernel/core-samples/standalone/calculator. I'll take a look at the
new one.

As for "is this a sample app", no, this is NOT something i want to
contribute to Tuscany, it's more for personal pleasure debugging and
learning the code. As for using iTest, there is already (or at least there
was) an iTest handling this scenario, but the iTest had a much more complex
scenario, that's why I wanted to get things more isolated.

Anyway, thanks, and I'll take a look at the new sample and update my simple
app.

On 2/22/07, Jim Marino <[EMAIL PROTECTED]> wrote:

<implementation.soapbox>
I think there may be a couple of issues here. Samples should
demonstrate something that works properly and this type of check
should be done as a unit test (although the iTest plugin is
cool :-) ). For a examples of how to use the standalone runtime, I
would start with Calculator and Loan Application that are under core-
samples - they should be pretty easy to modify. For testing things
such as duplicate exceptions, something to look at is
org.apache.tuscany.core.implementation.composite.DuplicateRegistrationTe
stCase. That checks for duplicates registered with a Composite; we
would probably also want test coverage in the contribution subsystem
as well. I really think this needs to be a unit test for a number of
reasons:

1. It needs to be verified during a build run
2. There is no way to easily verify this behavior in an app
3. We need to pinpoint exactly where it is failing
4. It's a lot easier to write, understand, and maintain a TestCase
than a pile of component implementations and SCDL files :-)
</implementation.soapbox>

On a practical note, the sample seems to be using obsolete (i.e.
removed) SCA APIs so it won't compile against trunk. Best to start
with one of the existing TestCases or samples.

Jim

On Feb 22, 2007, at 3:14 PM, Jeremy Boynes wrote:

> I'm confused on "working" - doesn't this have duplicate names and
> hence should not run?
>
> I also struggle to see how this is a sample - what is this showing
> a user?
>
> Isn't this more of an itest and if so how about using the itest
> plugin?
> --
> Jeremy
>
> On Feb 22, 2007, at 3:09 PM, Luciano Resende wrote:
>
>> I use to have an working application, that had the following scdl
>> structure
>> :
>>
>> default.scdl
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>> name="HelloComposite">
>>    <include name="Hello1" scdlLocation="hello1.scdl"/>
>>    <include name="Hello2" scdlLocation="hello2.scdl"/>
>> </composite>
>>
>> hello1.scdl
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"; name="Hello1">
>>    <service name="HelloService">
>>        <interface.java interface="
>> org.apache.tuscany.services.hello.HelloService"/>
>>        <reference>HelloComponent</reference>
>>    </service>
>>
>>    <component name="HelloComponent">
>>        <implementation.java class="
>> org.apache.tuscany.services.hello.HelloServiceImpl"/>
>>        <property name="message">Hello1</property>
>>    </component>
>> </composite>
>>
>> hello2.scdl
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"; name="Hello2">
>>    <service name="HelloService">
>>        <interface.java interface="
>> org.apache.tuscany.services.hello.HelloService"/>
>>        <reference>HelloComponent</reference>
>>    </service>
>>
>>    <component name="HelloComponent">
>>        <implementation.java class="
>> org.apache.tuscany.services.hello.HelloServiceImpl"/>
>>        <property name="message">Hello2</property>
>>    </component>
>> </composite>
>>
>>
>> Now, looks like I need to add a <launched> to my scdl to be able
>> to run it
>> as a standalone app, I was trying the following with not much
>> success.
>>
>>    <component name="HelloCompositeClient">
>>    <launched class="
>> org.apache.tuscany.services.hello.client.HelloServiceClient"/>
>>        <reference name="HelloService">HelloComponent</reference>
>>    </component>
>>
>>
>> Could someone help please ?
>> I have the sample app in my sandbox :
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>> lresende/sca/samples/hello.duplicated.components/
>>
>>
>> --
>> Luciano Resende
>> http://people.apache.org/~lresende
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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




--
Luciano Resende
http://people.apache.org/~lresende

Reply via email to