2008/11/21 Shu Chao Wan <[EMAIL PROTECTED]>

>
> Hey,
>
> I'm writing test case about conformance item ASM60002, and haven't got the
> result I expected.
>
>
> *Conformance Item ASM60002*
> *
> ----------------------------------------------------------------------------------------
> *
> local : boolean (0..1) �C whether all the components within the composite
> all run in the same operating system process. @local="true" for a composite
> means that all the components within the composite MUST run in the same
> operating system process. *[ASM60002]* local="false", which is the
> default, means that different components within the composite can run in
> different operating system processes and they can even run on different
> nodes on a network.
> *
> ----------------------------------------------------------------------------------------
> *
>
> According to the above description, I created the following composite file
> *localcomponent.composite* with two conponents, one is a local component (
> BComponent), the other is remote one(HelloWorldServiceComponent). And the
> "local" attribute is set as "true".
>
> *localcomponennt.composite*
> *
> ----------------------------------------------------------------------------------------
> *
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>         targetNamespace="http://assembly-tests";
>         name="Assembly-LocalComponent--Composite" *local="true"*>
>     <component name="HelloWorldServiceComponent">
>                 <service name="HelloWorldService">
>                         <interface.java
> interface="helloworld.HelloWorldService" />
>                         <binding.ws uri="
> http://localhost:8085/HelloWorldService"/>
>                 </service>
>         </component>
>     <component name="BComponent">
>         <implementation.java
> class="org.apache.tuscany.sca.vtest.assembly.composite.impl.BServiceImpl"/>
>         <property name="someProperty">some b component value</property>
>     </component>
> </composite>
> *
> ----------------------------------------------------------------------------------------
> *
>
> Then I create the testcase to invoke the services of the two components
> individually, and supposed that ServiceRuntimeException exception will be
> thrown. But actually I haven't got any exception, even without any warning
> message in the console. Is there any problem with my testcase? Thanks for
> any help in advance.
>
> *Testcase*
> *
> ----------------------------------------------------------------------------------------
> *
> /**
> * Lines 1036-1037:
> * <p>
> * local="true" means that all the components must run in the same process.
> * <p>
> * ASM60002:
> * <p>
> * [EMAIL PROTECTED]"true" for a composite means that all the components 
> within the
> composite MUST run in the same operating system process.
> */
> @Test(expected = ServiceRuntimeException.*class*)
> *public* *void* ASM60002() *throws* Exception {
>         initDomain("localcomponent.composite");
>         HelloWorldService service = ServiceFinder.*getService*
> (HelloWorldService.*class*, "HelloWorldServiceComponent");
>         Assert.*assertEquals*("Hello, tester", service.getGreetings(
> "tester"));
>         BService bService = ServiceFinder.*getService*(BService.*class*,
> "BComponent");
>         Assert.*assertEquals*("SomeStateFromB", bService.getState());
> }
> *
> ----------------------------------------------------------------------------------------
> *
>
>
> Best Regards
> Susan Wan (万淑超)
> -------------------------
> WebSphere Application Server System Verification Test, IBM China SoftWare
> Development Lab
> Tel: 86-10-82453655
> E-mail: [EMAIL PROTECTED]
> Address: 3/F, Diamond Building, ZhongGuanCun Software Park , Dongbeiwang
> West Road No.8, ShangDi, Haidian District, Beijing 100193, PRC


Hi Susan

The Tuscany runtime will run all the components it finds inside a composite
file. Hence local=true is the default. In fact setting local=false will have
no effect in Tuscany given the way it's implemented at the moment. In
Tuscany the way that you run two components on separate nodes is by putting
them in separate composites. In this respect we don't match what the specs
says. So I suggest you put an ignore in for this test at the moment.

Regards

Simon

Reply via email to