summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/itest/osgi-implementation/src
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-equinox/itest/osgi-implementation/src')
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackCallback.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackClient.java31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/JavaCallbackClientImpl.java141
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/OSGiCallbackClientImpl.java181
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/CallbackService.java39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/JavaCallbackServiceImpl.java68
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/OSGiCallbackServiceImpl.java95
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalCallback.java50
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClient.java51
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientActivator.java105
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientServiceFactory.java135
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatefulImpl.java254
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatelessImpl.java253
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClient.java38
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientActivator.java66
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientImpl.java45
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalService.java65
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceActivator.java76
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceFactory.java52
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatefulImpl.java121
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatelessImpl.java127
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/Greetings.java36
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/HelloWorld.java29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaGreetingsComponent.java73
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaHelloWorldComponent.java41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiGreetingsImpl.java112
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiHelloWorldImpl.java81
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldService.java30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldServiceComponent.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClient.java30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClientComponent.java50
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorld.java29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorldService.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteComponentImpl.java86
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteFactoryImpl.java65
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteImpl.java119
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/StockQuote.java31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/OSGiBundleImpl.java163
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/Customer.java39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java88
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java106
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerFactoryImpl.java65
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerImpl.java92
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryComponentImpl.java100
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryImpl.java82
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerComponentImpl.java30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerImpl.java35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiVersionedCustomerImpl.java98
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java67
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java64
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerImpl.java58
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerServiceImpl.java45
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryComponentImpl.java78
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryImpl.java64
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerImpl.java75
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerServiceImpl.java47
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/Retailer.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/RetailerQuery.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java58
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java62
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperFactoryImpl.java78
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperImpl.java57
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperServiceImpl.java43
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperComponentImpl.java30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperServiceImpl.java35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperImpl.java78
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperServiceImpl.java46
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/Shipper.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java48
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseWithQueryComponentImpl.java52
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java57
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java68
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseServiceImpl.java62
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/Warehouse.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/WarehouseQuery.java28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackClient.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackService.componentType27
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test1.composite39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test2.composite41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test3.composite38
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalClient.componentType37
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalReferenceClient.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalService.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/conversation-test.composite162
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Retailer.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Retailer.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/factory-ds-test.composite130
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/factory-test.composite116
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/Greetings.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/HelloWorld.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Customer.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Retailer.componentType35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Warehouse.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Customer.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Retailer.componentType35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Warehouse.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/interfaces-ds-test.composite57
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/interfaces-test.composite57
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackClient.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackService.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalClient.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalReferenceClient.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalService.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Customer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Retailer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.xml41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer1.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer2.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper1.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper2.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Customer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Retailer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.xml43
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.xml39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/passbyref/Greetings.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ManagedStockQuoteFactory.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuote.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuoteFactory.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.mf12
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.xml27
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.mf12
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.xml27
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.mf14
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.mf13
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.xml25
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Customer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Retailer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Warehouse.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.xml41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer1.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer2.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper1.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper2.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse1.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse2.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer1.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer2.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer1.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer2.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper1.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper2.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse1.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse2.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer1.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer2.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV1.xml41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV2.xml41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V1.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V2.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V1.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V2.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V1.xml35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V2.xml35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V1.xml35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V2.xml35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V1.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V2.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V1.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V2.xml32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Customer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Retailer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Warehouse.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.xml41
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer1.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer2.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper.mf10
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper1.xml35
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper2.xml34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse.mf11
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse1.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse2.xml33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/ws/HelloWorld.mf12
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/Greetings.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/passbyref-test.composite39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuote.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuoteFactory.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuote.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuoteFactory.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties-ds-test.composite39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties2-ds-test.composite54
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties-test.composite39
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties2-test.composite50
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldClient.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldService.componentType25
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/META-INF/sca-contribution.xml26
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworld.wsdl88
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworldsdo.composite47
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Retailer.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Shipper.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Retailer.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Shipper.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/services-ds-test.composite90
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/services-test.composite89
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/stockquote/StockQuote.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer1.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer2.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer1.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer2.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper1.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper2.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse1.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse2.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer1.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer2.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer1.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer2.componentType33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper1.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper2.componentType30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse1.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse2.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/version-ds-test.composite184
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/version-test.composite170
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Retailer.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Customer.componentType34
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Retailer.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Shipper.componentType29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Warehouse.componentType28
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test1.composite136
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test2.composite151
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test1.composite127
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test2.composite151
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/HelloWorld.componentType31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/helloworld.wsdl80
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/ws-helloworld.composite51
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java30
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java29
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java50
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java325
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java130
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java95
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java55
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java63
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java71
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java72
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java31
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java69
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java58
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java33
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java32
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java67
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java71
-rw-r--r--branches/sca-equinox/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties45
294 files changed, 13110 insertions, 0 deletions
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackCallback.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackCallback.java
new file mode 100644
index 0000000000..cfecd989fe
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackCallback.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.client;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+/*
+ * Callback interface
+ */
+public interface CallbackCallback {
+
+ public void callbackMessage(String aString);
+
+ public void callbackIncrement(String aString);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackClient.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackClient.java
new file mode 100644
index 0000000000..43bc26f2f5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/CallbackClient.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.client;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+/**
+ * Callback test client interface
+ */
+public interface CallbackClient {
+
+ public void run();
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/JavaCallbackClientImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/JavaCallbackClientImpl.java
new file mode 100644
index 0000000000..f78878ef47
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/JavaCallbackClientImpl.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.client;
+
+import junit.framework.Assert;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import callback.service.CallbackService;
+
+@Service(CallbackClient.class)
+/**
+ * Callback test client implementation
+ */
+public class JavaCallbackClientImpl implements CallbackClient, CallbackCallback {
+
+ @Reference
+ protected CallbackService callbackService;
+
+ private static String returnMessage = null;
+ private static int callbackCount = 0;
+ private static Object monitor = new Object();
+
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ // Test1 is the basic callback where the target calls back prior to
+ // returning to the client.
+ test1a();
+
+ // Test2 is where the target does not call back to the client.
+ test1b();
+
+ // Test3 is where the target calls back multiple times to the client.
+ test1c();
+
+ return;
+ }
+
+ private void test1a() {
+ callbackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we cant get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallbackITest - test1a", "Who's There", this.getReturnMessage());
+
+ }
+
+ private void test1b() {
+ callbackService.noCallback("No Reply Desired");
+ Assert.assertEquals("CallbackITest - test1b", 1, 1);
+
+ return;
+ }
+
+ private void test1c() {
+ callbackService.multiCallback("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallbackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallbackITest - test1c", 3, this.getCallbackCount());
+ return;
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallbackCount() {
+ return callbackCount;
+ }
+
+ public void incrementCallbackCount() {
+ callbackCount++;
+ }
+
+ public void callbackMessage(String aString) {
+ System.out.println("Entering callback callbackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callbackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallbackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/OSGiCallbackClientImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/OSGiCallbackClientImpl.java
new file mode 100644
index 0000000000..1c65ca573b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/client/OSGiCallbackClientImpl.java
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.client;
+
+import java.util.Hashtable;
+
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import callback.service.CallbackService;
+
+/**
+ * OSGi Callback test client implementation
+ */
+public class OSGiCallbackClientImpl implements
+ CallbackClient, CallbackCallback, BundleActivator {
+
+ protected CallbackService callbackService;
+
+ private static String returnMessage = null;
+ private static int callbackCount = 0;
+ private static Object monitor = new Object();
+
+ private BundleContext bundleContext;
+
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ // Test1 is the basic callback where the target calls back prior to
+ // returning to the client.
+ test1a();
+
+ // Test2 is where the target does not call back to the client.
+ test1b();
+
+ // Test3 is where the target calls back multiple times to the client.
+ test1c();
+
+ return;
+ }
+
+
+
+ private void test1a() {
+ callbackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if (!"Who's There".equals(this.getReturnMessage())) {
+ throw new RuntimeException("CallbackITest - test1a");
+ }
+
+ }
+
+ private void test1b() {
+ callbackService.noCallback("No Reply Desired");
+
+ return;
+ }
+
+ private void test1c() {
+ callbackService.multiCallback("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallbackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if (this.getCallbackCount() != 3)
+ throw new RuntimeException("CallbackITest - test1c");
+ return;
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallbackCount() {
+ return callbackCount;
+ }
+
+ public void incrementCallbackCount() {
+ callbackCount++;
+ }
+
+ public void callbackMessage(String aString) {
+ System.out.println("Entering callback callbackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callbackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallbackCount();
+ monitor.notify();
+ }
+ }
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ System.out.println("Started OSGiCallbackClientImpl bundle ");
+
+ this.bundleContext = bc;
+
+ Hashtable<String, Object> serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.service.name", "CallbackClient/CallbackClient");
+
+ serviceProps.put("component.name", "CallbackClient");
+ bundleContext.registerService("callback.client.CallbackClient", this, serviceProps);
+
+ Hashtable<String, Object> callbackProps = new Hashtable<String, Object>();
+ callbackProps.put("component.service.name", "CallbackClient/callbackService");
+ callbackProps.put("component.name", "CallbackClient");
+
+ bundleContext.registerService("callback.client.CallbackCallback", this, callbackProps);
+
+ ServiceReference ref= bundleContext.getServiceReference("callback.service.CallbackService");
+
+ if (ref != null)
+ callbackService = (callback.service.CallbackService)bundleContext.getService(ref);
+
+
+
+
+ }
+
+ public void stop(BundleContext bc) {
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/CallbackService.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/CallbackService.java
new file mode 100644
index 0000000000..5383e1e268
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/CallbackService.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.service;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Remotable;
+
+import callback.client.CallbackCallback;
+
+@Remotable
+@Callback(CallbackCallback.class)
+/*
+ * Callback service interface
+ */
+public interface CallbackService {
+
+ public void knockKnock(String aString);
+
+ public void noCallback(String aString);
+
+ public void multiCallback(String aString);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/JavaCallbackServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/JavaCallbackServiceImpl.java
new file mode 100644
index 0000000000..b2af2fa68d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/JavaCallbackServiceImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.service;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Service;
+
+import callback.client.CallbackCallback;
+
+@Service(CallbackService.class)
+/*
+ * Callback service implementation
+ */
+public class JavaCallbackServiceImpl implements CallbackService {
+
+ private CallbackCallback callback;
+
+ @Callback
+ protected void setCallback(CallbackCallback callback) {
+ this.callback = callback;
+ }
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ callback.callbackMessage("Who's There");
+ System.out.println("CallbackServiceImpl response sent");
+ return;
+
+ }
+
+ public void multiCallback(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ callback.callbackIncrement("Who's There 1");
+ System.out.println("CallbackServiceImpl response sent");
+ callback.callbackIncrement("Who's There 2");
+ System.out.println("CallbackServiceImpl response sent");
+ callback.callbackIncrement("Who's There 3");
+ System.out.println("CallbackServiceImpl response sent");
+ return;
+
+ }
+
+ public void noCallback(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ // System.out.println("CallbackServiceImpl No response desired");
+ return;
+
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/OSGiCallbackServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/OSGiCallbackServiceImpl.java
new file mode 100644
index 0000000000..c05a3f52a8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/callback/service/OSGiCallbackServiceImpl.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package callback.service;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osoa.sca.annotations.Callback;
+
+import callback.client.CallbackCallback;
+
+/*
+ * OSGi Callback service implementation
+ */
+public class OSGiCallbackServiceImpl implements CallbackService, BundleActivator {
+
+ @Callback
+ protected CallbackCallback callback;
+
+
+ private BundleContext bundleContext;
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ callback.callbackMessage("Who's There");
+ System.out.println("CallbackServiceImpl response sent");
+ return;
+
+ }
+
+ public void multiCallback(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ callback.callbackIncrement("Who's There 1");
+ System.out.println("CallbackServiceImpl response sent");
+ callback.callbackIncrement("Who's There 2");
+ System.out.println("CallbackServiceImpl response sent");
+ callback.callbackIncrement("Who's There 3");
+ System.out.println("CallbackServiceImpl response sent");
+ return;
+
+ }
+
+ public void noCallback(String aString) {
+
+ System.out.println("CallbackServiceImpl message received: " + aString);
+ // System.out.println("CallbackServiceImpl No response desired");
+ return;
+
+ }
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ System.out.println("Started OSGiCallbackServiceImpl bundle ");
+
+ this.bundleContext = bc;
+
+ Hashtable<String, Object> serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.service.name", "CallbackService/CallbackService");
+ bundleContext.registerService("callback.service.CallbackService", this, serviceProps);
+
+
+ ServiceReference ref= bundleContext.getServiceReference("callback.client.CallbackCallback");
+
+ if (ref != null)
+ callback = (CallbackCallback)bundleContext.getService(ref);
+
+ }
+
+ public void stop(BundleContext bc) {
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalCallback.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalCallback.java
new file mode 100644
index 0000000000..c92f078e49
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalCallback.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.client;
+
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.EndsConversation;
+import org.osoa.sca.annotations.Remotable;
+
+
+/**
+ * The callback interface used when testing conversational callbacks
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+@Conversational
+public interface ConversationalCallback {
+
+ public void init();
+
+ public void destroy();
+
+ public void initializeCount(int count);
+
+ public void incrementCount();
+
+ public int retrieveCount();
+
+ public void businessException() throws Exception;
+
+ @EndsConversation
+ public String endConversation();
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClient.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClient.java
new file mode 100644
index 0000000000..af269052c7
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClient.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.client;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The client for the conversational itest. Is implemented by clients
+ * offering both stateless and stateful callbacks
+ *
+ * @version $Rev$ $Date$
+ */
+
+@Remotable
+public interface ConversationalClient {
+
+ public int runConversationFromInjectedReference();
+ public int runConversationFromServiceReference();
+ public int runConversationWithUserDefinedConversationId();
+ public String runConversationCheckUserDefinedConversationId();
+ public int runConversationCheckingScope();
+ public int runConversationWithCallback();
+ public int runConversationHavingPassedReference();
+ public String runConversationBusinessException();
+ public String runConversationBusinessExceptionCallback();
+ public int runConversationCallingEndedConversation();
+ public int runConversationCallingEndedConversationCallback();
+ public int runConversationAgeTimeout();
+ public int runConversationIdleTimeout();
+ public int runConversationPrincipleError();
+
+ public String getCalls();
+ public String getServiceCalls();
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientActivator.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientActivator.java
new file mode 100644
index 0000000000..5eb16be597
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientActivator.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.client;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+
+import conversation.client.ConversationalCallback;
+import conversation.client.ConversationalClient;
+import conversation.client.ConversationalClientStatefulImpl;
+import conversation.client.ConversationalClientStatelessImpl;
+
+/*
+ * OSGi bundle activator for conversation tests
+ */
+public class ConversationalClientActivator implements BundleActivator, ServiceListener {
+
+
+ private BundleContext bundleContext;
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ System.out.println("Started OSGiConversationClientActivator ");
+
+ this.bundleContext = bc;
+
+ bc.addServiceListener(this);
+
+ Hashtable<String, Object> serviceProps;
+
+ serviceProps = new Hashtable<String, Object>();
+
+ serviceProps.put("component.name", "ConversationalStatelessClientStatelessService");
+ Object statelessClientFactory1 =
+ new ConversationalClientServiceFactory(ConversationalClientStatelessImpl.class, bundleContext, 1);
+ bundleContext.registerService(
+ new String[] {ConversationalClient.class.getName(), ConversationalCallback.class.getName()},
+ statelessClientFactory1,
+ serviceProps);
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalStatelessClientStatefulService");
+ Object statelessClientFactory2 =
+ new ConversationalClientServiceFactory(ConversationalClientStatelessImpl.class, bundleContext, 2);
+ bundleContext.registerService(
+ new String[] {ConversationalClient.class.getName(), ConversationalCallback.class.getName()},
+ statelessClientFactory2,
+ serviceProps);
+
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalStatefulClientStatelessService");
+ Object statefulClientFactory1 =
+ new ConversationalClientServiceFactory(ConversationalClientStatefulImpl.class, bundleContext, 3);
+ bundleContext.registerService(
+ new String[] {ConversationalClient.class.getName(), ConversationalCallback.class.getName()},
+ statefulClientFactory1,
+ serviceProps);
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalStatefulClientStatefulService");
+ Object statefulClientFactory2 =
+ new ConversationalClientServiceFactory(ConversationalClientStatefulImpl.class, bundleContext, 4);
+ bundleContext.registerService(
+ new String[] {ConversationalClient.class.getName(), ConversationalCallback.class.getName()},
+ statefulClientFactory2,
+ serviceProps);
+
+
+ }
+
+
+
+ public void stop(BundleContext bc) {
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+
+ if (event.getType() == ServiceEvent.REGISTERED) {
+
+ }
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientServiceFactory.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientServiceFactory.java
new file mode 100644
index 0000000000..8479624546
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientServiceFactory.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conversation.client;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+
+import conversation.client.ConversationalClientStatefulImpl;
+import conversation.client.ConversationalClientStatelessImpl;
+import conversation.referenceclient.ConversationalReferenceClient;
+import conversation.service.ConversationalService;
+
+public class ConversationalClientServiceFactory implements ServiceFactory {
+
+ private Class<?> clazz;
+ private BundleContext bundleContext;
+ private int serviceNum;
+
+ public ConversationalClientServiceFactory(Class<?> clazz, BundleContext bundleContext, int serviceNum) {
+ this.clazz = clazz;
+ this.bundleContext = bundleContext;
+ this.serviceNum = serviceNum;
+ }
+
+ public Object getService(Bundle bundle, ServiceRegistration reg) {
+
+
+ try {
+ Object instance = clazz.newInstance();
+
+ ConversationalClientStatelessImpl statelessClient = null;
+ ConversationalClientStatefulImpl statefulClient = null;
+
+ if (serviceNum == 1 || serviceNum == 2) {
+
+ ServiceReference ref = bundleContext.getServiceReference(ConversationalReferenceClient.class.getName());
+ statelessClient = (ConversationalClientStatelessImpl)instance;
+ statelessClient.conversationalReferenceClient =
+ (ConversationalReferenceClient)bundleContext.getService(ref);
+ }
+ if (serviceNum == 1) {
+
+ ServiceReference ref = getServiceReference(ConversationalService.class.getName(),
+ "(component.name=ConversationalServiceStateless)");
+ statelessClient.conversationalService = (ConversationalService)bundleContext.getService(ref);
+
+ }
+
+ if (serviceNum == 2) {
+
+ ServiceReference ref = getServiceReference(ConversationalService.class.getName(),
+ "(component.name=ConversationalServiceStateful)");
+ statelessClient.conversationalService = (ConversationalService)bundleContext.getService(ref);
+
+ }
+
+
+ if (serviceNum == 3 || serviceNum == 4) {
+
+ ServiceReference ref = bundleContext.getServiceReference(ConversationalReferenceClient.class.getName());
+ statefulClient = (ConversationalClientStatefulImpl)instance;
+ statefulClient.conversationalReferenceClient =
+ (ConversationalReferenceClient)bundleContext.getService(ref);
+ }
+ if (serviceNum == 3) {
+
+ ServiceReference ref = getServiceReference(ConversationalService.class.getName(),
+ "(component.name=ConversationalServiceStateless)");
+ statefulClient.conversationalService = (ConversationalService)bundleContext.getService(ref);
+
+ }
+
+ if (serviceNum == 4) {
+
+ ServiceReference ref = getServiceReference(ConversationalService.class.getName(),
+ "(component.name=ConversationalServiceStateful)");
+ statefulClient.conversationalService = (ConversationalService)bundleContext.getService(ref);
+
+ }
+
+ return instance;
+ } catch (Exception e) {
+
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public void ungetService(Bundle bundle, ServiceRegistration reg, Object obj) {
+
+ }
+
+ private ServiceReference getServiceReference(String name, String filter) throws Exception {
+
+ ServiceReference refs[] = bundleContext.getServiceReferences(name, filter);
+ ServiceReference ref = refs[0];
+ int ranking = 0;
+ if (ref.getProperty(Constants.SERVICE_RANKING) instanceof Integer)
+ ranking = (Integer)ref.getProperty(Constants.SERVICE_RANKING);
+ for (int i = 1; i < refs.length; i++) {
+ int thisranking = 0;
+ if (refs[i].getProperty(Constants.SERVICE_RANKING) instanceof Integer) {
+ thisranking = (Integer)refs[i].getProperty(Constants.SERVICE_RANKING);
+ }
+ if (thisranking > ranking) {
+ ref = refs[i];
+ ranking = thisranking;
+ }
+ }
+
+ return ref;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatefulImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatefulImpl.java
new file mode 100644
index 0000000000..3aedabc29c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatefulImpl.java
@@ -0,0 +1,254 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.client;
+
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.ServiceReference;
+import org.osoa.sca.annotations.Context;
+import org.osoa.sca.annotations.ConversationAttributes;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import conversation.referenceclient.ConversationalReferenceClient;
+import conversation.service.ConversationalService;
+
+/**
+ * The client for the conversational itest which presents a stateful
+ * callback interface
+ *
+ * @version $Rev$ $Date$
+ */
+
+@Service(interfaces={ConversationalClient.class})
+@Scope("CONVERSATION")
+@ConversationAttributes(maxAge="10 minutes",
+ maxIdleTime="5 minutes",
+ singlePrincipal=false)
+public class ConversationalClientStatefulImpl implements ConversationalClient, ConversationalCallback {
+
+ @Context
+ protected ComponentContext componentContext;
+
+ protected ConversationalService conversationalService;
+
+ protected ConversationalReferenceClient conversationalReferenceClient;
+
+ private int clientCount = 0;
+ private int callbackCount = 0;
+
+
+ // a static member variable that records the number of times this service is called
+ public static StringBuffer calls = new StringBuffer();
+
+ // From ConversationalClient
+ public int runConversationFromInjectedReference(){
+ calls.append("runConversationFromInjectedReference,");
+ conversationalService.initializeCount(1);
+ conversationalService.incrementCount();
+ clientCount = conversationalService.retrieveCount();
+ conversationalService.endConversation();
+
+ return clientCount;
+ }
+ public int runConversationFromServiceReference(){
+ calls.append("runConversationFromServiceReference,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ // serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+ public int runConversationWithUserDefinedConversationId(){
+ calls.append("runConversationWithUserDefinedConversationId,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ serviceReference.setConversationID("MyConversation1");
+
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ // serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+ public String runConversationCheckUserDefinedConversationId(){
+ calls.append("runConversationCheckUserDefinedConversationId,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ serviceReference.setConversationID("MyConversation2");
+
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ return callableReference.endConversation();
+
+ }
+ public int runConversationCheckingScope(){
+ calls.append("runConversationCheckingScope,");
+ // run a conversation
+ return runConversationFromInjectedReference();
+
+ // test will then use a static method to find out how many times
+ // init/destroy were called
+ }
+ public int runConversationWithCallback(){
+ calls.append("runConversationWithCallback,");
+ callbackCount = 2;
+ conversationalService.initializeCountCallback(1);
+ conversationalService.incrementCountCallback();
+ clientCount = conversationalService.retrieveCountCallback();
+ conversationalService.endConversationCallback();
+
+ return clientCount;
+ }
+ public int runConversationHavingPassedReference(){
+ calls.append("runConversationHavingPassedReference,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ conversationalReferenceClient.incrementCount(serviceReference);
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+ public String runConversationBusinessException(){
+ calls.append("runConversationbusinessException,");
+ try {
+ conversationalService.initializeCount(1);
+ conversationalService.businessException();
+ clientCount = conversationalService.retrieveCount();
+ conversationalService.endConversation();
+ } catch(Exception ex) {
+ return ex.getMessage();
+ }
+
+ return "No Exception Returned";
+ }
+
+ public String runConversationBusinessExceptionCallback(){
+ calls.append("runConversationbusinessExceptionCallback,");
+ try {
+ conversationalService.initializeCountCallback(1);
+ conversationalService.businessExceptionCallback();
+ clientCount = conversationalService.retrieveCountCallback();
+ conversationalService.endConversationCallback();
+ } catch(Exception ex) {
+ return ex.getMessage();
+ }
+
+ return "No Exception Returned";
+ }
+
+ public int runConversationCallingEndedConversation(){
+ calls.append("runConversationCallingEndedConversation,");
+ conversationalService.initializeCount(1);
+ conversationalService.endConversation();
+ return conversationalService.retrieveCount();
+ }
+
+ public int runConversationCallingEndedConversationCallback(){
+ calls.append("runConversationCallingEndedConversationCallback,");
+ conversationalService.initializeCountCallback(1);
+ conversationalService.endConversationCallback();
+ return conversationalService.retrieveCountCallback();
+ }
+
+ public int runConversationAgeTimeout(){
+ calls.append("runConversationAgeTimeout,");
+ // done in other testing
+ return clientCount;
+ }
+ public int runConversationIdleTimeout(){
+ calls.append("runConversationIdleTimeout,");
+ // done in other testing
+ return clientCount;
+ }
+ public int runConversationPrincipleError(){
+ calls.append("runConversationPrincipleError,");
+ // TODO - when policy framework is done
+ return clientCount;
+ }
+
+
+ // From ConversationalCallback
+ @Init
+ public void init(){
+ calls.append("init,");
+ }
+
+ @Destroy
+ public void destroy(){
+ calls.append("destroy,");
+ }
+
+ public void initializeCount(int count){
+ calls.append("initializeCount,");
+ callbackCount += count;
+ }
+
+ public void incrementCount(){
+ calls.append("incrementCount,");
+ callbackCount++;
+ }
+
+ public int retrieveCount(){
+ calls.append("retrieveCount,");
+ return callbackCount;
+ }
+
+ public void businessException() throws Exception {
+ throw new Exception("Business Exception");
+ }
+
+ public String endConversation(){
+ calls.append("endConversation,");
+ callbackCount = 0;
+ return null;
+ }
+
+ public String getCalls() {
+ return calls.toString();
+ }
+
+ public String getServiceCalls() {
+ return conversationalService.getCalls().toString();
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatelessImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatelessImpl.java
new file mode 100644
index 0000000000..b12e094bc1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/client/ConversationalClientStatelessImpl.java
@@ -0,0 +1,253 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.client;
+
+
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.ServiceReference;
+import org.osoa.sca.annotations.Context;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import conversation.referenceclient.ConversationalReferenceClient;
+import conversation.service.ConversationalService;
+
+/**
+ * The client for the conversational itest which presents a stateful
+ * callback interface
+ *
+ * @version $Rev$ $Date$
+ */
+
+@Service(interfaces={ConversationalClient.class})
+@Scope("STATELESS")
+public class ConversationalClientStatelessImpl implements ConversationalClient, ConversationalCallback {
+
+ @Context
+ protected ComponentContext componentContext;
+
+ @Reference
+ protected ConversationalService conversationalService;
+
+ @Reference
+ protected ConversationalReferenceClient conversationalReferenceClient;
+
+ private int clientCount = 0;
+ private int callbackCount = 0;
+
+ // a static member variable that records the number of times this service is called
+ public static StringBuffer calls = new StringBuffer();
+
+ // From ConversationalClient
+ public int runConversationFromInjectedReference(){
+ calls.append("runConversationFromInjectedReference,");
+ conversationalService.initializeCount(1);
+ conversationalService.incrementCount();
+ clientCount = conversationalService.retrieveCount();
+ conversationalService.endConversation();
+
+ return clientCount;
+ }
+ public int runConversationFromServiceReference(){
+ calls.append("runConversationFromServiceReference,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ // serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+ public int runConversationWithUserDefinedConversationId(){
+ calls.append("runConversationWithUserDefinedConversationId,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ // serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+ public String runConversationCheckUserDefinedConversationId(){
+ calls.append("runConversationCheckUserDefinedConversationId,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ serviceReference.setConversationID("MyConversation2");
+
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ clientCount = callableReference.retrieveCount();
+ return callableReference.endConversation();
+
+ }
+ public int runConversationCheckingScope(){
+ calls.append("runConversationCheckingScope,");
+ // run a conversation
+ return runConversationFromInjectedReference();
+
+ // test will then use a static method to find out how many times
+ // init/destroy were called
+ }
+ public int runConversationWithCallback(){
+ calls.append("runConversationWithCallback,");
+ conversationalService.initializeCountCallback(1);
+ conversationalService.incrementCountCallback();
+ clientCount = conversationalService.retrieveCountCallback();
+ conversationalService.endConversationCallback();
+
+ return clientCount;
+ }
+
+ public int runConversationHavingPassedReference(){
+ calls.append("runConversationHavingPassedReference,");
+ ServiceReference<ConversationalService> serviceReference = componentContext.getServiceReference(ConversationalService.class,
+ "conversationalService");
+ ConversationalService callableReference = serviceReference.getService();
+
+ callableReference.initializeCount(1);
+ callableReference.incrementCount();
+ conversationalReferenceClient.incrementCount(serviceReference);
+ clientCount = callableReference.retrieveCount();
+ callableReference.endConversation();
+
+ // serviceReference.getConversation().end();
+
+ return clientCount;
+ }
+
+ public String runConversationBusinessException(){
+ calls.append("runConversationbusinessException,");
+ try {
+ conversationalService.initializeCount(1);
+ conversationalService.businessException();
+ clientCount = conversationalService.retrieveCount();
+ conversationalService.endConversation();
+ } catch(Exception ex) {
+ return ex.getMessage();
+ }
+
+ return "No Exception Returned";
+ }
+
+ public String runConversationBusinessExceptionCallback(){
+ calls.append("runConversationbusinessExceptionCallback,");
+ try {
+ conversationalService.initializeCountCallback(1);
+ conversationalService.businessExceptionCallback();
+ clientCount = conversationalService.retrieveCountCallback();
+ conversationalService.endConversationCallback();
+ } catch(Exception ex) {
+ return ex.getMessage();
+ }
+
+ return "No Exception Returned";
+ }
+
+ public int runConversationCallingEndedConversation(){
+ calls.append("runConversationCallingEndedConversation,");
+ conversationalService.initializeCount(1);
+ conversationalService.endConversation();
+ return conversationalService.retrieveCount();
+ }
+
+ public int runConversationCallingEndedConversationCallback(){
+ calls.append("runConversationCallingEndedConversationCallback,");
+ conversationalService.initializeCountCallback(1);
+ conversationalService.endConversationCallback();
+ return conversationalService.retrieveCountCallback();
+ }
+
+ public int runConversationAgeTimeout(){
+ calls.append("runConversationAgeTimeout,");
+ // done in other testing
+ return clientCount;
+ }
+ public int runConversationIdleTimeout(){
+ calls.append("runConversationIdleTimeout,");
+ // done in other testing
+ return clientCount;
+ }
+ public int runConversationPrincipleError(){
+ calls.append("runConversationPrincipleError,");
+ // TODO - when policy framework is done
+ return clientCount;
+ }
+
+
+ // From ConversationalCallback
+ @Init
+ public void init(){
+ calls.append("init,");
+
+ }
+
+ @Destroy
+ public void destroy(){
+ calls.append("destroy,");
+
+ }
+
+ public void initializeCount(int count){
+ calls.append("initializeCount,");
+ callbackCount = 0;
+ }
+
+ public void incrementCount(){
+ calls.append("incrementCount,");
+ callbackCount++;
+ }
+
+ public int retrieveCount(){
+ calls.append("retrieveCount,");
+ return callbackCount;
+ }
+
+ public void businessException() throws Exception {
+ throw new Exception("Business Exception");
+ }
+
+ public String endConversation(){
+ calls.append("endConversation,");
+ return null;
+ }
+
+ public String getCalls() {
+ return calls.toString();
+ }
+
+ public String getServiceCalls() {
+ return conversationalService.getCalls().toString();
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClient.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClient.java
new file mode 100644
index 0000000000..59e128b993
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClient.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.referenceclient;
+
+import org.osoa.sca.CallableReference;
+import org.osoa.sca.annotations.Remotable;
+
+import conversation.service.ConversationalService;
+
+/**
+ * The client that calls into an existing conversation by accepting
+ * a reference to that conversation
+ *
+ * @version $Rev$ $Date$
+ */
+
+@Remotable
+public interface ConversationalReferenceClient {
+
+ public void incrementCount(CallableReference<ConversationalService> conversationalService);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientActivator.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientActivator.java
new file mode 100644
index 0000000000..ff6f16cba3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientActivator.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.referenceclient;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+
+/*
+ * OSGi bundle activator for conversation tests
+ */
+public class ConversationalReferenceClientActivator implements BundleActivator, ServiceListener {
+
+
+ private BundleContext bundleContext;
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ System.out.println("Started OSGiConversationReferenceClientActivator ");
+
+ this.bundleContext = bc;
+
+ bc.addServiceListener(this);
+
+ Hashtable<String, Object> serviceProps;
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalReferenceClient");
+ ConversationalReferenceClientImpl refClient = new ConversationalReferenceClientImpl();
+ bundleContext.registerService(ConversationalReferenceClient.class.getName(), refClient, serviceProps);
+
+ }
+
+
+
+ public void stop(BundleContext bc) {
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+
+ if (event.getType() == ServiceEvent.REGISTERED) {
+
+ }
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientImpl.java
new file mode 100644
index 0000000000..4524c6bd3d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/referenceclient/ConversationalReferenceClientImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.referenceclient;
+
+import org.osoa.sca.CallableReference;
+import org.osoa.sca.annotations.AllowsPassByReference;
+import org.osoa.sca.annotations.Service;
+
+import conversation.service.ConversationalService;
+
+/**
+ * A client component that accepts a reference to an ongoing conversation
+ * and takes part in that conversation
+ *
+ * @version $Rev$ $Date$
+ */
+
+@Service(interfaces={ConversationalReferenceClient.class})
+@AllowsPassByReference
+public class ConversationalReferenceClientImpl implements ConversationalReferenceClient{
+
+ public void incrementCount(CallableReference<ConversationalService> conversationalService){
+ ConversationalService callableReference = conversationalService.getService();
+
+ callableReference.incrementCount();
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalService.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalService.java
new file mode 100644
index 0000000000..bcd24ef0b1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalService.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.service;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Conversational;
+import org.osoa.sca.annotations.EndsConversation;
+import org.osoa.sca.annotations.Remotable;
+
+import conversation.client.ConversationalCallback;
+
+
+/**
+ * The service interface used when testing conversations
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+@Conversational
+@Callback(ConversationalCallback.class)
+public interface ConversationalService {
+
+ public void init();
+
+ public void destroy();
+
+ public void initializeCount(int count);
+
+ public void incrementCount();
+
+ public int retrieveCount();
+
+ public void businessException() throws Exception;
+
+ public void initializeCountCallback(int count);
+
+ public void incrementCountCallback();
+
+ public int retrieveCountCallback();
+
+ public void businessExceptionCallback() throws Exception;
+
+ @EndsConversation
+ public String endConversation();
+
+ public String endConversationCallback();
+
+ public String getCalls();
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceActivator.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceActivator.java
new file mode 100644
index 0000000000..903f8bf229
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceActivator.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.service;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+
+
+/*
+ * OSGi bundle activator for conversation tests
+ */
+public class ConversationalServiceActivator implements BundleActivator, ServiceListener {
+
+
+ private BundleContext bundleContext;
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ System.out.println("Started OSGiConversationServiceActivator ");
+
+ this.bundleContext = bc;
+
+ bc.addServiceListener(this);
+
+ Hashtable<String, Object> serviceProps;
+
+ serviceProps = new Hashtable<String, Object>();
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalServiceStateful");
+ Object statefulService =
+ new ConversationalServiceFactory(ConversationalServiceStatefulImpl.class);
+ bundleContext.registerService(ConversationalService.class.getName(), statefulService, serviceProps);
+
+ serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "ConversationalServiceStateless");
+ ConversationalServiceStatelessImpl statelessService = new ConversationalServiceStatelessImpl();
+ bundleContext.registerService(ConversationalService.class.getName(), statelessService, serviceProps);
+
+
+ }
+
+
+
+ public void stop(BundleContext bc) {
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+
+ if (event.getType() == ServiceEvent.REGISTERED) {
+
+ }
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceFactory.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceFactory.java
new file mode 100644
index 0000000000..fe8bd23f07
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceFactory.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conversation.service;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+
+
+public class ConversationalServiceFactory implements ServiceFactory {
+
+ private Class<?> clazz;
+
+ public ConversationalServiceFactory(Class<?> clazz) {
+ this.clazz = clazz;
+ }
+
+ public Object getService(Bundle bundle, ServiceRegistration reg) {
+
+ try {
+ return clazz.newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+
+ }
+
+ public void ungetService(Bundle bundle, ServiceRegistration reg, Object obj) {
+
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatefulImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatefulImpl.java
new file mode 100644
index 0000000000..ec30d641ac
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatefulImpl.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.service;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.ConversationAttributes;
+import org.osoa.sca.annotations.ConversationID;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import conversation.client.ConversationalCallback;
+
+
+/**
+ * The service used when testing stateful conversations
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(ConversationalService.class)
+@Scope("CONVERSATION")
+@ConversationAttributes(maxAge="10 minutes",
+ maxIdleTime="5 minutes",
+ singlePrincipal=false)
+public class ConversationalServiceStatefulImpl implements ConversationalService {
+
+ @ConversationID
+ protected String conversationId;
+
+ @Callback
+ protected ConversationalCallback conversationalCallback;
+
+ // local count - accumulates during the conversation
+ private int count = 0;
+
+ // a static member variable that records the number of times this service is called
+ public static StringBuffer calls = new StringBuffer();
+
+ @Init
+ public void init(){
+ calls.append("init,");
+ }
+
+ @Destroy
+ public void destroy(){
+ calls.append("destroy,");
+ }
+
+ public void initializeCount(int count){
+ calls.append("initializeCount,");
+ this.count = count;
+ }
+
+ public void incrementCount(){
+ calls.append("incrementCount,");
+ count++;
+ }
+
+ public int retrieveCount(){
+ calls.append("retrieveCount,");
+ return count;
+ }
+
+ public void businessException() throws Exception {
+ throw new Exception("Business Exception");
+ }
+
+ public void initializeCountCallback(int count){
+ calls.append("initializeCountCallback,");
+ this.count = count;
+ conversationalCallback.initializeCount(count);
+ }
+
+ public void incrementCountCallback(){
+ calls.append("incrementCountCallback,");
+ count++;
+ conversationalCallback.incrementCount();
+ }
+
+ public int retrieveCountCallback(){
+ calls.append("retrieveCountCallback,");
+ return conversationalCallback.retrieveCount();
+ }
+
+ public void businessExceptionCallback() throws Exception {
+ calls.append("businessExceptionCallback,");
+ conversationalCallback.businessException();
+ }
+
+ public String endConversation(){
+ calls.append("endConversation,");
+ count = 0;
+ return conversationId;
+ }
+
+ public String endConversationCallback(){
+ calls.append("endConversationCallback,");
+ return conversationalCallback.endConversation();
+ }
+
+ public String getCalls() {
+ return calls.toString();
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatelessImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatelessImpl.java
new file mode 100644
index 0000000000..34baca71d1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/conversation/service/ConversationalServiceStatelessImpl.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package conversation.service;
+
+import java.util.HashMap;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.ConversationID;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import conversation.client.ConversationalCallback;
+
+
+/**
+ * The service used when testing stateful conversations
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(ConversationalService.class)
+@Scope("STATELESS")
+public class ConversationalServiceStatelessImpl implements ConversationalService {
+
+ @ConversationID
+ protected String conversationId;
+
+ @Callback
+ protected ConversationalCallback conversationalCallback;
+
+ // static area in which to hold conversational data
+ private static HashMap<String, Integer> conversationalState = new HashMap<String, Integer>();
+
+ // a static member variable that records the number of times this service is called
+ public static StringBuffer calls = new StringBuffer();
+
+ @Init
+ public void init(){
+ calls.append("init,");
+ }
+
+ @Destroy
+ public void destroy(){
+ calls.append("destroy,");
+ }
+
+ public void initializeCount(int count){
+ calls.append("initializeCount,");
+ Integer conversationalCount = new Integer(count);
+ conversationalState.put(conversationId, conversationalCount);
+ }
+
+ public void incrementCount(){
+ calls.append("incrementCount,");
+ Integer conversationalCount = conversationalState.get(conversationId);
+ conversationalCount++;
+ conversationalState.put(conversationId, conversationalCount);
+ }
+
+ public int retrieveCount(){
+ calls.append("retrieveCount,");
+ Integer count = conversationalState.get(conversationId);
+ if (count != null){
+ return count.intValue();
+ } else {
+ return -999;
+ }
+ }
+
+ public void businessException() throws Exception {
+ throw new Exception("Business Exception");
+ }
+
+ public void initializeCountCallback(int count){
+ calls.append("initializeCountCallback,");
+ initializeCount(count);
+ conversationalCallback.initializeCount(count);
+ }
+
+ public void incrementCountCallback(){
+ calls.append("incrementCountCallback,");
+ incrementCount();
+ conversationalCallback.incrementCount();
+ }
+
+ public int retrieveCountCallback(){
+ calls.append("retrieveCountCallback,");
+ return conversationalCallback.retrieveCount();
+ }
+
+ public void businessExceptionCallback() throws Exception {
+ calls.append("businessExceptionCallback,");
+ conversationalCallback.businessException();
+ }
+
+ public String endConversation(){
+ calls.append("endConversation,");
+ conversationalState.remove(conversationId);
+ return conversationId;
+ }
+
+ public String endConversationCallback(){
+ calls.append("endConversationCallback,");
+ return conversationalCallback.endConversation();
+ }
+
+ public String getCalls() {
+ return calls.toString();
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/Greetings.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/Greetings.java
new file mode 100644
index 0000000000..9285c0a8d5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/Greetings.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Greetings {
+
+
+ public String[] getGreetingsFromJava(String[] s);
+
+ public String[] getGreetingsFromOSGi(String[] s);
+
+ public String[] getModifiedGreetingsFromJava(String[] s);
+
+ public String[] getModifiedGreetingsFromOSGi(String[] s);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/HelloWorld.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..16d0eae990
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ public String getGreetings(String s);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaGreetingsComponent.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaGreetingsComponent.java
new file mode 100644
index 0000000000..3d0e045225
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaGreetingsComponent.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.osoa.sca.annotations.AllowsPassByReference;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(Greetings.class)
+@Scope("COMPOSITE")
+public class JavaGreetingsComponent implements Greetings {
+
+ private Greetings greetingsService;
+
+ @Reference
+ public void setGreetingsService(Greetings greetingsService) {
+ this.greetingsService = greetingsService;
+ }
+
+
+ public String[] getGreetingsFromJava(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = "Hello " + s[i] + "(From Java)";
+ }
+
+ return greetingsService.getGreetingsFromJava(s);
+ }
+
+ public String[] getGreetingsFromOSGi(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = s[i] + "(From Java)";
+ }
+
+ return s;
+ }
+
+ @AllowsPassByReference
+ public String[] getModifiedGreetingsFromJava(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = "Hello " + s[i] + "(From Java)";
+ }
+
+ return greetingsService.getModifiedGreetingsFromJava(s);
+ }
+
+ @AllowsPassByReference
+ public String[] getModifiedGreetingsFromOSGi(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = s[i] + "(From Java)";
+ }
+
+ return s;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaHelloWorldComponent.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaHelloWorldComponent.java
new file mode 100644
index 0000000000..c055aee142
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/JavaHelloWorldComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+
+@Scope("COMPOSITE")
+public class JavaHelloWorldComponent implements HelloWorld {
+
+ public helloworld.ws.HelloWorld helloWorldWS;
+
+ @Reference
+ public void setHelloWorldWS(helloworld.ws.HelloWorld helloWorldWS) {
+ this.helloWorldWS = helloWorldWS;
+ }
+
+ public String getGreetings(String s) {
+ return helloWorldWS.getGreetings(s);
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiGreetingsImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiGreetingsImpl.java
new file mode 100644
index 0000000000..661eb5a8cb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiGreetingsImpl.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.BundleActivator;
+import org.osoa.sca.annotations.AllowsPassByReference;
+
+
+public class OSGiGreetingsImpl implements Greetings, ServiceListener, BundleActivator {
+
+ private Greetings greetingsService;
+
+ private BundleContext bundleContext;
+
+ public String[] getGreetingsFromOSGi(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = "Hello " + s[i] + "(From OSGi)";
+ }
+
+ return greetingsService.getGreetingsFromOSGi(s);
+ }
+
+ public String[] getGreetingsFromJava(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = s[i] + "(From OSGi)";
+ }
+
+ return s;
+ }
+
+ @AllowsPassByReference
+ public String[] getModifiedGreetingsFromOSGi(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = "Hello " + s[i] + "(From OSGi)";
+ }
+
+ return greetingsService.getModifiedGreetingsFromOSGi(s);
+ }
+
+ @AllowsPassByReference
+ public String[] getModifiedGreetingsFromJava(String s[]) {
+ for (int i = 0; i < s.length; i++) {
+ s[i] = s[i] + "(From OSGi)";
+ }
+
+ return s;
+ }
+
+ public void start(BundleContext bc) {
+
+ System.out.println("Started OsgiGreetingsImpl bundle ");
+
+ this.bundleContext = bc;
+
+ Hashtable<String, Object> serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.service.name", "OSGiGreetingsComponent/Greetings");
+ bundleContext.registerService("helloworld.Greetings", this, serviceProps);
+
+
+ ServiceReference ref = bundleContext.getServiceReference("helloworld.Greetings");
+ if (ref != null)
+ greetingsService = (helloworld.Greetings)bundleContext.getService(ref);
+ else {
+ try {
+ String filter = "(objectclass=helloworld.Greetings)";
+ this.bundleContext.addServiceListener(this, filter);
+
+ } catch (InvalidSyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+ public void stop(BundleContext bc) {
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+ try {
+ if (event.getType() == ServiceEvent.REGISTERED) {
+ ServiceReference ref = event.getServiceReference();
+ greetingsService = (helloworld.Greetings) bundleContext.getService(ref);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiHelloWorldImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiHelloWorldImpl.java
new file mode 100644
index 0000000000..0588da9a85
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/OSGiHelloWorldImpl.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.BundleActivator;
+
+
+public class OSGiHelloWorldImpl implements HelloWorld, ServiceListener, BundleActivator {
+
+ public helloworld.ws.HelloWorld helloWorldWS;
+
+ private BundleContext bundleContext;
+
+ public String getGreetings(String s) {
+ return helloWorldWS.getGreetings(s);
+ }
+
+
+ public void start(BundleContext bc) {
+
+ System.out.println("Started OsgiHelloWorldImpl bundle ");
+
+ this.bundleContext = bc;
+
+ Hashtable<String, Object> serviceProps = new Hashtable<String, Object>();
+ serviceProps.put("component.name", "HelloWorldComponent");
+ bundleContext.registerService("helloworld.HelloWorld", this, serviceProps);
+
+ ServiceReference ref = bundleContext.getServiceReference("helloworld.ws.HelloWorld");
+ if (ref != null)
+ helloWorldWS = (helloworld.ws.HelloWorld)bundleContext.getService(ref);
+ else {
+ try {
+ String filter = "(objectclass=helloworld.ws.HelloWorld)";
+ this.bundleContext.addServiceListener(this, filter);
+
+ } catch (InvalidSyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+ public void stop(BundleContext bc) {
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+ try {
+ if (event.getType() == ServiceEvent.REGISTERED) {
+ ServiceReference ref = event.getServiceReference();
+ helloWorldWS = (helloworld.ws.HelloWorld) bundleContext.getService(ref);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldService.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldService.java
new file mode 100644
index 0000000000..fff67e1978
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld.sdo;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for the helloworld service
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(Name name);
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldServiceComponent.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldServiceComponent.java
new file mode 100644
index 0000000000..98085449e6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/HelloWorldServiceComponent.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld.sdo;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldServiceComponent implements HelloWorldService {
+
+ public String getGreetings(Name name) {
+ return "Hello " + name.getFirst() + " " + name.getLast();
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClient.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClient.java
new file mode 100644
index 0000000000..5089019671
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClient.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld.sdo.client;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for the helloworld client
+ */
+@Remotable
+public interface HelloWorldClient {
+
+ public String getGreetings(String firstName, String lastName);
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClientComponent.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClientComponent.java
new file mode 100644
index 0000000000..1aabf4d10c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/sdo/client/HelloWorldClientComponent.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld.sdo.client;
+
+import helloworld.sdo.HelloWorldService;
+import helloworld.sdo.HelloworldFactory;
+import helloworld.sdo.Name;
+
+/**
+ * The HelloWorld client implementation
+ */
+public class HelloWorldClientComponent implements HelloWorldClient {
+
+ HelloWorldService helloWorldService;
+
+ public String getGreetings(String firstName, String lastName) {
+ Name name = HelloworldFactory.INSTANCE.createName();
+ name.setFirst(firstName);
+ name.setLast(lastName);
+ return helloWorldService.getGreetings(name);
+ }
+
+ public HelloWorldService getHelloWorldService() {
+ return helloWorldService;
+ }
+
+ public void setHelloWorldService(HelloWorldService helloWorldService) {
+ this.helloWorldService = helloWorldService;
+ }
+
+ public void unsetHelloWorldService(HelloWorldService helloWorldService) {
+ this.helloWorldService = null;
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorld.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorld.java
new file mode 100644
index 0000000000..039a214856
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld.ws;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ public String getGreetings(String s);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorldService.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorldService.java
new file mode 100644
index 0000000000..4a3cd4aed2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld.ws;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteComponentImpl.java
new file mode 100644
index 0000000000..2251bf5be6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteComponentImpl.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package stockquote;
+
+import java.util.Dictionary;
+
+import org.osgi.service.component.ComponentContext;
+import org.osoa.sca.annotations.Property;
+
+/**
+ * Declarative Stock quote with configurable properties.
+ */
+public class OSGiStockQuoteComponentImpl implements StockQuote {
+
+ @Property
+ public double exchangeRate;
+
+ private String currency;
+
+
+ public double configExchangeRate;
+ public String configCurrency;
+
+ @Property
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public double getQuote(String ticker) throws Exception {
+
+ if (exchangeRate == 2.0 && !"USD".equals(currency)) {
+ throw new RuntimeException("Property exchangeRate not set correctly, exchangeRate= " +
+ exchangeRate + " currency=" + currency);
+ }
+ if (exchangeRate == 1.48 && !"EURO".equals(currency)) {
+ throw new RuntimeException("Property exchangeRate not set correctly, exchangeRate= " +
+ exchangeRate + " currency=" + currency);
+ }
+
+ if (configExchangeRate == 2.0 && !"USD".equals(configCurrency)) {
+ throw new RuntimeException("ConfigAdmin Property exchangeRate not set correctly, exchangeRate= " +
+ configExchangeRate + " currency=" + configCurrency);
+ }
+ if (configExchangeRate == 1.48 && !"EURO".equals(configCurrency)) {
+ throw new RuntimeException("Property configExchangeRate not set correctly, exchangeRate= " +
+ configExchangeRate + " currency=" + configCurrency);
+ }
+
+ return 52.81 * exchangeRate;
+
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiStockQuoteComponentImpl bundle ");
+ Dictionary props = context.getProperties();
+ Object prop = props.get("currency");
+ if (prop instanceof String[]&& ((String [])prop).length > 0)
+ configCurrency = ((String [])prop)[0];
+ prop = props.get("exchangeRate");
+ if (prop instanceof Double[]&& ((Double [])prop).length > 0)
+ configExchangeRate = (double)((Double [])prop)[0];
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiStockQuoteComponentImpl bundle ");
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteFactoryImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteFactoryImpl.java
new file mode 100644
index 0000000000..e2d25bf47d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteFactoryImpl.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package stockquote;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ *
+ * OSGi service factory where service has configurable properties
+ * Only property injection is tested. ConfigurationAdmin is not used.
+ *
+ */
+public class OSGiStockQuoteFactoryImpl implements BundleActivator, ServiceFactory {
+
+
+ private BundleContext bundleContext;
+
+
+ public void start(BundleContext bc) throws Exception {
+
+ bundleContext = bc;
+
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ bc.registerService(StockQuote.class.getName(), this, props);
+
+ }
+
+ public void stop(BundleContext bc) throws Exception {
+ }
+
+
+ public Object getService(Bundle bundle, ServiceRegistration registration) {
+ return new OSGiStockQuoteImpl(bundleContext);
+ }
+
+
+ public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
+
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteImpl.java
new file mode 100644
index 0000000000..f2ae804ad1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteImpl.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package stockquote;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osoa.sca.annotations.Property;
+
+/**
+ *
+ * Stock quote with configurable properties.
+ *
+ */
+public class OSGiStockQuoteImpl implements StockQuote, BundleActivator {
+
+ public String pid;
+
+ @Property
+ public double exchangeRate;
+
+ private String currency;
+
+ private BundleContext bundleContext;
+
+ public OSGiStockQuoteImpl() {
+ this.pid = "stockQuote";
+ }
+
+ protected OSGiStockQuoteImpl(BundleContext bc) {
+ this.bundleContext = bc;
+ }
+
+ @Property
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+
+ private void checkProperties() throws Exception {
+
+ if (exchangeRate == 2.0 && !"USD".equals(currency)) {
+ throw new RuntimeException("Property exchangeRate not set correctly, exchangeRate= " +
+ exchangeRate + " currency=" + currency);
+ }
+
+ if (exchangeRate == 1.48 && !"EURO".equals(currency)) {
+ throw new RuntimeException("Property exchangeRate not set correctly, exchangeRate= " +
+ exchangeRate + " currency=" + currency);
+ }
+
+ ServiceReference configAdminReference = bundleContext.getServiceReference("org.osgi.service.cm.ConfigurationAdmin");
+ if (configAdminReference != null && pid != null ) {
+
+ ConfigurationAdmin cm = (ConfigurationAdmin)bundleContext.getService(configAdminReference);
+
+ Configuration config = cm.getConfiguration("stockQuote", null);
+
+ Dictionary props = config.getProperties();
+
+ if (exchangeRate != (double)(Double)props.get("exchangeRate")) {
+ throw new Exception("Config Property exchangeRate not set correctly, expected "
+ + props.get("exchangeRate") + " got " + exchangeRate);
+ }
+
+ if (!currency.equals(props.get("currency"))) {
+ throw new Exception("Config Property currency not set correctly, expected "
+ + props.get("currency") + " got " + currency);
+ }
+ }
+
+ }
+
+ public double getQuote(String ticker) throws Exception {
+
+ checkProperties();
+
+ return 52.81 * exchangeRate;
+
+ }
+
+ public void start(BundleContext bc) throws Exception {
+
+ bundleContext = bc;
+
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ props.put("service.pid", "stockQuote");
+
+ bc.registerService(StockQuote.class.getName(), this, props);
+
+ }
+
+ public void stop(BundleContext bc) throws Exception {
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/StockQuote.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/StockQuote.java
new file mode 100644
index 0000000000..a47f68c579
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/stockquote/StockQuote.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package stockquote;
+
+/**
+ *
+ * Stock Quote interface
+ *
+ */
+public interface StockQuote {
+
+ public double getQuote(String ticker) throws Exception ;
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/OSGiBundleImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/OSGiBundleImpl.java
new file mode 100644
index 0000000000..25d7bcf2ff
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/OSGiBundleImpl.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package supplychain;
+
+
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiBundleImpl implements ServiceListener, BundleActivator {
+
+
+ String name;
+
+ String[] references;
+ Class<?>[] referenceClasses;
+ Field[] referenceFields;
+ String[] referenceFilters;
+
+ Class myClass;
+ ArrayList<String> serviceNames = new ArrayList<String>();
+ ArrayList<Object> serviceObjs = new ArrayList<Object>();
+ ArrayList<Hashtable<String, Object>> serviceProperties = new ArrayList<Hashtable<String, Object>>();
+
+
+ private BundleContext bundleContext;
+
+ public OSGiBundleImpl() {}
+
+ public OSGiBundleImpl(String[] references, String[] filters) {
+
+ myClass = this.getClass();
+ this.name = this.getClass().getSimpleName();
+ this.references = references == null?new String[0] : references;
+
+
+ try {
+ referenceClasses = new Class[references.length];
+ referenceFields = new Field[references.length];
+ referenceFilters = new String[references.length];
+ for (int i = 0; i < references.length; i++) {
+ referenceFields[i] = this.getClass().getDeclaredField(references[i]);
+ referenceFields[i].setAccessible(true);
+ referenceClasses[i] = referenceFields[i].getType();
+
+ if (filters != null && filters.length > i)
+ referenceFilters[i] = filters[i];
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ public void start(BundleContext bc) {
+
+ System.out.println("Started bundle " + name);
+
+ this.bundleContext = bc;
+
+ boolean useSingleRegisterService = serviceNames.size() > 1;
+ for (int i = 1; i < serviceNames.size(); i++) {
+ if (serviceObjs.get(i) != serviceObjs.get(0) ||
+ serviceProperties.get(i) != serviceProperties.get(0)) {
+ useSingleRegisterService = false;
+ break;
+ }
+ }
+ if (useSingleRegisterService) {
+ bundleContext.registerService(serviceNames.toArray(new String[serviceNames.size()]),
+ serviceObjs.get(0), serviceProperties.get(0));
+ }
+ else {
+ for (int i = 0; i < serviceNames.size(); i++) {
+ bundleContext.registerService(serviceNames.get(i), serviceObjs.get(i), serviceProperties.get(i));
+ }
+ }
+
+ started(bc);
+
+ for (int i = 0; i < references.length; i++) {
+
+ try {
+ if (referenceFields[i].get(this) != null)
+ continue;
+
+ ServiceReference[] refs = bundleContext.getServiceReferences(referenceClasses[i].getName(), referenceFilters[i]);
+ if (refs != null && refs.length > 0) {
+ Object obj = bundleContext.getService(refs[0]);
+ referenceFields[i].set(this, referenceClasses[i].cast(obj));
+ } else {
+ String filter = "(objectclass=" + referenceClasses[i].getName() + ")";
+ this.bundleContext.addServiceListener(this, filter);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public void stop(BundleContext bc) {
+ System.out.println("Stop bundle " + name);
+
+ }
+
+ protected void started(BundleContext bc) {
+
+ }
+
+ public void serviceChanged(ServiceEvent event) {
+ try {
+ if (event.getType() == ServiceEvent.REGISTERED) {
+
+ ServiceReference ref = event.getServiceReference();
+ Object obj = bundleContext.getService(ref);
+ for (int i = 0; i < references.length; i++) {
+ if (referenceClasses[i].isAssignableFrom(obj.getClass())) {
+ referenceFields[i].set(this, referenceClasses[i].cast(obj));
+ }
+ }
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ public void registerService(Object serviceObject, String serviceName, Hashtable<String, Object> props) {
+ serviceObjs.add(serviceObject);
+ serviceNames.add(serviceName);
+ serviceProperties.add(props == null? new Hashtable<String, Object>() : props);
+ }
+}
+ \ No newline at end of file
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/Customer.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/Customer.java
new file mode 100644
index 0000000000..2762bc62be
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/Customer.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+import org.osoa.sca.annotations.OneWay;
+
+/**
+ * This is the business interface of the Customer service component.
+ */
+public interface Customer {
+
+ public void purchaseBooks();
+
+ public void purchaseGames();
+
+ public void purchaseGoods();
+
+ @OneWay
+ public void notifyShipment(String order);
+
+ public boolean hasOutstandingOrders();
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java
new file mode 100644
index 0000000000..80346311b1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+import java.util.ArrayList;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component.
+ */
+@Service(Customer.class)
+@Scope("COMPOSITE")
+public class JavaCustomerComponentImpl implements Customer {
+
+ private Retailer retailer1;
+
+ private Retailer retailer2;
+
+ private Retailer retailer3;
+
+ private static ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ @Reference
+ public void setRetailer1(Retailer retailer1) {
+ this.retailer1 = retailer1;
+ }
+
+ @Reference
+ public void setRetailer2(Retailer retailer2) {
+ this.retailer2 = retailer2;
+ }
+
+ @Reference
+ public void setRetailer3(Retailer retailer3) {
+ this.retailer3 = retailer3;
+ }
+
+ public void purchaseBooks() {
+ System.out.println("JavaCustomerComponentImpl.purchaseBooks");
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (ParcelForce)");
+ retailer1.submitOrder("Order");
+ }
+
+ public void purchaseGames() {
+ System.out.println("JavaCustomerComponentImpl.purchaseGames");
+ outstandingOrders.add("Order, submitted (play.com), fulfilled, shipped (ParcelForce)");
+
+ retailer2.submitOrder("Order");
+ }
+
+ public void purchaseGoods() {
+ retailer3.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+ outstandingOrders.remove(order);
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java
new file mode 100644
index 0000000000..a879505610
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import java.util.ArrayList;
+
+import org.osgi.service.component.ComponentContext;
+
+
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiCustomerComponentImpl implements Customer {
+
+
+ private Retailer retailer1;
+ private Retailer retailer2;
+ private Retailer retailer3;
+
+ private static ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ public OSGiCustomerComponentImpl() {
+ System.out.println("Created OSGiCustomerComponentImpl " + this);
+ }
+
+ protected void setRetailer1(Retailer retailer1) {
+ this.retailer1 = retailer1;
+ }
+
+ protected void unsetRetailer1(Retailer retailer1) {
+ // this.retailer1 = null;
+ }
+
+
+ protected void setRetailer2(Retailer retailer2) {
+ this.retailer2 = retailer2;
+ }
+
+ protected void unsetRetailer2(Retailer retailer2) {
+ // this.retailer2 = null;
+ }
+
+ protected void setRetailer3(Retailer retailer3) {
+ this.retailer3 = retailer3;
+ }
+
+ protected void unsetRetailer3(Retailer retailer3) {
+ // this.retailer3 = null;
+ }
+
+
+ public void purchaseBooks() {
+ System.out.println("OSGiCustomerComponentImpl.purchaseBooks, retailer1 is " + retailer1);
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (ParcelForce)");
+ retailer1.submitOrder("Order");
+ }
+
+ public void purchaseGames() {
+ System.out.println("OSGiCustomerComponentImpl.purchaseGames, retailer2 is " + retailer2);
+ outstandingOrders.add("Order, submitted (play.com), fulfilled, shipped (ParcelForce)");
+
+ retailer2.submitOrder("Order");
+ }
+
+ public void purchaseGoods() {
+ System.out.println("OSGiCustomerComponentImpl.purchaseGames, retailer3 is " + retailer3);
+ retailer3.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+ outstandingOrders.remove(order);
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiCustomerComponentImpl bundle ");
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiCustomerComponentImpl bundle ");
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerFactoryImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerFactoryImpl.java
new file mode 100644
index 0000000000..c8cb522cf4
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerFactoryImpl.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiCustomerFactoryImpl implements BundleActivator, ServiceFactory {
+
+ private BundleContext bundleContext;
+
+ public OSGiCustomerFactoryImpl() {
+ }
+
+
+ public void start(BundleContext bc) {
+
+ this.bundleContext = bc;
+ bc.registerService(Customer.class.getName(), this, null);
+ }
+
+
+
+
+ public void stop(BundleContext context) throws Exception {
+
+ }
+
+
+ public Object getService(Bundle bundle, ServiceRegistration registration) {
+
+ OSGiCustomerImpl customer = new OSGiCustomerImpl(false);
+ customer.start(bundleContext);
+ return customer;
+
+ }
+
+ public void ungetService(Bundle bundle, ServiceRegistration registration, Object obj) {
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerImpl.java
new file mode 100644
index 0000000000..546971860e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerImpl.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import java.util.ArrayList;
+
+import org.osoa.sca.annotations.AllowsPassByReference;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component.
+ */
+@AllowsPassByReference
+public class OSGiCustomerImpl extends OSGiBundleImpl implements Customer {
+
+ private ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ private Retailer retailer1;
+ private Retailer retailer2;
+ private Retailer retailer3;
+
+ public OSGiCustomerImpl() {
+ super( new String[]{"retailer1", "retailer2", "retailer3"},
+ new String[]{"(retailerName=amazon.com)",
+ "(retailerName=play.com)",
+ "(retailerName=ebay.com)"
+ });
+ registerService(this, "supplychain.customer.Customer", null);
+
+ }
+
+ public OSGiCustomerImpl(boolean ignore) { // Used only to test service factories
+ super( new String[]{"retailer1", "retailer2", "retailer3"},
+ new String[]{"(retailerName=amazon.com)",
+ "(retailerName=play.com)",
+ "(retailerName=ebay.com)"
+ });
+
+ }
+
+ public void purchaseBooks() {
+ System.out.println("OSGiCustomerImpl.purchaseBooks, retailer is " + retailer1);
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (ParcelForce)");
+
+ retailer1.submitOrder("Order");
+
+ }
+
+ public void purchaseGames() {
+ System.out.println("OSGiCustomerImpl.purchaseGames, retailer is " + retailer2);
+ outstandingOrders.add("Order, submitted (play.com), fulfilled, shipped (ParcelForce)");
+
+ retailer2.submitOrder("Order");
+
+ }
+
+ public void purchaseGoods() {
+ retailer3.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+
+ outstandingOrders.remove(order);
+
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryComponentImpl.java
new file mode 100644
index 0000000000..593e55f3f5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryComponentImpl.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import java.util.ArrayList;
+
+import org.osgi.service.component.ComponentContext;
+
+
+import supplychain.retailer.Retailer;
+import supplychain.retailer.RetailerQuery;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiCustomerWithQueryComponentImpl implements Customer {
+
+
+ private Retailer retailer;
+ private RetailerQuery retailerQuery;
+
+ private static ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ public OSGiCustomerWithQueryComponentImpl() {
+ System.out.println("Created OSGiCustomerWithQueryComponentImpl " + this);
+ }
+
+ protected void setRetailer(Retailer retailer) {
+ this.retailer = retailer;
+ }
+
+ protected void unsetRetailer(Retailer retailer) {
+ // this.retailer = null;
+ }
+
+
+ protected void setRetailerQuery(RetailerQuery retailerQuery) {
+ this.retailerQuery = retailerQuery;
+ }
+
+ protected void unsetRetailerQuery(RetailerQuery retailerQuery) {
+ // this.retailerQuery = null;
+ }
+
+ public void purchaseBooks() {
+ System.out.println("OSGiCustomerWithQueryComponentImpl.purchaseBooks");
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (RoyalMail)");
+
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+ }
+
+ public void purchaseGames() {
+ System.out.println("OSGiCustomerWithQueryComponentImpl.purchaseGames");
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (RoyalMail)");
+
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+ }
+
+ public void purchaseGoods() {
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+ outstandingOrders.remove(order);
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiCustomerWithQueryComponentImpl bundle ");
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiCustomerWithQueryComponentImpl bundle ");
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryImpl.java
new file mode 100644
index 0000000000..18483817ad
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryImpl.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import java.util.ArrayList;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.retailer.Retailer;
+import supplychain.retailer.RetailerQuery;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiCustomerWithQueryImpl extends OSGiBundleImpl implements Customer {
+
+ private static ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ private Retailer retailer;
+ private RetailerQuery retailerQuery;
+
+ public OSGiCustomerWithQueryImpl() {
+ super( new String[]{"retailer", "retailerQuery"},
+ new String[]{"(component.service.name=RetailerComponent/Retailer)",
+ "(component.service.name=RetailerComponent/RetailerQuery)"
+ });
+ registerService(this, "supplychain.customer.Customer", null);
+
+ }
+
+ public void purchaseBooks() {
+ System.out.println("OSGiCustomerWithQueryImpl.purchaseBooks");
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (RoyalMail)");
+
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+
+ }
+
+ public void purchaseGames() {
+ System.out.println("OSGiCustomerWithQueryImpl.purchaseGames");
+ outstandingOrders.add("Order, submitted (amazon.com), fulfilled, shipped (RoyalMail)");
+
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+
+ }
+
+ public void purchaseGoods() {
+ if (retailerQuery.isAvailable("Order"))
+ retailer.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+
+ outstandingOrders.remove(order);
+
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerComponentImpl.java
new file mode 100644
index 0000000000..5ba42780f2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerComponentImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+import org.osoa.sca.annotations.Scope;
+
+
+/**
+ * This class implements the Customer service component.
+ */
+@Scope("STATELESS")
+public class OSGiStatelessCustomerComponentImpl extends OSGiCustomerComponentImpl {
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerImpl.java
new file mode 100644
index 0000000000..bc569d0ac0
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiStatelessCustomerImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import org.osoa.sca.annotations.Scope;
+
+
+/**
+ * This class implements the Customer service component.
+ */
+@Scope("STATELESS")
+public class OSGiStatelessCustomerImpl extends OSGiCustomerImpl {
+
+ public OSGiStatelessCustomerImpl(boolean ignore) {
+ super(ignore);
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiVersionedCustomerImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiVersionedCustomerImpl.java
new file mode 100644
index 0000000000..599ab51a50
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiVersionedCustomerImpl.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.customer;
+
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.retailer.Retailer;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiVersionedCustomerImpl extends OSGiBundleImpl implements Customer {
+
+ private static ArrayList<String> outstandingOrders = new ArrayList<String>();
+
+ private Retailer retailer1;
+ private Retailer retailer2;
+ private Retailer retailer3;
+ private int version;
+
+ public OSGiVersionedCustomerImpl() {
+ super( new String[]{"retailer1", "retailer2", "retailer3"},
+ new String[]{"(retailerName=amazon.com)",
+ "(retailerName=play.com)",
+ "(retailerName=ebay.com)"
+ });
+
+ }
+
+ protected void started(BundleContext bc) {
+
+ String jarFile = bc.getBundle().getLocation();
+ if (jarFile.endsWith("1.jar")) version = 1;
+ else if (jarFile.endsWith("2.jar")) version = 2;
+ else version = 3;
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("component.name", "CustomerComponent" + version);
+ bc.registerService("supplychain.customer.Customer", this, props1);
+
+ }
+
+ public void purchaseBooks() {
+ System.out.println("OSGiVersionedCustomerImpl.purchaseBooks , retailer is " + retailer1);
+ outstandingOrders.add("Order, submitted (amazon.com v" + version +
+ "), fulfilled, shipped (ParcelForce)");
+
+ retailer1.submitOrder("Order");
+
+ }
+
+ public void purchaseGames() {
+ System.out.println("OSGiCustomerImpl.purchaseGames");
+ outstandingOrders.add("Order, submitted (play.com v" + version +
+ "), fulfilled, shipped (ParcelForce)");
+
+ retailer2.submitOrder("Order");
+
+ }
+
+ public void purchaseGoods() {
+ retailer3.submitOrder("Order");
+ }
+
+ public void notifyShipment(String order) {
+
+ outstandingOrders.remove(order);
+
+ System.out.print("Work thread " + Thread.currentThread() + " - ");
+ System.out.println(order);
+ }
+
+ public boolean hasOutstandingOrders() {
+ return outstandingOrders.size() != 0;
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java
new file mode 100644
index 0000000000..df52c6c760
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Customer service component.
+ */
+@Service(Retailer.class)
+@Scope("COMPOSITE")
+public class JavaRetailerComponentImpl implements Retailer {
+
+ private Warehouse warehouse;
+
+ private String retailerName;
+
+ public JavaRetailerComponentImpl() {
+ System.out.println("Created RetailerComponentImpl");
+ }
+
+ @Reference
+ public void setWarehouse(Warehouse warehouse) {
+ System.out.println("retailer setWarehouse " + warehouse);
+
+ this.warehouse = warehouse;
+ }
+
+ @Property
+ public void setRetailerName(String retailerName) {
+ this.retailerName = retailerName;
+ }
+
+
+ public void submitOrder(String order) {
+
+ System.out.println("JavaRetailerComponentImpl.submitOrder " + warehouse);
+ warehouse.fulfillOrder(order + ", submitted (" + retailerName + ")");
+
+ }
+
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java
new file mode 100644
index 0000000000..aca5943552
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+import org.osgi.service.component.ComponentContext;
+
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiRetailerComponentImpl implements Retailer {
+
+ private Warehouse warehouse;
+ private String retailerName;
+
+
+ protected void setWarehouse(Warehouse warehouse) {
+ this.warehouse = warehouse;
+ }
+
+ protected void unsetWarehouse(Warehouse warehouse) {
+ // this.warehouse = null;
+ }
+
+ public void submitOrder(String order) {
+
+ System.out.println("OSGiRetailerComponentImpl.submitOrder , warehouse is " + warehouse);
+ warehouse.fulfillOrder(order + ", submitted (" + retailerName + ")");
+
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiRetailerComponentImpl bundle ");
+
+ Object prop = context.getProperties().get("retailerName");
+ if (prop instanceof String[])
+ retailerName = ((String [])prop)[0];
+
+
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiRetailerComponentImpl bundle ");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerImpl.java
new file mode 100644
index 0000000000..e71c624f49
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerImpl.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+import java.util.Hashtable;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Retailer service component.
+ */
+public class OSGiRetailerImpl extends OSGiBundleImpl {
+
+ protected Warehouse warehouse;
+
+ public OSGiRetailerImpl() {
+
+ super(new String[]{"warehouse"},
+ new String[]{"(component.service.name=WarehouseComponent1/Warehouse)"});
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("retailerName", "amazon.com");
+ registerService(new OSGiRetailerServiceImpl(this, "amazon.com"),
+ "supplychain.retailer.Retailer", props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("retailerName", "play.com");
+ registerService(
+ new OSGiRetailerServiceImpl(this, "play.com"),
+ "supplychain.retailer.Retailer", props2);
+
+ Hashtable<String, Object> props3 = new Hashtable<String, Object>();
+ props3.put("retailerName", "ebay.com");
+ registerService(
+ new OSGiRetailerServiceImpl(this, "ebay.com"),
+ "supplychain.retailer.Retailer", props3);
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerServiceImpl.java
new file mode 100644
index 0000000000..a036ecfc76
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerServiceImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+/**
+ * This class implements the Retailer service.
+ */
+public class OSGiRetailerServiceImpl implements Retailer {
+
+ private OSGiRetailerImpl retailerImpl;
+
+ private String retailerName;
+
+ OSGiRetailerServiceImpl(OSGiRetailerImpl retailerImpl, String retailerName) {
+ this.retailerImpl = retailerImpl;
+ this.retailerName = retailerName;
+
+ }
+
+ public void submitOrder(String order) {
+
+ System.out.println("Retailer.submitOrder, warehouse is " + retailerImpl.warehouse);
+ retailerImpl.warehouse.fulfillOrder(order + ", submitted ("
+ + retailerName + ")");
+
+ }
+
+} \ No newline at end of file
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryComponentImpl.java
new file mode 100644
index 0000000000..db877bb366
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryComponentImpl.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+import org.osgi.service.component.ComponentContext;
+
+import supplychain.warehouse.Warehouse;
+import supplychain.warehouse.WarehouseQuery;
+
+/**
+ * This class implements the Customer service component.
+ */
+public class OSGiRetailerWithQueryComponentImpl implements Retailer, RetailerQuery {
+
+ private Warehouse warehouse;
+ private WarehouseQuery warehouseQuery;
+ private String retailerName;
+
+
+ protected void setWarehouse(Warehouse warehouse) {
+ this.warehouse = warehouse;
+ }
+
+ protected void unsetWarehouse(Warehouse warehouse) {
+ // this.warehouse = null;
+ }
+
+ protected void setWarehouseQuery(WarehouseQuery warehouseQuery) {
+ this.warehouseQuery = warehouseQuery;
+ }
+
+ protected void unsetWarehouseQuery(WarehouseQuery warehouse) {
+ // this.warehouseQuery = null;
+ }
+
+ public void submitOrder(String order) {
+
+ System.out.println("OSGiRetailerComponentImpl.submitOrder , warehouse is " + warehouse);
+ warehouse.fulfillOrder(order + ", submitted (" + retailerName + ")");
+
+ }
+
+ public boolean isAvailable(String order) {
+ return warehouseQuery.isAvailable(order);
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiRetailerComponentImpl bundle ");
+
+ Object prop = context.getProperties().get("retailerName");
+ if (prop instanceof String[])
+ retailerName = ((String [])prop)[0];
+
+
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiRetailerComponentImpl bundle ");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryImpl.java
new file mode 100644
index 0000000000..ee1f575e70
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryImpl.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+import java.util.Hashtable;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.warehouse.Warehouse;
+import supplychain.warehouse.WarehouseQuery;
+
+/**
+ * This class implements the Retailer service component with query.
+ */
+public class OSGiRetailerWithQueryImpl extends OSGiBundleImpl implements Retailer, RetailerQuery {
+
+ private Warehouse warehouse;
+ private WarehouseQuery warehouseQuery;
+
+ public OSGiRetailerWithQueryImpl() {
+
+ super(new String[]{"warehouse", "warehouseQuery"}, null);
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("retailerName", "amazon.com");
+ registerService(this,
+ "supplychain.retailer.Retailer", props1);
+
+ registerService(this,
+ "supplychain.retailer.RetailerQuery", props1);
+
+ }
+
+ public void submitOrder(String order) {
+
+ System.out.println("Retailer.submitOrder, warehouse is " + warehouse);
+ warehouse.fulfillOrder(order + ", submitted ("
+ + "amazon.com" + ")");
+
+ }
+
+ public boolean isAvailable(String order) {
+ return warehouseQuery.isAvailable(order);
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerImpl.java
new file mode 100644
index 0000000000..09e60ca626
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerImpl.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.warehouse.Warehouse;
+
+/**
+ * This class implements the Retailer service component.
+ */
+public class OSGiVersionedRetailerImpl extends OSGiBundleImpl {
+
+ protected Warehouse warehouse;
+
+ private int version;
+
+ public OSGiVersionedRetailerImpl() {
+
+ super(new String[]{"warehouse"}, null);
+
+
+ }
+
+ protected void started(BundleContext bc) {
+ String jarFile = bc.getBundle().getLocation();
+ if (jarFile.endsWith("1.jar")) version = 1;
+ else if (jarFile.endsWith("2.jar")) version = 2;
+ else version = 3;
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("retailerName", "amazon.com");
+ bc.registerService("supplychain.retailer.Retailer",
+ new OSGiVersionedRetailerServiceImpl(this, "amazon.com", version),
+ props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("retailerName", "play.com");
+ bc.registerService(
+ "supplychain.retailer.Retailer",
+ new OSGiVersionedRetailerServiceImpl(this, "play.com", version),
+ props2);
+
+ try {
+ ServiceReference[] refs = bc.getServiceReferences(Warehouse.class.getName(),
+ "(component.service.name=WarehouseComponent" + version + "/Warehouse)");
+ if (refs != null && refs.length > 0) {
+ warehouse = (Warehouse) bc.getService(refs[0]);
+ }
+ } catch (InvalidSyntaxException e) {
+ }
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerServiceImpl.java
new file mode 100644
index 0000000000..7dd70889c7
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerServiceImpl.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+
+/**
+ * This class implements the Retailer service.
+ */
+public class OSGiVersionedRetailerServiceImpl implements Retailer {
+
+ private OSGiVersionedRetailerImpl retailerImpl;
+
+ private String retailerName;
+
+ private int version;
+
+ OSGiVersionedRetailerServiceImpl(OSGiVersionedRetailerImpl retailerImpl, String retailerName, int version) {
+ this.retailerImpl = retailerImpl;
+ this.retailerName = retailerName;
+ this.version = version;
+ }
+
+ public void submitOrder(String order) {
+
+ System.out.println("Retailer.submitOrder, warehouse is " + retailerImpl.warehouse);
+ retailerImpl.warehouse.fulfillOrder(order + ", submitted ("
+ + retailerName + " v" + version + ")");
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/Retailer.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/Retailer.java
new file mode 100644
index 0000000000..1e87d59af1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/Retailer.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+/**
+ * This is the business interface of the Retailer service component.
+ */
+public interface Retailer {
+
+ public void submitOrder(String order);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/RetailerQuery.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/RetailerQuery.java
new file mode 100644
index 0000000000..354f40a064
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/retailer/RetailerQuery.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.retailer;
+
+/**
+ * This is the business interface of the RetailerQuery service.
+ */
+public interface RetailerQuery {
+
+ public boolean isAvailable(String order);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java
new file mode 100644
index 0000000000..d0cf43a960
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component.
+ */
+@Service(Shipper.class)
+@Scope("COMPOSITE")
+public class JavaShipperComponentImpl implements Shipper {
+
+ private Customer customer;
+
+ private String shipperName;
+
+ @Reference
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ @Property
+ public void setShipperName(String shipperName) {
+ this.shipperName = shipperName;
+ }
+
+
+
+ public void processShipment(String order) {
+ System.out.println("JavaShipperComponentImpl.processShipment");
+ customer.notifyShipment(order + ", shipped (" + shipperName + ")");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java
new file mode 100644
index 0000000000..ff40a7ae36
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+import org.osgi.service.component.ComponentContext;
+
+import supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component.
+ */
+public class OSGiShipperComponentImpl implements Shipper {
+
+ private Customer customer;
+ private String shipperName;
+
+ protected void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ protected void unsetCustomer(Customer customer) {
+ // this.customer = null;
+ }
+
+ public void processShipment(String order) {
+ System.out.println("OSGiShipperComponentImpl.processShipment, customer is " + customer);
+ customer.notifyShipment(order + ", shipped (" + shipperName + ")");
+ }
+
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiShipperComponentImpl bundle ");
+
+ Object prop = context.getProperties().get("shipperName");
+ if (prop instanceof String[])
+ shipperName = ((String [])prop)[0];
+
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiShipperComponentImpl bundle ");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperFactoryImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperFactoryImpl.java
new file mode 100644
index 0000000000..ef989d6fcf
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperFactoryImpl.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+import java.util.Hashtable;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+
+
+/**
+ * This class implements the Shipper service component.
+ */
+public class OSGiShipperFactoryImpl implements BundleActivator, ServiceFactory {
+
+ private BundleContext bundleContext;
+
+ public OSGiShipperFactoryImpl() {
+
+ }
+
+
+ public void start(BundleContext bc) {
+
+ this.bundleContext = bc;
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("shipperName", "RoyalMail");
+ bc.registerService(Shipper.class.getName(), this, props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("shipperName", "ParcelForce");
+ bc.registerService(Shipper.class.getName(), this, props2);
+ }
+
+
+
+
+ public void stop(BundleContext context) throws Exception {
+
+ }
+
+
+ public Object getService(Bundle bundle, ServiceRegistration reg) {
+ OSGiShipperImpl shipper = new OSGiShipperImpl(false);
+ shipper.start(bundleContext);
+ OSGiStatelessShipperServiceImpl shipperService = new OSGiStatelessShipperServiceImpl(shipper,
+ (String)reg.getReference().getProperty("shipperName"));
+ return shipperService;
+ }
+
+ public void ungetService(Bundle arg0, ServiceRegistration arg1, Object arg2) {
+
+ }
+
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperImpl.java
new file mode 100644
index 0000000000..effae8c246
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperImpl.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+import java.util.Hashtable;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component.
+ */
+public class OSGiShipperImpl extends OSGiBundleImpl {
+
+ protected Customer customer;
+
+
+ public OSGiShipperImpl() {
+
+ super(new String[]{"customer"}, null);
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("shipperName", "RoyalMail");
+ registerService(new OSGiShipperServiceImpl(this, "RoyalMail"),
+ "supplychain.shipper.Shipper", props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("shipperName", "ParcelForce");
+ registerService(
+ new OSGiShipperServiceImpl(this, "ParcelForce"),
+ "supplychain.shipper.Shipper", props2);
+ }
+
+ // Used only by service factories
+ public OSGiShipperImpl(boolean ignore) {
+
+ super(new String[]{"customer"}, null);
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperServiceImpl.java
new file mode 100644
index 0000000000..4effadf208
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+/**
+ * This class implements the Shipper service.
+ */
+public class OSGiShipperServiceImpl implements Shipper {
+
+ private OSGiShipperImpl shipperImpl;
+
+ private String shipperName;
+
+ OSGiShipperServiceImpl(OSGiShipperImpl shipperImpl, String shipperName) {
+ this.shipperImpl = shipperImpl;
+ this.shipperName = shipperName;
+ }
+
+ public void processShipment(String order) {
+
+ System.out.println("Shipper.submitOrder, warehouse is " + shipperImpl.customer);
+ shipperImpl.customer.notifyShipment(order + ", shipped (" + shipperName + ")");
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperComponentImpl.java
new file mode 100644
index 0000000000..13bce67bb4
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperComponentImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+import org.osoa.sca.annotations.Scope;
+
+
+/**
+ * This class implements the Shipper service component.
+ */
+@Scope("STATELESS")
+public class OSGiStatelessShipperComponentImpl extends OSGiShipperComponentImpl {
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperServiceImpl.java
new file mode 100644
index 0000000000..071a131f40
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiStatelessShipperServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+import org.osoa.sca.annotations.Scope;
+
+
+/**
+ * This class implements the Shipper service.
+ */
+@Scope("STATELESS")
+public class OSGiStatelessShipperServiceImpl extends OSGiShipperServiceImpl {
+
+ public OSGiStatelessShipperServiceImpl(OSGiShipperImpl shipperImpl, String shipperName) {
+ super(shipperImpl, shipperName);
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperImpl.java
new file mode 100644
index 0000000000..6ebd1f2894
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperImpl.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.customer.Customer;
+
+/**
+ * This class implements the Shipper service component.
+ */
+public class OSGiVersionedShipperImpl extends OSGiBundleImpl {
+
+ protected Customer customer;
+
+ private int version;
+
+
+ public OSGiVersionedShipperImpl() {
+
+ super(new String[]{"customer"}, null);
+ }
+
+ protected void started(BundleContext bc) {
+
+ String jarFile = bc.getBundle().getLocation();
+ if (jarFile.endsWith("1.jar")) version = 1;
+ else if (jarFile.endsWith("2.jar")) version = 2;
+
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("shipperName", "RoyalMail");
+ props1.put("component.service.name", "ShipperComponent"+version+"/ShipperService1");
+ bc.registerService("supplychain.shipper.Shipper",
+ new OSGiVersionedShipperServiceImpl(this, "RoyalMail", version),
+ props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("shipperName", "ParcelForce");
+ props2.put("component.service.name", "ShipperComponent"+version+"/ShipperService2");
+ bc.registerService("supplychain.shipper.Shipper",
+ new OSGiVersionedShipperServiceImpl(this, "ParcelForce", version),
+ props2);
+
+ try {
+ ServiceReference[] refs = bc.getServiceReferences(Customer.class.getName(),
+ "(component.service.name=CustomerComponent" + version + "/CustomerService)");
+ if (refs != null && refs.length > 0) {
+ customer = (Customer) bc.getService(refs[0]);
+ }
+ } catch (InvalidSyntaxException e) {
+ }
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperServiceImpl.java
new file mode 100644
index 0000000000..b66961b1c2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperServiceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+
+/**
+ * This class implements the Shipper service.
+ */
+public class OSGiVersionedShipperServiceImpl implements Shipper {
+
+ private OSGiVersionedShipperImpl shipperImpl;
+
+ private String shipperName;
+
+ private int version;
+
+ OSGiVersionedShipperServiceImpl(OSGiVersionedShipperImpl shipperImpl, String shipperName, int version) {
+ this.shipperImpl = shipperImpl;
+ this.shipperName = shipperName;
+ this.version = version;
+ }
+
+ public void processShipment(String order) {
+
+ System.out.println("Shipper.processShipment, version " + version + " customer is " + shipperImpl.customer);
+ shipperImpl.customer.notifyShipment(order + ", shipped (" + shipperName + ")");
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/Shipper.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/Shipper.java
new file mode 100644
index 0000000000..2514928c10
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/shipper/Shipper.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.shipper;
+
+/**
+ * This is the business interface of the Shipper service component.
+ */
+public interface Shipper {
+
+ public void processShipment(String order);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java
new file mode 100644
index 0000000000..9edf3567e5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component.
+ */
+@Service(Warehouse.class)
+@Scope("STATELESS")
+public class JavaWarehouseComponentImpl implements Warehouse {
+
+ private Shipper shipper;
+
+ @Reference
+ public void setShipper(Shipper shipper) {
+ this.shipper = shipper;
+ }
+
+ public void fulfillOrder(String order) {
+ System.out.println("JavaWarehouseComponentImpl.fulfillOrder : shipper is " + shipper);
+
+ shipper.processShipment(order + ", fulfilled");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseWithQueryComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseWithQueryComponentImpl.java
new file mode 100644
index 0000000000..659f16be7f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseWithQueryComponentImpl.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component.
+ */
+@Service(interfaces={Warehouse.class, WarehouseQuery.class})
+@Scope("COMPOSITE")
+public class JavaWarehouseWithQueryComponentImpl implements Warehouse, WarehouseQuery {
+
+ private Shipper shipper;
+
+ @Reference
+ public void setShipper(Shipper shipper) {
+ this.shipper = shipper;
+ }
+
+ public void fulfillOrder(String order) {
+ System.out.println("JavaWarehouseComponentImpl.fulfillOrder : shipper is " + shipper);
+
+ shipper.processShipment(order + ", fulfilled");
+ }
+
+ public boolean isAvailable(String order) {
+ return true;
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java
new file mode 100644
index 0000000000..7c9e102fd2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+
+import org.osgi.service.component.ComponentContext;
+
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component.
+ */
+
+public class OSGiWarehouseComponentImpl implements Warehouse {
+
+ private Shipper shipper;
+
+ protected void setShipper(Shipper shipper) {
+ this.shipper = shipper;
+ }
+
+ protected void unsetShipper(Shipper shipper) {
+ // this.shipper = null;
+ }
+
+ public void fulfillOrder(String order) {
+ System.out.println("OSGiWarehouseComponentImpl.fulfillOrder : shipper is " + shipper);
+
+ shipper.processShipment(order + ", fulfilled");
+
+ }
+
+ protected void activate(ComponentContext context){
+ System.out.println("Activated OSGiWarehouseComponentImpl ");
+ }
+
+ protected void deactivate(ComponentContext context){
+ System.out.println("Deactivated OSGiWarehouseComponentImpl ");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java
new file mode 100644
index 0000000000..bb04ff42e0
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleContext;
+
+import supplychain.OSGiBundleImpl;
+import supplychain.shipper.Shipper;
+
+/**
+ * This class implements the Warehouse service component.
+ */
+
+public class OSGiWarehouseImpl extends OSGiBundleImpl implements Warehouse {
+
+ protected Shipper shipper;
+ private OSGiWarehouseServiceImpl warehouseService1;
+ private OSGiWarehouseServiceImpl warehouseService2;
+
+ public OSGiWarehouseImpl() {
+ super(new String[]{"shipper"}, null);
+
+ Hashtable<String, Object> props1 = new Hashtable<String, Object>();
+ props1.put("component.name", "WarehouseComponent1");
+ warehouseService1 = new OSGiWarehouseServiceImpl(this, 2);
+ registerService(warehouseService1,
+ "supplychain.warehouse.Warehouse", props1);
+
+ Hashtable<String, Object> props2 = new Hashtable<String, Object>();
+ props2.put("component.name", "WarehouseComponent2");
+ warehouseService2 = new OSGiWarehouseServiceImpl(this, 1);
+ registerService(warehouseService2,
+ "supplychain.warehouse.Warehouse", props2);
+ }
+
+ protected void started(BundleContext bc) {
+ warehouseService1.started(bc);
+ warehouseService2.started(bc);
+ }
+
+ public void fulfillOrder(String order) {
+ System.out.println("OSGiWarehouseImpl.fulfillOrder : shipper is " + shipper);
+
+ shipper.processShipment(order + ", fulfilled");
+
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseServiceImpl.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseServiceImpl.java
new file mode 100644
index 0000000000..3317816557
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseServiceImpl.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+
+import supplychain.shipper.Shipper;
+
+
+/**
+ * This class implements the Warehouse service.
+ */
+public class OSGiWarehouseServiceImpl implements Warehouse {
+
+ private OSGiWarehouseImpl warehouseImpl;
+ private Shipper shipper;
+ private int shipperNum;
+
+
+ OSGiWarehouseServiceImpl(OSGiWarehouseImpl warehouseImpl, int shipperNum) {
+ this.warehouseImpl = warehouseImpl;
+ this.shipperNum = shipperNum;
+ }
+
+
+ protected void started(BundleContext bc) {
+ try {
+ ServiceReference[] refs = bc.getServiceReferences(Shipper.class.getName(),
+ "(component.service.name=ShipperComponent" + shipperNum + "/Shipper)");
+ if (refs != null && refs.length > 0) {
+ shipper = (Shipper) bc.getService(refs[0]);
+ }
+ } catch (InvalidSyntaxException e) {
+ }
+ }
+
+ public void fulfillOrder(String order) {
+ System.out.println("OSGiWarehouseImpl.fulfillOrder : shipper is " + warehouseImpl.shipper);
+
+ shipper.processShipment(order + ", fulfilled");
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/Warehouse.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/Warehouse.java
new file mode 100644
index 0000000000..6f1f6b8730
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/Warehouse.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+/**
+ * This is the business interface of the Warehouse service component.
+ */
+public interface Warehouse {
+
+ public void fulfillOrder(String order);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/WarehouseQuery.java b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/WarehouseQuery.java
new file mode 100644
index 0000000000..6d1ad76796
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/java/supplychain/warehouse/WarehouseQuery.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.warehouse;
+
+/**
+ * This is the business interface of the RetailerQuery service.
+ */
+public interface WarehouseQuery {
+
+ public boolean isAvailable(String order);
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackClient.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackClient.componentType
new file mode 100644
index 0000000000..71e248590b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackClient.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CallbackClient">
+ <interface.java interface="callback.client.CallbackClient"/>
+ </service>
+
+
+ <reference name="callbackService" >
+ <interface.java interface="callback.service.CallbackService"
+ callbackInterface="callback.client.CallbackCallback" />
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackService.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackService.componentType
new file mode 100644
index 0000000000..7c1125bbb5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/CallbackService.componentType
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CallbackService">
+ <interface.java interface="callback.service.CallbackService"
+ callbackInterface="callback.client.CallbackCallback"/>
+ </service>
+
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test1.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test1.composite
new file mode 100644
index 0000000000..8456b878f2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test1.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://callback"
+ name="CallbackTest">
+
+ <component name="CallbackClient">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="callback.CallbackClient">
+
+ <properties referenceCallback="callbackService">
+ <property name="component.name">CallbackClient</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="callbackService" target="CallbackService"/>
+ </component>
+
+ <component name="CallbackService">
+ <implementation.java class="callback.service.JavaCallbackServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test2.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test2.composite
new file mode 100644
index 0000000000..d5a47c6403
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test2.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://callback"
+ name="CallbackTest">
+
+ <component name="CallbackClient">
+ <implementation.java class="callback.client.JavaCallbackClientImpl"/>
+ <reference name="callbackService" target="CallbackService"/>
+ </component>
+
+
+ <component name="CallbackService">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="callback.CallbackService"
+ >
+ <properties serviceCallback="CallbackService">
+ <property name="component.name">CallbackClient</property>
+ </properties>
+
+ </implementation.osgi >
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test3.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test3.composite
new file mode 100644
index 0000000000..e6391d2159
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/callback/callback-test3.composite
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://callback"
+ name="CallbackTest">
+
+ <component name="CallbackClient">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="callback.CallbackClient"
+ />
+ <reference name="callbackService" target="CallbackService"/>
+ </component>
+
+
+ <component name="CallbackService">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="callback.CallbackService"
+ />
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalClient.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalClient.componentType
new file mode 100644
index 0000000000..c79ede815b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalClient.componentType
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="ConversationalClient">
+ <interface.java interface="conversation.client.ConversationalClient"/>
+ </service>
+
+
+ <reference name="conversationalReferenceClient" >
+ <interface.java interface="conversation.referenceclient.ConversationalReferenceClient" />
+ </reference>
+
+ <reference name="conversationalService" >
+ <interface.java interface="conversation.service.ConversationalService"
+ callbackInterface="conversation.client.ConversationalCallback" />
+ </reference>
+
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalReferenceClient.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalReferenceClient.componentType
new file mode 100644
index 0000000000..04cc73b85c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalReferenceClient.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+
+ <service name="ConversationalReferenceClient">
+ <interface.java interface="conversation.referenceclient.ConversationalReferenceClient"/>
+ </service>
+
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalService.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalService.componentType
new file mode 100644
index 0000000000..9ece700efe
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/ConversationalService.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="ConversationalService">
+ <interface.java interface="conversation.service.ConversationalService"
+ callbackInterface="conversation.client.ConversationalCallback" />
+ </service>
+
+
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/conversation-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/conversation-test.composite
new file mode 100644
index 0000000000..52bc43478d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/conversation/conversation-test.composite
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://conversations"
+ name="ConversationalITest">
+
+ <component name="ConversationalStatelessClientStatelessService">
+ <!-- <implementation.java class="conversation.ConversationalClientStatelessImpl"/> -->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalClient"
+ classes="conversation.client.ConversationalClientStatelessImpl">
+
+ <properties service="ConversationalClient">
+ <property name="component.name">ConversationalStatelessClientStatelessService</property>
+ </properties>
+ <properties reference="conversationalReferenceClient">
+ <property name="component.name">ConversationalReferenceClient</property>
+ </properties>
+ <properties reference="conversationalService">
+ <property name="component.name">ConversationalServiceStateless</property>
+ </properties>
+ <properties serviceCallback="$callback$.conversationalService">
+ <property name="component.name">ConversationalStatelessClientStatelessService</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="conversationalReferenceClient" target="ConversationalReferenceClient/ConversationalReferenceClient"/>
+ <reference name="conversationalService" target="ConversationalServiceStateless/ConversationalService"/>
+ </component>
+
+ <component name="ConversationalStatelessClientStatefulService">
+ <!--<implementation.java class="conversation.ConversationalClientStatelessImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalClient"
+ classes="conversation.client.ConversationalClientStatelessImpl">
+
+ <properties service="ConversationalClient">
+ <property name="component.name">ConversationalStatelessClientStatefulService</property>
+ </properties>
+ <properties reference="conversationalReferenceClient">
+ <property name="component.name">ConversationalReferenceClient</property>
+ </properties>
+ <properties reference="conversationalService">
+ <property name="component.name">ConversationalServiceStateful</property>
+ </properties>
+ <properties serviceCallback="$callback$.conversationalService">
+ <property name="component.name">ConversationalStatelessClientStatefulService</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="conversationalReferenceClient" target="ConversationalReferenceClient/ConversationalReferenceClient"/>
+ <reference name="conversationalService" target="ConversationalServiceStateful/ConversationalService"/>
+ </component>
+
+ <component name="ConversationalStatefulClientStatelessService">
+ <!--<implementation.java class="conversation.ConversationalClientStatefulImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalClient"
+ classes="conversation.client.ConversationalClientStatefulImpl">
+
+ <properties service="ConversationalClient">
+ <property name="component.name">ConversationalStatefulClientStatelessService</property>
+ </properties>
+ <properties reference="conversationalReferenceClient">
+ <property name="component.name">ConversationalReferenceClient</property>
+ </properties>
+ <properties reference="conversationalService">
+ <property name="component.name">ConversationalServiceStateless</property>
+ </properties>
+ <properties serviceCallback="$callback$.conversationalService">
+ <property name="component.name">ConversationalStatefulClientStatelessService</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="conversationalReferenceClient" target="ConversationalReferenceClient/ConversationalReferenceClient"/>
+ <reference name="conversationalService" target="ConversationalServiceStateless/ConversationalService"/>
+ </component>
+
+ <component name="ConversationalStatefulClientStatefulService">
+ <!--<implementation.java class="conversation.ConversationalClientStatefulImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalClient"
+ classes="conversation.client.ConversationalClientStatefulImpl">
+
+ <properties service="ConversationalClient">
+ <property name="component.name">ConversationalStatefulClientStatefulService</property>
+ </properties>
+ <properties reference="conversationalReferenceClient">
+ <property name="component.name">ConversationalReferenceClient</property>
+ </properties>
+ <properties reference="conversationalService">
+ <property name="component.name">ConversationalServiceStateful</property>
+ </properties>
+ <properties serviceCallback="$callback$.conversationalService">
+ <property name="component.name">ConversationalStatefulClientStatefulService</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="conversationalReferenceClient" target="ConversationalReferenceClient/ConversationalReferenceClient"/>
+ <reference name="conversationalService" target="ConversationalServiceStateful/ConversationalService"/>
+ </component>
+
+ <component name="ConversationalReferenceClient">
+ <!--<implementation.java class="conversation.ConversationalReferenceClientImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalReferenceClient"
+ classes="conversation.referenceclient.ConversationalReferenceClientImpl"
+ />
+
+ </component>
+
+ <component name="ConversationalServiceStateful">
+ <!--<implementation.java class="conversation.ConversationalServiceStatefulImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalService"
+ classes="conversation.service.ConversationalServiceStatefulImpl">
+
+ <properties service="ConversationalService">
+ <property name="component.name">ConversationalServiceStateful</property>
+ </properties>
+ </implementation.osgi>
+
+ </component>
+
+ <component name="ConversationalServiceStateless">
+ <!--<implementation.java class="conversation.ConversationalServiceStatelessImpl"/>-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="conversation.ConversationalService"
+ classes="conversation.service.ConversationalServiceStatelessImpl">
+
+ <properties service="ConversationalService">
+ <property name="component.name">ConversationalServiceStateless</property>
+ </properties>
+ </implementation.osgi>
+
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Customer.componentType
new file mode 100644
index 0000000000..1fd551be3b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Retailer.componentType
new file mode 100644
index 0000000000..5599c44bc3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Retailer.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Customer.componentType
new file mode 100644
index 0000000000..1fd551be3b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Retailer.componentType
new file mode 100644
index 0000000000..5599c44bc3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Retailer.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/factory-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/factory-ds-test.composite
new file mode 100644
index 0000000000..0b8d2e5851
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/ds/factory-ds-test.composite
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.customer.Customer"
+ classes="supplychain.customer.OSGiStatelessCustomerComponentImpl" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1"/>
+
+ <reference name="retailer2" target="RetailerComponent2" />
+
+ <reference name="retailer3" target="RetailerComponent3" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ </implementation.osgi>
+ <service name="Retailer"/>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >ebay.com</property>
+ </component>
+
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent2" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.shipper.Shipper"
+ classes="supplychain.shipper.OSGiStatelessShipperComponentImpl" >
+
+ <properties service="Shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >RoyalMail</property>
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.factory.supplychain.shipper.Shipper"
+ classes="supplychain.shipper.OSGiStatelessShipperComponentImpl" >
+
+ <properties service="Shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/factory-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/factory-test.composite
new file mode 100644
index 0000000000..87370a6df4
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/factory/factory-test.composite
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="factory.supplychain.customer.Customer"
+ classes="supplychain.customer.OSGiStatelessCustomerImpl" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1"/>
+
+ <reference name="retailer2" target="RetailerComponent2" />
+
+ <reference name="retailer3" target="RetailerComponent3" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="factory.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ </implementation.osgi>
+ <service name="Retailer"/>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="factory.supplychain.retailer.Retailer">
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="factory.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >ebay.com</property>
+ </component>
+
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="factory.supplychain.shipper.Shipper"
+ classes="supplychain.shipper.OSGiStatelessShipperServiceImpl" >
+
+ <properties service="Shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+ </component>
+
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/Greetings.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/Greetings.componentType
new file mode 100644
index 0000000000..127349eacf
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/Greetings.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Greetings">
+ <interface.java interface="helloworld.Greetings"/>
+ </service>
+
+
+ <reference name="greetingsService" >
+ <interface.java interface="helloworld.Greetings" />
+ </reference>
+
+</componentType> \ No newline at end of file
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/HelloWorld.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/HelloWorld.componentType
new file mode 100644
index 0000000000..7e3810c458
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/helloworld/HelloWorld.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="OSGiHelloWorld">
+ <interface.java interface="helloworld.HelloWorld"/>
+ </service>
+
+
+ <reference name="helloWorldWS" >
+ <!-- interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" / -->
+ <interface.java interface="helloworld.ws.HelloWorld" />
+ </reference>
+
+</componentType> \ No newline at end of file
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Customer.componentType
new file mode 100644
index 0000000000..fb9a112d18
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Customer.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailerQuery">
+ <interface.java interface="supplychain.retailer.RetailerQuery"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Retailer.componentType
new file mode 100644
index 0000000000..ee732b5efc
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Retailer.componentType
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerQuery">
+ <interface.java interface="supplychain.retailer.RetailerQuery"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <reference name="warehouseQuery">
+ <interface.java interface="supplychain.warehouse.WarehouseQuery"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Warehouse.componentType
new file mode 100644
index 0000000000..b1723660d7
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/Warehouse.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <service name="WarehouseQuery">
+ <interface.java interface="supplychain.warehouse.WarehouseQuery"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Customer.componentType
new file mode 100644
index 0000000000..fb9a112d18
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Customer.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailerQuery">
+ <interface.java interface="supplychain.retailer.RetailerQuery"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Retailer.componentType
new file mode 100644
index 0000000000..ee732b5efc
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Retailer.componentType
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerQuery">
+ <interface.java interface="supplychain.retailer.RetailerQuery"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <reference name="warehouseQuery">
+ <interface.java interface="supplychain.warehouse.WarehouseQuery"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Warehouse.componentType
new file mode 100644
index 0000000000..b1723660d7
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/Warehouse.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <service name="WarehouseQuery">
+ <interface.java interface="supplychain.warehouse.WarehouseQuery"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/interfaces-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/interfaces-ds-test.composite
new file mode 100644
index 0000000000..5172cbe21e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/ds/interfaces-ds-test.composite
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.interfaces.supplychain.customer.Customer"
+ />
+ <reference name="retailer" target="RetailerComponent/Retailer"/>
+ <reference name="retailerQuery" target="RetailerComponent/RetailerQuery"/>
+
+ </component>
+
+ <component name="RetailerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.interfaces.supplychain.retailer.Retailer"
+ />
+ <reference name="warehouse" target="WarehouseComponent/Warehouse"/>
+ <reference name="warehouseQuery" target="WarehouseComponent/WarehouseQuery"/>
+ </component>
+
+ <component name="WarehouseComponent">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseWithQueryComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent" />
+ </component>
+
+ <component name="ShipperComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.interfaces.supplychain.shipper.Shipper"
+ />
+ <reference name="customer" target="CustomerComponent" />
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/interfaces-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/interfaces-test.composite
new file mode 100644
index 0000000000..b7591e732d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/interfaces/interfaces-test.composite
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="interfaces.supplychain.customer.Customer"
+ />
+ <reference name="retailer" target="RetailerComponent/Retailer"/>
+ <reference name="retailerQuery" target="RetailerComponent/RetailerQuery"/>
+
+ </component>
+
+ <component name="RetailerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="interfaces.supplychain.retailer.Retailer"
+ />
+ <reference name="warehouse" target="WarehouseComponent/Warehouse"/>
+ <reference name="warehouseQuery" target="WarehouseComponent/WarehouseQuery"/>
+ </component>
+
+ <component name="WarehouseComponent">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseWithQueryComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent" />
+ </component>
+
+ <component name="ShipperComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="interfaces.supplychain.shipper.Shipper"
+ />
+ <reference name="customer" target="CustomerComponent" />
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackClient.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackClient.mf
new file mode 100644
index 0000000000..cf8717fcf5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackClient.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: CallbackClient
+Bundle-SymbolicName: callback.CallbackClient
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, callback.service
+Export-Package: callback.client
+Bundle-Activator: callback.client.OSGiCallbackClientImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackService.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackService.mf
new file mode 100644
index 0000000000..785212fa6d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/callback/CallbackService.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: CallbackService
+Bundle-SymbolicName: callback.CallbackService
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, callback.client
+Export-Package: callback.service
+Bundle-Activator: callback.service.OSGiCallbackServiceImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalClient.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalClient.mf
new file mode 100644
index 0000000000..7a06030e32
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalClient.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ConversationTest
+Bundle-SymbolicName: conversation.ConversationalClient
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osoa.sca, org.osoa.sca.annotations,
+ conversation.service, conversation.referenceclient
+Export-Package: conversation.client
+Bundle-Activator: conversation.client.ConversationalClientActivator
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalReferenceClient.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalReferenceClient.mf
new file mode 100644
index 0000000000..5c39b53b0a
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalReferenceClient.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ConversationTest
+Bundle-SymbolicName: conversation.ConversationalReferenceClient
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osoa.sca, org.osoa.sca.annotations,
+ conversation.service
+Export-Package: conversation.referenceclient
+Bundle-Activator: conversation.referenceclient.ConversationalReferenceClientActivator
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalService.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalService.mf
new file mode 100644
index 0000000000..b8bb809319
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/conversation/ConversationalService.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ConversationTest
+Bundle-SymbolicName: conversation.ConversationalService
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osoa.sca, org.osoa.sca.annotations,
+ conversation.client
+Export-Package: conversation.service
+Bundle-Activator: conversation.service.ConversationalServiceActivator
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Customer.mf
new file mode 100644
index 0000000000..26f32fe617
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Customer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: factory.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer
+Export-Package: supplychain.customer
+Bundle-Activator: supplychain.customer.OSGiCustomerFactoryImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Retailer.mf
new file mode 100644
index 0000000000..1b9e0e847e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Retailer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: factory.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Bundle-Activator: supplychain.retailer.OSGiRetailerImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Shipper.mf
new file mode 100644
index 0000000000..6066a38f29
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: factory.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer
+Export-Package: supplychain.shipper
+Bundle-Activator: supplychain.shipper.OSGiShipperFactoryImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.mf
new file mode 100644
index 0000000000..777edd3f7d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.factory.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer
+Export-Package: supplychain.customer
+Service-Component: osgi/factory/ds/Customer.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.xml
new file mode 100644
index 0000000000..d8adaa2ba3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent" >
+ <implementation class="supplychain.customer.OSGiCustomerComponentImpl" />
+ <service servicefactory="true" >
+ <provide interface="supplychain.customer.Customer" />
+ </service>
+ <reference
+ name="retailer1"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer1"
+ unbind="unsetRetailer1"
+ target="(retailerName=amazon.com)"
+ policy="dynamic"
+ />
+ <reference
+ name="retailer2"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer2"
+ unbind="unsetRetailer2"
+ target="(retailerName=play.com)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer.mf
new file mode 100644
index 0000000000..e0bd9d8c10
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.factory.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Service-Component: osgi/factory/ds/Retailer1.xml, osgi/factory/ds/Retailer2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer1.xml
new file mode 100644
index 0000000000..6005ae785c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent1" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service servicefactory="true">
+ <provide interface="supplychain.retailer.Retailer" />
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ />
+ <property name="retailerName">amazon.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer2.xml
new file mode 100644
index 0000000000..6f0b79ebc2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent2" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service servicefactory="true">
+ <provide interface="supplychain.retailer.Retailer" />
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ />
+ <property name="retailerName">play.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper.mf
new file mode 100644
index 0000000000..d4b461460e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.factory.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer
+Export-Package: supplychain.shipper
+Service-Component: osgi/factory/ds/Shipper1.xml, osgi/factory/ds/Shipper2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper1.xml
new file mode 100644
index 0000000000..bb15e6e3aa
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper1.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent1" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service servicefactory="true">
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper2.xml
new file mode 100644
index 0000000000..7591201b8c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent2">
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service servicefactory="true">
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">ParcelForce</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.mf
new file mode 100644
index 0000000000..0e844fab99
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: ds.factory.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.shipper
+Export-Package: supplychain.warehouse
+Service-Component: osgi/factory/ds/Warehouse.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.xml
new file mode 100644
index 0000000000..fc86a76784
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Customer.mf
new file mode 100644
index 0000000000..a8a87c5c8c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Customer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: interfaces.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer
+Export-Package: supplychain.customer
+Bundle-Activator: supplychain.customer.OSGiCustomerWithQueryImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Retailer.mf
new file mode 100644
index 0000000000..05bbf4db88
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Retailer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: interfaces.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Bundle-Activator: supplychain.retailer.OSGiRetailerWithQueryImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Shipper.mf
new file mode 100644
index 0000000000..a12d1a21ea
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: interfaces.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer
+Export-Package: supplychain.shipper
+Bundle-Activator: supplychain.shipper.OSGiShipperImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.mf
new file mode 100644
index 0000000000..2214db11a6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.interfaces.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer
+Export-Package: supplychain.customer
+Service-Component: osgi/interfaces/ds/Customer.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.xml
new file mode 100644
index 0000000000..8d44067992
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent" immediate="true">
+ <implementation class="supplychain.customer.OSGiCustomerWithQueryComponentImpl" />
+ <service>
+ <provide interface="supplychain.customer.Customer"/>
+ </service>
+ <reference
+ name="retailer"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer"
+ unbind="unsetRetailer"
+ target="(component.service.name=RetailerComponent/Retailer)"
+ policy="dynamic"
+ />
+
+ <reference
+ name="retailerQuery"
+ interface="supplychain.retailer.RetailerQuery"
+ bind="setRetailerQuery"
+ unbind="unsetRetailerQuery"
+ target="(component.service.name=RetailerComponent/RetailerQuery)"
+ policy="dynamic"
+ />
+
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.mf
new file mode 100644
index 0000000000..60c0fb3fd3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.interfaces.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Service-Component: osgi/interfaces/ds/Retailer.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.xml
new file mode 100644
index 0000000000..ca1392d2b8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerWithQueryComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ <provide interface="supplychain.retailer.RetailerQuery"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ />
+ <reference
+ name="supplychain.warehouse.WarehouseQuery"
+ interface="supplychain.warehouse.WarehouseQuery"
+ bind="setWarehouseQuery"
+ unbind="unsetWarehouseQuery"
+ />
+ <property name="retailerName">amazon.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.mf
new file mode 100644
index 0000000000..7c9f67c36d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.interfaces.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer
+Export-Package: supplychain.shipper
+Service-Component: osgi/interfaces/ds/Shipper.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.xml
new file mode 100644
index 0000000000..760c761666
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/passbyref/Greetings.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/passbyref/Greetings.mf
new file mode 100644
index 0000000000..7d56770311
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/passbyref/Greetings.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Greetings
+Bundle-SymbolicName: passbyref.helloworld.Greetings
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework
+Export-Package: helloworld
+Bundle-Activator: helloworld.OSGiGreetingsImpl
+
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ManagedStockQuoteFactory.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ManagedStockQuoteFactory.mf
new file mode 100644
index 0000000000..321bdc713f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ManagedStockQuoteFactory.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StockQuote
+Bundle-SymbolicName: stockquote.ManagedStockQuoteFactory
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.cm
+Export-Package: stockquote
+Bundle-Activator: stockquote.OSGiManagedStockQuoteFactoryImpl
+
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuote.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuote.mf
new file mode 100644
index 0000000000..66f98011cb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuote.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StockQuote
+Bundle-SymbolicName: stockquote.StockQuote
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.cm
+Export-Package: stockquote
+Bundle-Activator: stockquote.OSGiStockQuoteImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuoteFactory.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuoteFactory.mf
new file mode 100644
index 0000000000..6874a66db9
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuoteFactory.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StockQuote
+Bundle-SymbolicName: stockquote.StockQuoteFactory
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.cm
+Export-Package: stockquote
+Bundle-Activator: stockquote.OSGiStockQuoteFactoryImpl
+
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.mf
new file mode 100644
index 0000000000..47d290eb1a
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.mf
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StockQuote
+Bundle-SymbolicName: ds.stockquote.StockQuote
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.component, org.osgi.service.cm
+Export-Package: stockquote
+Service-Component: osgi/properties/ds/StockQuote.xml
+
+
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.xml
new file mode 100644
index 0000000000..c7f13a50a7
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="StockQuoteComponent" immediate="true">
+ <implementation class="stockquote.OSGiStockQuoteComponentImpl" />
+ <service>
+ <provide interface="stockquote.StockQuote"/>
+ </service>
+ <property name="currency">GBP</property>
+ <property name="exchangeRate" type="Double">1.0</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.mf
new file mode 100644
index 0000000000..f4c102c4f0
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.mf
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StockQuote
+Bundle-SymbolicName: ds.stockquote.StockQuoteFactory
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.component, org.osgi.service.cm
+Export-Package: stockquote
+Service-Component: osgi/properties/ds/StockQuoteFactory.xml
+
+
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.xml
new file mode 100644
index 0000000000..cbebf7eec2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="StockQuoteComponent" >
+ <implementation class="stockquote.OSGiStockQuoteComponentImpl" />
+ <service servicefactory="true" >
+ <provide interface="stockquote.StockQuote" />
+ </service>
+ <property name="currency">GBP</property>
+ <property name="exchangeRate" type="Double">1.0</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.mf
new file mode 100644
index 0000000000..6a3c845cca
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.mf
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: HelloWorldClient
+Bundle-SymbolicName: ds.helloworld.sdo.HelloWorldClient
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.component,
+ org.osoa.sca, org.osoa.sca.annotations,
+ commonj.sdo, commonj.sdo.helper,
+ org.apache.tuscany.sdo.helper, org.apache.tuscany.sdo.impl, org.apache.tuscany.sdo.model, org.apache.tuscany.sdo.model.impl,
+ org.eclipse.emf.ecore, org.eclipse.emf.ecore.util, org.eclipse.emf.ecore.impl,
+ helloworld.sdo
+Export-Package: helloworld.sdo.client
+Service-Component: osgi/sdo/ds/HelloWorldClient.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.xml
new file mode 100644
index 0000000000..cb6345432f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldClient.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="HelloWorldClientComponent" immediate="true">
+ <implementation class="helloworld.sdo.client.HelloWorldClientComponent" />
+ <service>
+ <provide interface="helloworld.sdo.client.HelloWorldClient"/>
+ </service>
+ <reference
+ name="helloWorldService"
+ interface="helloworld.sdo.HelloWorldService"
+ bind="setHelloWorldService"
+ unbind="unsetHelloWorldService"
+ target="(component.service.name=JavaHelloWorldServiceComponent/HelloWorldService)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.mf
new file mode 100644
index 0000000000..89871fa8f6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.mf
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: HelloWorldService
+Bundle-SymbolicName: ds.helloworld.sdo.HelloWorldService
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework, org.osgi.service.component,
+ org.osoa.sca, org.osoa.sca.annotations,
+ commonj.sdo, commonj.sdo.helper,
+ org.apache.tuscany.sdo.helper, org.apache.tuscany.sdo.impl, org.apache.tuscany.sdo.model, org.apache.tuscany.sdo.model.impl,
+ org.eclipse.emf.ecore, org.eclipse.emf.ecore.util, org.eclipse.emf.ecore.impl
+Export-Package: helloworld.sdo
+Service-Component: osgi/sdo/ds/HelloWorldService.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.xml
new file mode 100644
index 0000000000..d968d1ffc5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/sdo/ds/HelloWorldService.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="HelloWorldServiceComponent" immediate="true">
+ <implementation class="helloworld.sdo.HelloWorldServiceComponent" />
+ <service>
+ <provide interface="helloworld.sdo.HelloWorldService"/>
+ </service>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Customer.mf
new file mode 100644
index 0000000000..fc762df8d5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Customer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: services.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer
+Export-Package: supplychain.customer
+Bundle-Activator: supplychain.customer.OSGiCustomerImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Retailer.mf
new file mode 100644
index 0000000000..02e42bc010
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Retailer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: services.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Bundle-Activator: supplychain.retailer.OSGiRetailerImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Shipper.mf
new file mode 100644
index 0000000000..390367b99b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: services.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer
+Export-Package: supplychain.shipper
+Bundle-Activator: supplychain.shipper.OSGiShipperImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Warehouse.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Warehouse.mf
new file mode 100644
index 0000000000..4715cbd976
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/Warehouse.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: services.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.shipper
+Export-Package: supplychain.warehouse
+Bundle-Activator: supplychain.warehouse.OSGiWarehouseImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.mf
new file mode 100644
index 0000000000..932fb8a483
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.services.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer
+Export-Package: supplychain.customer
+Service-Component: osgi/services/ds/Customer.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.xml
new file mode 100644
index 0000000000..b10d0416dc
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent" immediate="true">
+ <implementation class="supplychain.customer.OSGiCustomerComponentImpl" />
+ <service>
+ <provide interface="supplychain.customer.Customer"/>
+ </service>
+ <reference
+ name="retailer1"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer1"
+ unbind="unsetRetailer1"
+ target="(retailerName=amazon.com)"
+ policy="dynamic"
+ />
+ <reference
+ name="retailer2"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer2"
+ unbind="unsetRetailer2"
+ target="(retailerName=play.com)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer.mf
new file mode 100644
index 0000000000..c799f31606
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.services.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Service-Component: osgi/services/ds/Retailer1.xml, osgi/services/ds/Retailer2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer1.xml
new file mode 100644
index 0000000000..db68d7e333
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent1" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ />
+ <property name="retailerName">amazon.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer2.xml
new file mode 100644
index 0000000000..1aea3cf669
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent2" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ />
+ <property name="retailerName">play.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper.mf
new file mode 100644
index 0000000000..106bd1b6aa
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.services.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer
+Export-Package: supplychain.shipper
+Service-Component: osgi/services/ds/Shipper1.xml, osgi/services/ds/Shipper2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper1.xml
new file mode 100644
index 0000000000..1e3c915a59
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper1.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent1" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper2.xml
new file mode 100644
index 0000000000..d7d0b41f5e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent2" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">ParcelForce</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse.mf
new file mode 100644
index 0000000000..81c51e6804
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: ds.services.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.shipper
+Export-Package: supplychain.warehouse
+Service-Component: osgi/services/ds/Warehouse1.xml, osgi/services/ds/Warehouse2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse1.xml
new file mode 100644
index 0000000000..ca50b554df
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent1" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse2.xml
new file mode 100644
index 0000000000..14658127f8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent2" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer1.mf
new file mode 100644
index 0000000000..335bc419c1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer1.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: version.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.customer;version="1.0.0"
+Bundle-Activator: supplychain.customer.OSGiVersionedCustomerImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer2.mf
new file mode 100644
index 0000000000..a68b9d6dbb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Customer2.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: version.supplychain.customer.Customer
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer;version="[2.0.0,3.0.0)"
+Export-Package: supplychain.customer;version="2.0.0"
+Bundle-Activator: supplychain.customer.OSGiVersionedCustomerImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer1.mf
new file mode 100644
index 0000000000..02f79c15f3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer1.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: version.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer;version="1.0.0"
+Bundle-Activator: supplychain.retailer.OSGiVersionedRetailerImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer2.mf
new file mode 100644
index 0000000000..8428b08d96
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Retailer2.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: version.supplychain.retailer.Retailer
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer;version="2.0.0"
+Bundle-Activator: supplychain.retailer.OSGiVersionedRetailerImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper1.mf
new file mode 100644
index 0000000000..c81bf00d00
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper1.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: version.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.shipper;version="1.0.0"
+Bundle-Activator: supplychain.shipper.OSGiVersionedShipperImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper2.mf
new file mode 100644
index 0000000000..61c161617c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Shipper2.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: version.supplychain.shipper.Shipper
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer;version="[2.0.0,3.0.0)"
+Export-Package: supplychain.shipper;version="2.0.0"
+Bundle-Activator: supplychain.shipper.OSGiVersionedShipperImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse1.mf
new file mode 100644
index 0000000000..fd6a26a65f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse1.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: version.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.shipper;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.warehouse;version="1.0.0"
+Bundle-Activator: supplychain.warehouse.OSGiWarehouseImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse2.mf
new file mode 100644
index 0000000000..0168bc2435
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse2.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: version.supplychain.warehouse.Warehouse
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.shipper;version="2.0.0"
+Export-Package: supplychain.warehouse;version="2.0.0"
+Bundle-Activator: supplychain.warehouse.OSGiWarehouseImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer1.mf
new file mode 100644
index 0000000000..6674cdd7f2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer1.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.version.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.customer;version="1.0.0"
+Service-Component: osgi/version/ds/CustomerV1.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer2.mf
new file mode 100644
index 0000000000..72df35ef41
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer2.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.version.supplychain.customer.Customer
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer;version="[2.0.0,3.0.0)"
+Export-Package: supplychain.customer;version="2.0.0"
+Service-Component: osgi/version/ds/CustomerV2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV1.xml
new file mode 100644
index 0000000000..724c8132df
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV1.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent1" immediate="true">
+ <implementation class="supplychain.customer.OSGiCustomerComponentImpl" />
+ <service>
+ <provide interface="supplychain.customer.Customer"/>
+ </service>
+ <reference
+ name="retailer1"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer1"
+ unbind="unsetRetailer1"
+ target="(retailerName=amazon.com)"
+ policy="dynamic"
+ />
+ <reference
+ name="retailer2"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer2"
+ unbind="unsetRetailer2"
+ target="(retailerName=play.com)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV2.xml
new file mode 100644
index 0000000000..1e5035d949
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV2.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent2" immediate="true">
+ <implementation class="supplychain.customer.OSGiCustomerComponentImpl" />
+ <service>
+ <provide interface="supplychain.customer.Customer"/>
+ </service>
+ <reference
+ name="retailer1"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer1"
+ unbind="unsetRetailer1"
+ target="(retailerName=amazon.com)"
+ policy="dynamic"
+ />
+ <reference
+ name="retailer2"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer2"
+ unbind="unsetRetailer2"
+ target="(retailerName=play.com)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1.mf
new file mode 100644
index 0000000000..85bfd86422
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.version.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer;version="1.0.0"
+Service-Component: osgi/version/ds/Retailer1V1.xml, osgi/version/ds/Retailer2V1.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V1.xml
new file mode 100644
index 0000000000..6e51b3d6f2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V1.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent1.Retailer1" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent1/Warehouse)"
+ />
+ <property name="retailerName">amazon.com</property>
+ <property name="version">1</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V2.xml
new file mode 100644
index 0000000000..9a87758ec2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent2.Retailer1" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent2/Warehouse)"
+ />
+ <property name="retailerName">amazon.com</property>
+ <property name="version">2</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2.mf
new file mode 100644
index 0000000000..e134bd1061
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.version.supplychain.retailer.Retailer
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer;version="2.0.0"
+Service-Component: osgi/version/ds/Retailer1V2.xml, osgi/version/ds/Retailer2V2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V1.xml
new file mode 100644
index 0000000000..c19895bab1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V1.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent1.Retailer2" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent1/Warehouse)"
+ />
+ <property name="retailerName">play.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V2.xml
new file mode 100644
index 0000000000..707609d2c4
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent2.Retailer2" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent2/Warehouse)"
+ />
+ <property name="retailerName">play.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1.mf
new file mode 100644
index 0000000000..e084e5831a
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.version.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.shipper;version="1.0.0"
+Service-Component: osgi/version/ds/Shipper1V1.xml, osgi/version/ds/Shipper2V1.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V1.xml
new file mode 100644
index 0000000000..d96f6481fb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V1.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent1.ShipperService1" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ target="(component.name=CustomerComponent1)"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V2.xml
new file mode 100644
index 0000000000..10ef690c9b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V2.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent2.ShipperService1" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ target="(component.name=CustomerComponent2)"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2.mf
new file mode 100644
index 0000000000..003f9dca5a
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.version.supplychain.shipper.Shipper
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer;version="[2.0.0,3.0.0)"
+Export-Package: supplychain.shipper;version="2.0.0"
+Service-Component: osgi/version/ds/Shipper1V2.xml, osgi/version/ds/Shipper2V2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V1.xml
new file mode 100644
index 0000000000..fefdea106d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V1.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent1.ShipperService2" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ target="(component.name=CustomerComponent1)"
+ />
+ <property name="shipperName">ParcelForce</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V2.xml
new file mode 100644
index 0000000000..f6b847ed59
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V2.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent2.ShipperService2" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ target="(component.name=CustomerComponent2)"
+ />
+ <property name="shipperName">ParcelForce</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1.mf
new file mode 100644
index 0000000000..5cff2f573e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: ds.version.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.shipper;version="[1.0.0,2.0.0)"
+Export-Package: supplychain.warehouse;version="1.0.0"
+Service-Component: osgi/version/ds/Warehouse1V1.xml, osgi/version/ds/Warehouse2V2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V1.xml
new file mode 100644
index 0000000000..ca50b554df
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent1" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V2.xml
new file mode 100644
index 0000000000..14658127f8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent2" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2.mf
new file mode 100644
index 0000000000..0fec68a725
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: ds.version.supplychain.warehouse.Warehouse
+Bundle-Version: 2.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.shipper;version="[2.0.0,3.0.0)"
+Export-Package: supplychain.warehouse;version="2.0.0"
+Service-Component: osgi/version/ds/Warehouse1V1.xml, osgi/version/ds/Warehouse2V2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V1.xml
new file mode 100644
index 0000000000..ca50b554df
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent1" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V2.xml
new file mode 100644
index 0000000000..14658127f8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent2" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Customer.mf
new file mode 100644
index 0000000000..678014d48d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Customer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: wiring.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.retailer
+Export-Package: supplychain.customer
+Bundle-Activator: supplychain.customer.OSGiCustomerImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Retailer.mf
new file mode 100644
index 0000000000..f0090fb52b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Retailer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: wiring.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Bundle-Activator: supplychain.retailer.OSGiRetailerImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Shipper.mf
new file mode 100644
index 0000000000..0b50923a05
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: wiring.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.customer
+Export-Package: supplychain.shipper
+Bundle-Activator: supplychain.shipper.OSGiShipperImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Warehouse.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Warehouse.mf
new file mode 100644
index 0000000000..1000a5f974
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/Warehouse.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: wiring.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ supplychain.shipper
+Export-Package: supplychain.warehouse
+Bundle-Activator: supplychain.warehouse.OSGiWarehouseImpl
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.mf
new file mode 100644
index 0000000000..4e392a9ff1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Customer
+Bundle-SymbolicName: ds.wiring.supplychain.customer.Customer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.retailer
+Export-Package: supplychain.customer
+Service-Component: osgi/wiring/ds/Customer.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.xml
new file mode 100644
index 0000000000..b10d0416dc
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="CustomerComponent" immediate="true">
+ <implementation class="supplychain.customer.OSGiCustomerComponentImpl" />
+ <service>
+ <provide interface="supplychain.customer.Customer"/>
+ </service>
+ <reference
+ name="retailer1"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer1"
+ unbind="unsetRetailer1"
+ target="(retailerName=amazon.com)"
+ policy="dynamic"
+ />
+ <reference
+ name="retailer2"
+ interface="supplychain.retailer.Retailer"
+ bind="setRetailer2"
+ unbind="unsetRetailer2"
+ target="(retailerName=play.com)"
+ policy="dynamic"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer.mf
new file mode 100644
index 0000000000..788ec4f19a
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Retailer
+Bundle-SymbolicName: ds.wiring.supplychain.retailer.Retailer
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.warehouse
+Export-Package: supplychain.retailer
+Service-Component: osgi/wiring/ds/Retailer1.xml, osgi/wiring/ds/Retailer2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer1.xml
new file mode 100644
index 0000000000..1ba16d0693
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer1.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent1" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent1/Warehouse)"
+ />
+ <property name="retailerName">amazon.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer2.xml
new file mode 100644
index 0000000000..a55ebd02a8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="RetailerComponent2" immediate="true" >
+ <implementation class="supplychain.retailer.OSGiRetailerComponentImpl" />
+ <service>
+ <provide interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference
+ name="supplychain.warehouse.Warehouse"
+ interface="supplychain.warehouse.Warehouse"
+ bind="setWarehouse"
+ unbind="unsetWarehouse"
+ target="(component.service.name=WarehouseComponent1/Warehouse)"
+ />
+ <property name="retailerName">play.com</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper.mf
new file mode 100644
index 0000000000..e7459360e6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shipper
+Bundle-SymbolicName: ds.wiring.supplychain.shipper.Shipper
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component, supplychain.customer
+Export-Package: supplychain.shipper
+Service-Component: osgi/wiring/ds/Shipper1.xml, osgi/wiring/ds/Shipper2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper1.xml
new file mode 100644
index 0000000000..d518ecab62
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper1.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent1" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ target="(component.service.name=CustomerComponent/Customer)"
+ policy="dynamic"
+ />
+ <property name="shipperName">RoyalMail</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper2.xml
new file mode 100644
index 0000000000..d7d0b41f5e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="ShipperComponent2" immediate="true" >
+ <implementation class="supplychain.shipper.OSGiShipperComponentImpl" />
+ <service>
+ <provide interface="supplychain.shipper.Shipper" />
+ </service>
+ <reference
+ name="customer"
+ interface="supplychain.customer.Customer"
+ bind="setCustomer"
+ unbind="unsetCustomer"
+ cardinality="0..1"
+ policy="dynamic"
+ />
+ <property name="shipperName">ParcelForce</property>
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse.mf
new file mode 100644
index 0000000000..880304187b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse.mf
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Warehouse
+Bundle-SymbolicName: ds.wiring.supplychain.warehouse.Warehouse
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component,
+ supplychain.shipper
+Export-Package: supplychain.warehouse
+Service-Component: osgi/wiring/ds/Warehouse1.xml, osgi/wiring/ds/Warehouse2.xml
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse1.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse1.xml
new file mode 100644
index 0000000000..d72db04425
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse1.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent1" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ target="(shipperName=ParcelForce)"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse2.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse2.xml
new file mode 100644
index 0000000000..f9c1218f82
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component name="WarehouseComponent2" immediate="true">
+ <implementation class="supplychain.warehouse.OSGiWarehouseComponentImpl" />
+ <service>
+ <provide interface="supplychain.warehouse.Warehouse"/>
+ </service>
+ <reference
+ name="shipper"
+ interface="supplychain.shipper.Shipper"
+ bind="setShipper"
+ unbind="unsetShipper"
+ policy="dynamic"
+ target="(shipperName=RoyalMail)"
+ />
+</component>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/ws/HelloWorld.mf b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/ws/HelloWorld.mf
new file mode 100644
index 0000000000..d8e4c1cb7e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/osgi/ws/HelloWorld.mf
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: HelloWorld
+Bundle-SymbolicName: helloworld.HelloWorld
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Import-Package: org.osgi.framework,
+ org.osgi.service.component ,
+ helloworld.ws
+Export-Package: helloworld
+Bundle-Activator: helloworld.OSGiHelloWorldImpl
+
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/Greetings.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/Greetings.componentType
new file mode 100644
index 0000000000..a6de268bf6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/Greetings.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Greetings">
+ <interface.java interface="helloworld.Greetings"/>
+ </service>
+
+
+ <reference name="greetingsService" >
+ <interface.java interface="helloworld.Greetings" />
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/passbyref-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/passbyref-test.composite
new file mode 100644
index 0000000000..660e277693
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/passbyref/passbyref-test.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="HelloWorld">
+
+ <component name="JavaGreetingsComponent">
+ <implementation.java class="helloworld.JavaGreetingsComponent"/>
+
+ <reference name="greetingsService" target="OSGiGreetingsComponent" />
+ </component>
+
+ <component name="OSGiGreetingsComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="passbyref.helloworld.Greetings"
+ classes="helloworld.OSGiGreetingsImpl"
+ />
+ <reference name="greetingsService" target="JavaGreetingsComponent" />
+ </component>
+
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuote.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuote.componentType
new file mode 100644
index 0000000000..5e0965d047
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuote.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="StockQuoteService">
+ <interface.java interface="stockquote.StockQuote"/>
+ </service>
+
+ <property name="currency" type="xsd:string" >GBP</property>
+ <property name="exchangeRate" type="xsd:double" >1.0</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuoteFactory.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuoteFactory.componentType
new file mode 100644
index 0000000000..5e0965d047
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/StockQuoteFactory.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="StockQuoteService">
+ <interface.java interface="stockquote.StockQuote"/>
+ </service>
+
+ <property name="currency" type="xsd:string" >GBP</property>
+ <property name="exchangeRate" type="xsd:double" >1.0</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuote.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuote.componentType
new file mode 100644
index 0000000000..5e0965d047
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuote.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="StockQuoteService">
+ <interface.java interface="stockquote.StockQuote"/>
+ </service>
+
+ <property name="currency" type="xsd:string" >GBP</property>
+ <property name="exchangeRate" type="xsd:double" >1.0</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuoteFactory.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuoteFactory.componentType
new file mode 100644
index 0000000000..5e0965d047
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/StockQuoteFactory.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="StockQuoteService">
+ <interface.java interface="stockquote.StockQuote"/>
+ </service>
+
+ <property name="currency" type="xsd:string" >GBP</property>
+ <property name="exchangeRate" type="xsd:double" >1.0</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties-ds-test.composite
new file mode 100644
index 0000000000..02ae93aec2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties-ds-test.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="StockQuoteComposite">
+
+ <component name="StockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.stockquote.StockQuote"
+ classes="stockquote.OSGiStockQuoteComponentImpl">
+
+ <properties service="StockQuoteService">
+ <property name="service.pid">stockQuote</property>
+ </properties>
+ </implementation.osgi>
+
+ <property name="currency" type="xsd:string" >USD</property>
+ <property name="exchangeRate" type="xsd:double" >2.0</property>
+
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties2-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties2-ds-test.composite
new file mode 100644
index 0000000000..c94504f07d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/ds/properties2-ds-test.composite
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="StockQuoteComposite">
+
+ <component name="USDStockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.stockquote.StockQuoteFactory"
+ classes="stockquote.OSGiStockQuoteComponentImpl">
+
+ <properties service="StockQuoteService">
+ <property name="service.pid">stockQuote</property>
+ </properties>
+ </implementation.osgi>
+
+ <property name="currency" type="xsd:string" >USD</property>
+ <property name="exchangeRate" type="xsd:double" >2.0</property>
+
+ </component>
+
+ <component name="EUROStockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.stockquote.StockQuoteFactory"
+ classes="stockquote.OSGiStockQuoteComponentImpl">
+
+ <properties service="StockQuoteService">
+ <property name="service.pid">stockQuote</property>
+ </properties>
+ </implementation.osgi>
+
+ <property name="currency" type="xsd:string" >EURO</property>
+ <property name="exchangeRate" type="xsd:double" >1.48</property>
+
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties-test.composite
new file mode 100644
index 0000000000..fea03404fd
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties-test.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="StockQuoteComposite">
+
+ <component name="StockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="stockquote.StockQuote"
+ classes="stockquote.OSGiStockQuoteImpl">
+
+ <properties service="StockQuoteService">
+ <property name="service.pid">stockQuote</property>
+ </properties>
+ </implementation.osgi>
+
+ <property name="currency" type="xsd:string" >USD</property>
+ <property name="exchangeRate" type="xsd:double" >2.0</property>
+
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties2-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties2-test.composite
new file mode 100644
index 0000000000..3c425fcbc9
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/properties/properties2-test.composite
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="StockQuoteComposite">
+
+ <component name="USDStockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="stockquote.StockQuoteFactory"
+ classes="stockquote.OSGiStockQuoteImpl">
+
+ </implementation.osgi>
+
+
+ <property name="currency" type="xsd:string" >USD</property>
+ <property name="exchangeRate" type="xsd:double" >2.0</property>
+
+ </component>
+
+ <component name="EUROStockQuoteComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="stockquote.StockQuoteFactory"
+ classes="stockquote.OSGiStockQuoteImpl">
+
+ </implementation.osgi>
+
+
+ <property name="currency" type="xsd:string" >EURO</property>
+ <property name="exchangeRate" type="xsd:double" >1.48</property>
+
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldClient.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldClient.componentType
new file mode 100644
index 0000000000..f6c04de980
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldClient.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+ <service name="HelloWorldClient">
+ <interface.java interface="helloworld.sdo.client.HelloWorldClient"/>
+ </service>
+
+ <reference name="helloWorldService" >
+ <interface.java interface="helloworld.sdo.HelloWorldService" />
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldService.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldService.componentType
new file mode 100644
index 0000000000..87918132e6
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/HelloWorldService.componentType
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="HelloWorldService">
+ <interface.java interface="helloworld.sdo.HelloWorldService"/>
+ </service>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/META-INF/sca-contribution.xml b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..9b00787162
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/META-INF/sca-contribution.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld">
+ <deployable composite="helloworld:helloworldsdo"/>
+
+ <import.java package="helloworld.sdo"/>
+</contribution>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworld.wsdl b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworld.wsdl
new file mode 100644
index 0000000000..2ecc0bea43
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworld.wsdl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="tns:Name" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <complexType name="Name">
+ <sequence>
+ <element name="first" type="xsd:string" />
+ <element name="last" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest" />
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworldsdo.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworldsdo.composite
new file mode 100644
index 0000000000..af79dc4bdf
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/sdo/ds/helloworldsdo.composite
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://helloworld"
+ xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" xmlns:hw="http://helloworld"
+ name="helloworldsdo">
+
+ <component name="JavaHelloWorldServiceComponent">
+ <implementation.java class="helloworld.sdo.HelloWorldServiceComponent" />
+ </component>
+
+ <component name="JavaHelloWorldClientComponent">
+ <implementation.java class="helloworld.sdo.client.HelloWorldClientComponent" />
+ <reference name="helloWorldService" target="OSGiHelloWorldServiceComponent" />
+ </component>
+
+ <component name="OSGiHelloWorldServiceComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.helloworld.sdo.HelloWorldService"
+ />
+ </component>
+
+ <component name="OSGiHelloWorldClientComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.helloworld.sdo.HelloWorldClient"
+ />
+
+ <reference name="helloWorldService" target="JavaHelloWorldServiceComponent" />
+ </component>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Customer.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Retailer.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Retailer.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Shipper.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Shipper.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Customer.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Retailer.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Retailer.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Shipper.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Shipper.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/services-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/services-ds-test.composite
new file mode 100644
index 0000000000..c144a1bc18
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/ds/services-ds-test.composite
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.services.supplychain.customer.Customer" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent/RetailerService3" />
+ </component>
+
+ <component name="RetailerComponent">
+ <!-- implementation.java class="supplychain.retailer.JavaRetailerComponentImpl" -->
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.services.supplychain.retailer.Retailer" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ </component>
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent/ShipperService2" />
+ </component>
+
+
+ <component name="ShipperComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.services.supplychain.shipper.Shipper" >
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="customer" target="CustomerComponent" />
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/services-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/services-test.composite
new file mode 100644
index 0000000000..64f3b30f88
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/services/services-test.composite
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="services.supplychain.customer.Customer" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent/RetailerService3" />
+ </component>
+
+ <component name="RetailerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="services.supplychain.retailer.Retailer" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ </component>
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent/ShipperService2" />
+ </component>
+
+
+ <component name="ShipperComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="services.supplychain.shipper.Shipper" >
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="customer" target="CustomerComponent" />
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/stockquote/StockQuote.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/stockquote/StockQuote.componentType
new file mode 100644
index 0000000000..0b0aa0912b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/stockquote/StockQuote.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="StockQuoteService">
+ <interface.java interface="stockquote.StockQuote"/>
+ </service>
+
+ <property name="currency" type="xsd:string" >GBP</property>
+ <property name="exchangeRate" type="xsd:double" >1.0</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer1.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer1.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer2.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Customer2.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer1.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer1.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer2.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Retailer2.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper1.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper1.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper2.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Shipper2.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse1.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse1.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse2.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/Warehouse2.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer1.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer1.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer2.componentType
new file mode 100644
index 0000000000..7bcdc6a2bb
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Customer2.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="CustomerService">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer1.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer1.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer2.componentType
new file mode 100644
index 0000000000..eadb539ea5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Retailer2.componentType
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="RetailerService1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <service name="RetailerService3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper1.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper1.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper2.componentType
new file mode 100644
index 0000000000..532293b03f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Shipper2.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="ShipperService1">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <service name="ShipperService2">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse1.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse1.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse1.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse2.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse2.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/Warehouse2.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/version-ds-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/version-ds-test.composite
new file mode 100644
index 0000000000..877d0de1c9
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/ds/version-ds-test.composite
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.customer.Customer"
+ bundleVersion="1.0.0" >
+
+ <properties service="CustomerService">
+ <property name="component.name">CustomerComponent1</property>
+ </properties>
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent1/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent1/RetailerService3" />
+ </component>
+
+
+
+ <component name="CustomerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.customer.Customer"
+ bundleVersion="2.0.0" >
+
+ <properties service="CustomerService">
+ <property name="component.name">CustomerComponent2</property>
+ </properties>
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent2/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent2/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent2/RetailerService3" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.retailer.Retailer"
+ bundleVersion="1.0.0" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.service.name">WarehouseComponent1/Warehouse</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.retailer.Retailer"
+ bundleVersion="2.0.0" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.service.name">WarehouseComponent2/Warehouse</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent2"/>
+ </component>
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1/ShipperService2" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent2/ShipperService2" />
+ </component>
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.shipper.Shipper"
+ bundleVersion="1.0.0">
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ <property name="component.name">ShipperComponent1.ShipperService1</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ <property name="component.name">ShipperComponent1.ShipperService2</property>
+ </properties>
+ <properties reference="customer">
+ <property name="component.name">CustomerComponent1</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent1" />
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.version.supplychain.shipper.Shipper"
+ bundleVersion="2.0.0">
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ <property name="component.name">ShipperComponent2.ShipperService1</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ <property name="component.name">ShipperComponent2.ShipperService2</property>
+ </properties>
+ <properties reference="customer">
+ <property name="component.name">CustomerComponent2</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent2" />
+
+ </component>
+
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/version-test.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/version-test.composite
new file mode 100644
index 0000000000..bbb397ee70
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/version/version-test.composite
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.customer.Customer"
+ bundleVersion="1.0.0" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent1/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent1/RetailerService3" />
+ </component>
+
+
+
+ <component name="CustomerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.customer.Customer"
+ bundleVersion="2.0.0" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent2/RetailerService1"/>
+
+ <reference name="retailer2" target="RetailerComponent2/RetailerService2" />
+
+ <reference name="retailer3" target="RetailerComponent2/RetailerService3" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.retailer.Retailer"
+ bundleVersion="1.0.0" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.retailer.Retailer"
+ bundleVersion="2.0.0" >
+ <properties service="RetailerService1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties service="RetailerService2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties service="RetailerService3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.service.name">WarehouseComponent2/Warehouse</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent2"/>
+ </component>
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1/ShipperService2" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent2/ShipperService2" />
+ </component>
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.shipper.Shipper"
+ bundleVersion="1.0.0" >
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ <properties reference="customer">
+ <property name="component.name">CustomerComponent1</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent1" />
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="version.supplychain.shipper.Shipper"
+ bundleVersion="2.0.0">
+
+ <properties service="ShipperService1">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ <properties service="ShipperService2">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ <properties reference="customer">
+ <property name="component.name">CustomerComponent2</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent2" />
+
+ </component>
+
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Customer.componentType
new file mode 100644
index 0000000000..1fd551be3b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Retailer.componentType
new file mode 100644
index 0000000000..5599c44bc3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Retailer.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Customer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Customer.componentType
new file mode 100644
index 0000000000..1fd551be3b
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Customer.componentType
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </service>
+ <reference name="retailer1">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer2">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+ <reference name="retailer3">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Retailer.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Retailer.componentType
new file mode 100644
index 0000000000..5599c44bc3
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Retailer.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Retailer">
+ <interface.java interface="supplychain.retailer.Retailer"/>
+ </service>
+ <reference name="warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </reference>
+ <property name="retailerName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Shipper.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Shipper.componentType
new file mode 100644
index 0000000000..8743f8c145
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Shipper.componentType
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="Shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </service>
+ <reference name="customer">
+ <interface.java interface="supplychain.customer.Customer"/>
+ </reference>
+ <property name="shipperName" type="xsd:string" >default</property>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Warehouse.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Warehouse.componentType
new file mode 100644
index 0000000000..d349edf265
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/Warehouse.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="Warehouse">
+ <interface.java interface="supplychain.warehouse.Warehouse"/>
+ </service>
+
+ <reference name="shipper">
+ <interface.java interface="supplychain.shipper.Shipper"/>
+ </reference>
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test1.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test1.composite
new file mode 100644
index 0000000000..617200d8dd
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test1.composite
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.customer.Customer" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/Retailer" />
+
+ <reference name="retailer2" target="RetailerComponent2/Retailer" />
+
+ <reference name="retailer3" target="RetailerComponent3" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <service name="Retailer"/>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent2</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent2"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent2" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.shipper.Shipper" >
+
+ <properties service="Shipper">
+ <property name="component.name">ShipperComponent1</property>
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >RoyalMail</property>
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.shipper.Shipper" >
+
+ <properties service="Shipper">
+ <property name="component.name">ShipperComponent2</property>
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test2.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test2.composite
new file mode 100644
index 0000000000..213cde2c1d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/ds/wiring-ds-test2.composite
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.customer.Customer" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/Retailer" />
+
+ <reference name="retailer2" target="RetailerComponent2/Retailer" />
+
+ <reference name="retailer3" target="RetailerComponent3/Retailer" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <service name="Retailer"/>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >ebay.com</property>
+ </component>
+
+ <component name="WarehouseComponent1">
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.warehouse.Warehouse" >
+
+ <properties reference="shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="shipper" target="ShipperComponent2" />
+ </component>
+
+
+ <component name="WarehouseComponent2">
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.warehouse.Warehouse" >
+
+ <properties reference="shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >RoyalMail</property>
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="ds.wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test1.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test1.composite
new file mode 100644
index 0000000000..0dca0da75e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test1.composite
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.customer.Customer"
+ classes="supplychain.customer.OSGiCustomerImpl" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/Retailer" />
+
+ <reference name="retailer2" target="RetailerComponent2/Retailer" />
+
+ <reference name="retailer3" target="RetailerComponent3/Retailer" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent2"/>
+ <property name="retailerName" type="xsd:string" >ebay.com</property>
+ </component>
+
+
+ <component name="WarehouseComponent1">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent2" />
+ </component>
+
+ <component name="WarehouseComponent2">
+ <implementation.java class="supplychain.warehouse.JavaWarehouseComponentImpl" />
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >RoyalMail</property>
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test2.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test2.composite
new file mode 100644
index 0000000000..953045fefa
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/wiring/wiring-test2.composite
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://supplychain"
+ xmlns:sp="http://supplychain"
+ name="supplychain">
+
+ <component name="CustomerComponent">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.customer.Customer" >
+
+ <properties reference="retailer1">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="retailer2">
+ <property name="retailerName">play.com</property>
+ </properties>
+ <properties reference="retailer3">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="retailer1" target="RetailerComponent1/Retailer" />
+
+ <reference name="retailer2" target="RetailerComponent2/Retailer" />
+
+ <reference name="retailer3" target="RetailerComponent3/Retailer" />
+ </component>
+
+ <component name="RetailerComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+ <properties service="Retailer">
+ <property name="retailerName">amazon.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <service name="Retailer"/>
+
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >amazon.com</property>
+ </component>
+
+ <component name="RetailerComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">play.com</property>
+ </properties>
+
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >play.com</property>
+ </component>
+
+ <component name="RetailerComponent3">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.retailer.Retailer" >
+
+ <properties service="Retailer">
+ <property name="retailerName">ebay.com</property>
+ </properties>
+ <properties reference="warehouse">
+ <property name="component.name">WarehouseComponent1</property>
+ </properties>
+ </implementation.osgi>
+ <reference name="warehouse" target="WarehouseComponent1"/>
+ <property name="retailerName" type="xsd:string" >ebay.com</property>
+ </component>
+
+ <component name="WarehouseComponent1">
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.warehouse.Warehouse" >
+
+ <properties reference="shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="shipper" target="ShipperComponent2" />
+ </component>
+
+
+ <component name="WarehouseComponent2">
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.warehouse.Warehouse" >
+
+ <properties reference="shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="shipper" target="ShipperComponent1" />
+ </component>
+
+
+ <component name="ShipperComponent1">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">RoyalMail</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >RoyalMail</property>
+ </component>
+
+ <component name="ShipperComponent2">
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="wiring.supplychain.shipper.Shipper">
+
+ <properties service="Shipper">
+ <property name="shipperName">ParcelForce</property>
+ </properties>
+ </implementation.osgi>
+
+ <reference name="customer" target="CustomerComponent" />
+ <property name="shipperName" type="xsd:string" >ParcelForce</property>
+
+ </component>
+
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/HelloWorld.componentType b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/HelloWorld.componentType
new file mode 100644
index 0000000000..c621d9aca0
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/HelloWorld.componentType
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+ <service name="OSGiHelloWorld">
+ <interface.java interface="helloworld.HelloWorld"/>
+ </service>
+
+
+ <reference name="helloWorldWS" >
+ <!-- interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" / -->
+ <interface.java interface="helloworld.ws.HelloWorld" />
+ </reference>
+
+</componentType>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/helloworld.wsdl b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/helloworld.wsdl
new file mode 100644
index 0000000000..6d3f853382
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/helloworld.wsdl
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/ws-helloworld.composite b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/ws-helloworld.composite
new file mode 100644
index 0000000000..d545c844d2
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/main/resources/ws/ws-helloworld.composite
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="HelloWorld">
+
+ <service name="helloWorld" promote="HelloWorldService">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <!-- interface.java interface="helloworld.ws.HelloWorld" / -->
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="helloworld.ws.HelloWorldService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <!--implementation.java class="helloworld.HelloWorldComponent"/-->
+
+ <implementation.osgi xmlns="http://tuscany.apache.org/xmlns/sca/1.0"
+ bundleSymbolicName="helloworld.HelloWorld"
+ />
+
+ <service name="OSGiHelloWorld"/>
+
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <!-- interface.java interface="helloworld.ws.HelloWorld" / -->
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+
+</composite>
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java
new file mode 100644
index 0000000000..54b9b00bc8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback1TestCase.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package callback;
+
+
+public class Callback1TestCase extends CallbackTestCase {
+
+ public Callback1TestCase() {
+ super("callback-test1.composite");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java
new file mode 100644
index 0000000000..b26bfbd98d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback2TestCase.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package callback;
+
+
+public class Callback2TestCase extends CallbackTestCase {
+
+ public Callback2TestCase() {
+ super("callback-test2.composite");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java
new file mode 100644
index 0000000000..667df7aa12
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/Callback3TestCase.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package callback;
+
+
+public class Callback3TestCase extends CallbackTestCase {
+
+ public Callback3TestCase() {
+ super("callback-test3.composite");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java
new file mode 100644
index 0000000000..a95437f8c1
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/callback/CallbackTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package callback;
+
+
+import callback.client.CallbackClient;
+
+import test.OSGiTestCase;
+
+public abstract class CallbackTestCase extends OSGiTestCase {
+
+ private CallbackClient aCallbackClient;
+
+ protected String compositeName;
+
+
+ public CallbackTestCase(String compositeName) {
+ super(compositeName, "callback");
+ }
+
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ aCallbackClient = scaDomain.getService(CallbackClient.class, "CallbackClient");
+ }
+
+
+ public void test() throws Exception {
+ aCallbackClient.run();
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java
new file mode 100644
index 0000000000..c5d94df93d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/conversation/ConversationTestCase.java
@@ -0,0 +1,325 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package conversation;
+
+import junit.framework.Assert;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import conversation.client.ConversationalClient;
+
+import test.OSGiTestCase;
+
+public class ConversationTestCase extends OSGiTestCase {
+
+ private ConversationalClient conversationalStatelessClientStatelessService;
+ private ConversationalClient conversationalStatelessClientStatefulService;
+ private ConversationalClient conversationalStatefulClientStatelessService;
+ private ConversationalClient conversationalStatefulClientStatefulService;
+
+ public ConversationTestCase() {
+ super("conversation-test.composite", "conversation");
+ }
+
+ @Before
+ public void setUp() throws Exception {
+
+ try {
+
+ super.setUp();
+
+ conversationalStatelessClientStatelessService = scaDomain.getService(ConversationalClient.class,
+ "ConversationalStatelessClientStatelessService/ConversationalClient");
+
+ conversationalStatelessClientStatefulService = scaDomain.getService(ConversationalClient.class,
+ "ConversationalStatelessClientStatefulService/ConversationalClient");
+
+ conversationalStatefulClientStatelessService = scaDomain.getService(ConversationalClient.class,
+ "ConversationalStatefulClientStatelessService/ConversationalClient");
+
+ conversationalStatefulClientStatefulService = scaDomain.getService(ConversationalClient.class,
+ "ConversationalStatefulClientStatefulService/ConversationalClient");
+
+
+
+ } catch (Exception e) {
+ e.printStackTrace();
+
+ throw e;
+ }
+
+ }
+
+
+ // stateless client stateful service tests
+ // =======================================
+ @Test
+ public void testStatelessStatefulConversationFromInjectedReference() {
+ int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationFromServiceReference() {
+ int count = conversationalStatelessClientStatefulService.runConversationFromServiceReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationWithUserDefinedConversationId() {
+ int count = conversationalStatelessClientStatefulService.runConversationWithUserDefinedConversationId();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationCheckUserDefinedConversationId() {
+ String conversationId = conversationalStatelessClientStatefulService.runConversationCheckUserDefinedConversationId();
+ Assert.assertEquals("MyConversation2", conversationId);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationCheckingScope() {
+ conversationalStatelessClientStatefulService.runConversationCheckingScope();
+
+ Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,",
+ conversationalStatelessClientStatefulService.getServiceCalls());
+ }
+
+ @Test
+ public void testStatelessStatefulConversationWithCallback() {
+ int count = conversationalStatelessClientStatefulService.runConversationWithCallback();
+ Assert.assertEquals(0, count);
+
+ Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,init,",
+ conversationalStatelessClientStatefulService.getCalls());
+ }
+
+ /////@Test
+ public void _testStatelessStatefulConversationHavingPassedReference() {
+ int count = conversationalStatelessClientStatefulService.runConversationHavingPassedReference();
+ Assert.assertEquals(3, count);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationBusinessException() {
+ String message = conversationalStatelessClientStatefulService.runConversationBusinessException();
+ Assert.assertEquals("Business Exception", message);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationBusinessExceptionCallback() {
+ String message = conversationalStatelessClientStatefulService.runConversationBusinessExceptionCallback();
+ Assert.assertEquals("Business Exception", message);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationCallingEndedConversation() {
+ int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversation();
+ Assert.assertEquals(0, count);
+ }
+
+ @Test
+ public void testStatelessStatefulConversationCallingEndedConversationCallback() {
+ int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCallback();
+ Assert.assertEquals(0, count);
+ }
+
+ // stateless client stateless service tests
+ // ========================================
+ @Test
+ public void testStatelessStatelessConversationFromInjectedReference() {
+ int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatelessStatelessConversationFromServiceReference() {
+ int count = conversationalStatelessClientStatelessService.runConversationFromServiceReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatelessStatelessConversationWithUserDefinedConversationId() {
+ int count = conversationalStatelessClientStatelessService.runConversationWithUserDefinedConversationId();
+ Assert.assertEquals(2, count);
+ }
+ @Test
+ public void testStatelessStatelessConversationCheckUserDefinedConversationId() {
+ String conversationId = conversationalStatelessClientStatelessService.runConversationCheckUserDefinedConversationId();
+ Assert.assertEquals("MyConversation2", conversationId);
+ }
+
+ @Test
+ public void testStatelessStatelessConversationCheckingScope() {
+ conversationalStatelessClientStatelessService.runConversationCheckingScope();
+ Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,init,",
+ conversationalStatelessClientStatelessService.getServiceCalls());
+ }
+
+ @Test
+ public void testStatelessStatelessConversationWithCallback() {
+ int count = conversationalStatelessClientStatelessService.runConversationWithCallback();
+ Assert.assertEquals(0, count);
+
+ Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,init,",
+ conversationalStatelessClientStatelessService.getCalls());
+ }
+ /////@Test
+ public void _testStatelessStatelessConversationHavingPassedReference() {
+ int count = conversationalStatelessClientStatelessService.runConversationHavingPassedReference();
+ Assert.assertEquals(3, count);
+ }
+
+ @Test
+ public void testStatelessStatelessConversationCallingEndedConversation() {
+ int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversation();
+ Assert.assertEquals(-999, count);
+ }
+
+ @Test
+ public void testStatelessStatelessConversationCallingEndedConversationCallback() {
+ int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCallback();
+ Assert.assertEquals(0, count);
+ }
+
+ // stateful client stateful service tests
+ // ======================================
+ @Test
+ public void testStatefulStatefulConversationFromInjectedReference() {
+ int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationFromServiceReference() {
+ int count = conversationalStatefulClientStatefulService.runConversationFromServiceReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationWithUserDefinedConversationId() {
+ int count = conversationalStatefulClientStatefulService.runConversationWithUserDefinedConversationId();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationCheckUserDefinedConversationId() {
+ String conversationId = conversationalStatefulClientStatefulService.runConversationCheckUserDefinedConversationId();
+ Assert.assertEquals("MyConversation2", conversationId);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationCheckingScope() {
+ conversationalStatefulClientStatefulService.runConversationCheckingScope();
+ Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,",
+ conversationalStatefulClientStatefulService.getServiceCalls());
+ }
+
+ @Test
+ public void testStatefulStatefulConversationWithCallback() {
+ int count = conversationalStatefulClientStatefulService.runConversationWithCallback();
+ //System.out.println("Calls: " + conversationalStatefulClientStatefulService.getCalls());
+ Assert.assertEquals(4, count);
+
+ Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,",
+ conversationalStatefulClientStatefulService.getCalls());
+ }
+
+ /////@Test
+ public void _testStatefulStatefulConversationHavingPassedReference() {
+ int count = conversationalStatefulClientStatefulService.runConversationHavingPassedReference();
+ Assert.assertEquals(3, count);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationCallingEndedConversation() {
+ int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversation();
+ Assert.assertEquals(0, count);
+ }
+
+ @Test
+ public void testStatefulStatefulConversationCallingEndedConversationCallback() {
+ int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCallback();
+ Assert.assertEquals(0, count);
+ }
+
+ // stateful client stateless service tests
+ // =======================================
+ @Test
+ public void testStatefulStatelessConversationFromInjectedReference() {
+ int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationFromServiceReference() {
+ int count = conversationalStatefulClientStatelessService.runConversationFromServiceReference();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationWithUserDefinedConversationId() {
+ int count = conversationalStatefulClientStatelessService.runConversationWithUserDefinedConversationId();
+ Assert.assertEquals(2, count);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationCheckUserDefinedConversationId() {
+ String conversationId = conversationalStatefulClientStatelessService.runConversationCheckUserDefinedConversationId();
+ Assert.assertEquals("MyConversation2", conversationId);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationCheckingScope() {
+ conversationalStatefulClientStatelessService.runConversationCheckingScope();
+
+ Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,init,",
+ conversationalStatefulClientStatelessService.getServiceCalls());
+ }
+
+ @Test
+ public void testStatefulStatelessConversationWithCallback() {
+ int count = conversationalStatefulClientStatelessService.runConversationWithCallback();
+ Assert.assertEquals(4, count);
+
+ Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,init,",
+ conversationalStatefulClientStatelessService.getCalls());
+ }
+
+ /////@Test
+ public void _testStatefulStatelessConversationHavingPassedReference() {
+ int count = conversationalStatefulClientStatelessService.runConversationHavingPassedReference();
+ Assert.assertEquals(3, count);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationCallingEndedConversation() {
+ int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversation();
+ Assert.assertEquals(-999, count);
+ }
+
+ @Test
+ public void testStatefulStatelessConversationCallingEndedConversationCallback() {
+ int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCallback();
+ Assert.assertEquals(0, count);
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java
new file mode 100644
index 0000000000..d340923938
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/passbyref/PassByRefTestCase.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld.passbyref;
+
+import helloworld.Greetings;
+import test.OSGiTestCase;
+
+
+public class PassByRefTestCase extends OSGiTestCase {
+
+ private Greetings greetingsJava;
+ private Greetings greetingsOSGi;
+ private String[] origNames = {"world"};
+ private String[] names;
+
+ public PassByRefTestCase() {
+ super("passbyref-test.composite", "passbyref");
+ }
+
+ protected void setUp() throws Exception {
+
+ super.setUp();
+ greetingsJava = scaDomain.getService(Greetings.class, "JavaGreetingsComponent");
+ greetingsOSGi = scaDomain.getService(Greetings.class, "OSGiGreetingsComponent");
+
+ names = new String[origNames.length];
+ System.arraycopy(origNames, 0, names, 0, names.length);
+ }
+
+
+ public void test() throws Exception {
+
+ javaOSGiPassByValue();
+ osgiJavaPassByValue();
+ javaOSGiPassByRef();
+ osgiJavaPassByRef();
+
+ }
+
+
+ public void javaOSGiPassByValue() throws Exception {
+
+ String[] greetings = greetingsJava.getGreetingsFromJava(names);
+ for (int i = 0; i < origNames.length; i++) {
+ assertEquals(origNames[i], names[i]);
+ }
+ for (int i = 0; i < origNames.length; i++) {
+
+ System.out.println(greetings[i]);
+
+ assertEquals(greetings[i],
+ "Hello " + origNames[i] + "(From Java)(From OSGi)");
+ }
+
+ }
+
+ public void osgiJavaPassByValue() throws Exception {
+ String[] names = {
+ "world"
+ };
+ String[] greetings = greetingsOSGi.getGreetingsFromOSGi(names);
+
+ for (int i = 0; i < origNames.length; i++) {
+ assertEquals(origNames[i], names[i]);
+ }
+ for (int i = 0; i < origNames.length; i++) {
+
+ System.out.println(greetings[i]);
+
+ assertEquals(greetings[i],
+ "Hello " + origNames[i] + "(From OSGi)(From Java)");
+ }
+
+
+
+ }
+
+ public void javaOSGiPassByRef() throws Exception {
+ String[] names = {
+ "world"
+ };
+ String[] greetings = greetingsJava.getModifiedGreetingsFromJava(names);
+ for (int i = 0; i < origNames.length; i++) {
+ assertEquals("Hello " + origNames[i] + "(From Java)(From OSGi)", names[i]);
+ }
+ for (int i = 0; i < origNames.length; i++) {
+
+ System.out.println(greetings[i]);
+
+ assertEquals(greetings[i],
+ "Hello " + origNames[i] + "(From Java)(From OSGi)");
+ }
+ }
+
+ public void osgiJavaPassByRef() throws Exception {
+ String[] names = {
+ "world"
+ };
+ String[] greetings = greetingsOSGi.getModifiedGreetingsFromOSGi(names);
+ for (int i = 0; i < origNames.length; i++) {
+ assertEquals("Hello " + origNames[i] + "(From OSGi)(From Java)", names[i]);
+ }
+ for (int i = 0; i < origNames.length; i++) {
+
+ System.out.println(greetings[i]);
+
+ assertEquals(greetings[i],
+ "Hello " + origNames[i] + "(From OSGi)(From Java)");
+ }
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java
new file mode 100644
index 0000000000..c1f11d0b6e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/sdo/SdoTestCase.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld.sdo;
+
+import helloworld.sdo.client.HelloWorldClient;
+
+import java.io.File;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+import util.OSGiTestUtil;
+
+
+public class SdoTestCase extends TestCase {
+
+
+ private EmbeddedSCADomain scaDomain;
+
+
+ protected void setUp() throws Exception {
+
+ OSGiTestUtil.setUpOSGiTestRuntime();
+
+ scaDomain = new EmbeddedSCADomain(this.getClass().getClassLoader(), "http://localhost");
+ scaDomain.start();
+ ContributionService contributionService = scaDomain.getContributionService();
+
+ URL serviceURL = new File("./target/classes/sdo/ds/HelloWorldService.jar").toURI().toURL();
+ URL clientURL = new File("./target/classes/sdo/ds/HelloWorldClient.jar").toURI().toURL();
+
+ Contribution serviceContribution = contributionService.contribute("HelloWorldService", serviceURL, true);
+ Contribution clientContribution = contributionService.contribute("HelloWorldClient", clientURL, true);
+
+ for (Composite deployable : serviceContribution.getDeployables()) {
+ scaDomain.getDomainComposite().getIncludes().add(deployable);
+ scaDomain.buildComposite(deployable);
+ }
+ for (Composite deployable : clientContribution.getDeployables()) {
+ scaDomain.getDomainComposite().getIncludes().add(deployable);
+ scaDomain.buildComposite(deployable);
+ }
+ for (Composite deployable : clientContribution.getDeployables() ) {
+ scaDomain.getCompositeActivator().activate(deployable);
+ scaDomain.getCompositeActivator().start(deployable);
+ }
+ }
+
+ protected void tearDown() throws Exception {
+ scaDomain.close();
+
+ OSGiTestUtil.shutdownOSGiRuntime();
+ }
+
+
+ public void testJavaToOSGi() throws Exception {
+
+ HelloWorldClient helloWorldClient = scaDomain.getService(HelloWorldClient.class, "JavaHelloWorldClientComponent");
+ String greetings = helloWorldClient.getGreetings("Apache", "Tuscany");
+ System.out.println(greetings);
+ assertEquals("Hello Apache Tuscany", greetings);
+ }
+
+ public void testOSGiToJava() throws Exception {
+
+ HelloWorldClient helloWorldClient = scaDomain.getService(HelloWorldClient.class, "OSGiHelloWorldClientComponent");
+ String greetings = helloWorldClient.getGreetings("Apache", "Tuscany");
+ System.out.println(greetings);
+ assertEquals("Hello Apache Tuscany", greetings);
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java
new file mode 100644
index 0000000000..49afb3d8e8
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/helloworld/ws/HelloWorldTestCase.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld.ws;
+
+import helloworld.HelloWorld;
+
+
+import test.OSGiTestCase;
+import util.OSGiTestUtil;
+
+
+public class HelloWorldTestCase extends OSGiTestCase {
+
+ private HelloWorld helloWorld;
+
+ public HelloWorldTestCase() {
+ super("ws-helloworld.composite", "ws");
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ helloWorld = scaDomain.getService(HelloWorld.class, "HelloWorldComponent");
+ }
+
+ protected void tearDown() throws Exception {
+ scaDomain.close();
+ OSGiTestUtil.shutdownOSGiRuntime();
+ }
+
+
+ public void testHelloWorld() throws Exception {
+ String greetings = helloWorld.getGreetings("petra");
+ System.out.println(greetings);
+ assertEquals("Hello petra", greetings);
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java
new file mode 100644
index 0000000000..a858c18a90
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain;
+
+import supplychain.customer.Customer;
+import test.OSGiTestCase;
+
+/**
+ * Test case for supplychain - it is invoked with different composite files to test
+ * various scenarios.
+ */
+public abstract class SupplyChainTestCase extends OSGiTestCase {
+
+ public Customer customer;
+
+
+ public SupplyChainTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+ protected void setUp() throws Exception {
+
+ super.setUp();
+ customer = scaDomain.getService(Customer.class, "CustomerComponent");
+ }
+
+ public void test() throws Exception {
+
+ System.out.println("Main thread " + Thread.currentThread());
+ customer.purchaseBooks();
+ customer.purchaseGames();
+ long timeout = 5000L;
+ while (timeout > 0) {
+ if (customer.hasOutstandingOrders()) {
+ Thread.sleep(100);
+ timeout -= 100;
+ } else
+ break;
+ }
+ assertFalse(customer.hasOutstandingOrders());
+
+ System.out.println("Test complete");
+
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java
new file mode 100644
index 0000000000..a9941aebcd
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain;
+
+import supplychain.customer.Customer;
+import test.OSGiTestCase;
+
+/**
+ * OSGi test program - common code for versioned bundles
+ */
+public abstract class VersionedSupplyChainTestCase extends OSGiTestCase {
+
+ private Customer customer1;
+ private Customer customer2;
+
+
+ public VersionedSupplyChainTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+ protected void setUp() throws Exception {
+
+ super.setUp();
+ customer1 = scaDomain.getService(Customer.class, "CustomerComponent1");
+ customer2 = scaDomain.getService(Customer.class, "CustomerComponent2");
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Thread.sleep(2000);
+ }
+
+ public void test() throws Exception {
+
+ System.out.println("Main thread " + Thread.currentThread());
+ customer1.purchaseBooks();
+ customer2.purchaseGames();
+ long timeout = 5000L;
+ while (timeout > 0) {
+ if (customer1.hasOutstandingOrders()) {
+ Thread.sleep(100);
+ timeout -= 100;
+ } else if (customer2.hasOutstandingOrders()) {
+ Thread.sleep(100);
+ timeout -= 100;
+ } else
+ break;
+ }
+ assertFalse(customer1.hasOutstandingOrders());
+ assertFalse(customer2.hasOutstandingOrders());
+
+ System.out.println("Test complete");
+
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java
new file mode 100644
index 0000000000..8e939b1a83
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.factory;
+
+
+/**
+ * OSGi test program - declarative with scopes other than composites which use OSGi service factories
+ */
+public class DSFactoryTestCase extends FactoryTestCase {
+
+ public DSFactoryTestCase() {
+ super("factory-ds-test.composite", "factory/ds");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java
new file mode 100644
index 0000000000..39d90bb75c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.factory;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with scopes other than composites which use OSGi service factories
+ */
+public class FactoryTestCase extends SupplyChainTestCase {
+ /**
+ * This constant defines the time period (in milliseconds) for which we are prepared to wait for
+ * the @OneWay notifyShipment() callback to run.
+ */
+ private static final long MAX_WAIT_TIME_FOR_CALLBACK = 10000;
+
+ public FactoryTestCase() {
+ super("factory-test.composite", "factory");
+ }
+
+ protected FactoryTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+
+ @Override
+ public void test() throws Exception {
+
+ System.out.println("Main thread " + Thread.currentThread());
+ customer.purchaseBooks();
+ waitForOrderShipmentNotification(); // TUSCANY-2198 notifyShipment() callback is @OneWay
+ assertFalse(customer.hasOutstandingOrders());
+
+ customer.purchaseGames();
+ waitForOrderShipmentNotification(); // TUSCANY-2198 notifyShipment() callback is @OneWay
+ assertFalse(customer.hasOutstandingOrders());
+
+ Thread.sleep(2000);
+ System.out.println("Test complete");
+
+ }
+
+ /**
+ * Since the notifyShipment() callback on the Customer is @OneWay, we need to allow
+ * some time for it to complete as it is runs asynchronously.
+ *
+ * This is for TUSCANY-2198
+ */
+ private void waitForOrderShipmentNotification() throws InterruptedException {
+ long startTime = System.currentTimeMillis();
+ while (customer.hasOutstandingOrders()
+ && System.currentTimeMillis() - startTime < MAX_WAIT_TIME_FOR_CALLBACK) {
+ Thread.sleep(100);
+ }
+ }
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java
new file mode 100644
index 0000000000..5376687b61
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.interfaces;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with components exposing multiple services with multiple interfaces
+ */
+public class DSInterfacesTestCase extends SupplyChainTestCase {
+
+ public DSInterfacesTestCase() {
+ super("interfaces-ds-test.composite", "interfaces/ds");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java
new file mode 100644
index 0000000000..6d8dc1021e
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.interfaces;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - procedural with components exposing multiple services with multiple interfaces
+ */
+public class InterfacesTestCase extends SupplyChainTestCase {
+
+ public InterfacesTestCase() {
+ super("interfaces-test.composite", "interfaces");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java
new file mode 100644
index 0000000000..e037ae9675
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.properties;
+
+
+/**
+ * OSGi test program - declarative with business properties
+ */
+public class DSProperties2TestCase extends Properties2TestCase {
+
+ public DSProperties2TestCase() {
+ super("properties2-ds-test.composite", "properties/ds");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java
new file mode 100644
index 0000000000..eecf67913d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.properties;
+
+
+/**
+ * OSGi test program - declarative with business properties
+ */
+public class DSPropertiesTestCase extends PropertiesTestCase {
+
+ public DSPropertiesTestCase() {
+ super("properties-ds-test.composite", "properties/ds");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java
new file mode 100644
index 0000000000..203bf5123c
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.properties;
+
+
+import stockquote.StockQuote;
+import test.OSGiTestCase;
+
+/**
+ * OSGi test program - procedural with business properties
+ */
+public class Properties2TestCase extends OSGiTestCase {
+
+
+ private StockQuote stockQuoteServiceUSD;
+ private StockQuote stockQuoteServiceEURO;
+
+ public Properties2TestCase() {
+ super("properties2-test.composite", "properties");
+ }
+
+ protected Properties2TestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+ protected void setUp() throws Exception {
+
+ super.setUp();
+ stockQuoteServiceUSD = scaDomain.getService(StockQuote.class, "USDStockQuoteComponent");
+ stockQuoteServiceEURO = scaDomain.getService(StockQuote.class, "EUROStockQuoteComponent");
+ }
+
+ public void test() throws Exception {
+
+ double stockQuote = stockQuoteServiceUSD.getQuote("IBM");
+
+ double expectedValue = 52.81 * 2.0;
+
+ System.out.println("IBM: $" + stockQuote);
+
+ assertTrue(stockQuote > expectedValue - 0.1 && stockQuote < expectedValue + 0.1);
+
+ double stockQuote2 = stockQuoteServiceEURO.getQuote("IBM");
+
+ double expectedValue2 = 52.81 * 1.48;
+
+ System.out.println("IBM: Euro " + stockQuote2);
+
+ assertTrue(stockQuote2 > expectedValue2 - 0.1 && stockQuote2 < expectedValue2 + 0.1);
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java
new file mode 100644
index 0000000000..429b1f10ef
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.properties;
+
+import stockquote.StockQuote;
+import test.OSGiTestCase;
+
+/**
+ * OSGi test program - procedural with business properties
+ */
+public class PropertiesTestCase extends OSGiTestCase {
+
+
+ private StockQuote stockQuoteService;
+
+ public PropertiesTestCase() {
+ super("properties-test.composite", "properties");
+ }
+
+ protected PropertiesTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ stockQuoteService = scaDomain.getService(StockQuote.class, "StockQuoteComponent");
+ }
+
+
+ public void test() throws Exception {
+
+ double stockQuote = stockQuoteService.getQuote("IBM");
+
+ double expectedValue = 52.81 * 2.0;
+
+ System.out.println("IBM: " + stockQuote);
+
+ assertTrue(stockQuote > expectedValue - 0.1 && stockQuote < expectedValue + 0.1);
+
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java
new file mode 100644
index 0000000000..dbc980f8c4
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.services;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with components exposing multiple services
+ */
+public class DSServicesTestCase extends SupplyChainTestCase {
+
+ public DSServicesTestCase() {
+ super("services-ds-test.composite", "services/ds");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java
new file mode 100644
index 0000000000..e39295a402
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.services;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - procedural with components exposing multiple services
+ */
+public class ServicesTestCase extends SupplyChainTestCase {
+
+ public ServicesTestCase() {
+ super("services-test.composite", "services");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java
new file mode 100644
index 0000000000..c2f6bff4f5
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.version;
+
+import supplychain.VersionedSupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with versioning
+ */
+public class DSVersionTestCase extends VersionedSupplyChainTestCase {
+
+ public DSVersionTestCase() {
+ super("version-ds-test.composite", "version/ds");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java
new file mode 100644
index 0000000000..17ba7a2f14
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.version;
+
+import supplychain.VersionedSupplyChainTestCase;
+
+/**
+ * OSGi test program - procedural with versioning
+ */
+public class VersionTestCase extends VersionedSupplyChainTestCase {
+
+ public VersionTestCase() {
+ super("version-test.composite", "version");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java
new file mode 100644
index 0000000000..8c33720018
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.wiring;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with SCA wiring
+ */
+public class DSWiring1TestCase extends SupplyChainTestCase {
+
+ public DSWiring1TestCase() {
+ super("wiring-ds-test1.composite", "wiring/ds");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java
new file mode 100644
index 0000000000..0c6edd6691
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.wiring;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - declarative with SCA wiring
+ */
+public class DSWiring2TestCase extends SupplyChainTestCase {
+
+ public DSWiring2TestCase() {
+ super("wiring-ds-test2.composite", "wiring/ds");
+ }
+
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java
new file mode 100644
index 0000000000..0b48ac90ba
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.wiring;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - procedural with SCA wiring
+ */
+public class Wiring1TestCase extends SupplyChainTestCase {
+
+ public Wiring1TestCase() {
+ super("wiring-test1.composite", "wiring");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java
new file mode 100644
index 0000000000..c84741f34f
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package supplychain.wiring;
+
+import supplychain.SupplyChainTestCase;
+
+/**
+ * OSGi test program - procedural with SCA wiring
+ */
+public class Wiring2TestCase extends SupplyChainTestCase {
+
+ public Wiring2TestCase() {
+ super("wiring-test2.composite", "wiring");
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java
new file mode 100644
index 0000000000..5a9b2a8b1d
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/test/OSGiTestCase.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package test;
+
+import java.io.File;
+import java.net.MalformedURLException;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+import util.OSGiTestUtil;
+
+/**
+ * Test case setup base code - it is invoked with different composite files to test
+ * various scenarios.
+ */
+public abstract class OSGiTestCase extends TestCase {
+
+ private String compositeName;
+ private String contributionLocation;
+ public SCADomain scaDomain;
+
+ public OSGiTestCase(String compositeName, String contributionLocation) {
+ super();
+ this.compositeName = compositeName;
+ this.contributionLocation = contributionLocation;
+ try {
+ if (contributionLocation != null) {
+ File f = new File("target/classes/" + contributionLocation);
+ this.contributionLocation = f.toURL().toString();
+ }
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void setUp() throws Exception {
+
+ OSGiTestUtil.setUpOSGiTestRuntime();
+
+ scaDomain = SCADomain.newInstance("http://localhost", contributionLocation, compositeName);
+ }
+
+ protected void tearDown() throws Exception {
+ scaDomain.close();
+
+ OSGiTestUtil.shutdownOSGiRuntime();
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java b/branches/sca-equinox/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java
new file mode 100644
index 0000000000..7b95c12038
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package util;
+
+import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
+
+
+/**
+ * OSGi Test Utils
+ */
+public class OSGiTestUtil {
+
+ public static void setUpOSGiTestRuntime() throws Exception {
+
+ setUpFelixTestRuntime();
+ }
+
+
+ private static void setUpFelixTestRuntime() throws Exception {
+
+ String felixConfigFileName = "file:target/test-classes/osgi/felix/felix.config.properties";
+
+ System.setProperty("felix.config.properties", felixConfigFileName);
+
+ try {
+
+ ClassLoader cl = OSGiTestUtil.class.getClassLoader();
+
+ Class felixMainClass = cl.loadClass("org.apache.felix.main.Main");
+ if (felixMainClass != null) {
+ String felixDir = felixMainClass.getProtectionDomain().getCodeSource().getLocation().getPath();
+ int index = 0;
+ if ((index = felixDir.indexOf("/org.apache.felix.main")) >= 0) {
+ felixDir = felixDir.substring(0, index);
+ System.setProperty("FELIX_DIR", felixDir);
+ }
+ }
+
+ } catch (Exception e) {
+ // Ignore
+ }
+
+
+ }
+
+ public static void shutdownOSGiRuntime() {
+ try {
+ OSGiRuntime.stop();
+
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
+
+}
diff --git a/branches/sca-equinox/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties b/branches/sca-equinox/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties
new file mode 100644
index 0000000000..8399991503
--- /dev/null
+++ b/branches/sca-equinox/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+# Framework config properties.
+#
+org.osgi.framework.system.packages=org.osgi.framework; version=1.3.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.0.0, \
+ org.osgi.service.url; version=1.0.0 \
+ org.osgi.util.tracker; version=1.3.2
+
+
+felix.auto.start.1= \
+ "file://${FELIX_DIR}/org.apache.felix.scr/1.0.2/org.apache.felix.scr-1.0.2.jar" \
+ "file://${FELIX_DIR}/org.apache.felix.configadmin/1.0.1/org.apache.felix.configadmin-1.0.1.jar"
+
+
+# "file://${FELIX_DIR}/org.apache.felix.shell/1.0.1/org.apache.felix.shell-1.0.1.jar" \
+# "file://${FELIX_DIR}/org.apache.felix.shell.tui/1.0.1/org.apache.felix.shell.tui-1.0.1.jar" \
+# "file://${FELIX_DIR}/org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar" \
+
+felix.startlevel.framework=1
+felix.startlevel.bundle=1
+
+#
+# Bundle config properties.
+#
+org.osgi.service.http.port=8080
+obr.shell.telnet=on