If you have a single contribution jar which you want to bootstrap all the
deployable composite defined in the sca-contribution.xml. Here is my code
sample to bootstrap:


String storeLocation =
"File:///C:/ASV/Tuscany2x/Test/TestCase/sample-store-all.jar";

*node1* = NodeFactory.*newInstance*().createNode(*new* Contribution("store"
,storeLocation));

*node1*.start();

If you have multiple contributions, you can add as many Contributions in
createNode(..) e.g.



String storeLocation =
File:///C:/ASV/Tuscany2x/Test/TestCase/sample-store.jar<file:///C:/ASV/Tuscany2x/Test/TestCase/sample-store.jar>
;

String storeClientLocation =
File:///C:/ASV/Tuscany2x/Test/TestCase/sample-store-client.jar<file:///C:/ASV/Tuscany2x/Test/TestCase/sample-store-client.jar>
;

*node1* = NodeFactory.*newInstance*().createNode(*new*
Contribution("store",storeLocation),
*new* Contribution("storeClient", storeClientLocation));

*node1*.start();

You can also create multiple nodes to bootstrap different composites in
them.

Reply via email to