Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANodeFactory


    private CalculatorService calculatorService;
    private SCANode node;

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANodeFromClassLoader("Calculator.composite", getClass().getClassLoader());
        node.start();
       
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here


            DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
            manager = managerLauncher.createDomainManager();
            manager.start();
           
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
            nodeC  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeC");
            nodeB  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeB");
            nodeA  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeA");

            nodeC.start();
            nodeB.start();
            nodeA.start();
           
View Full Code Here

            timeout = Long.parseLong(args[0]);
        }

        System.out.println("Starting the Sample SCA Calculator...");

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorServer.class.getClassLoader());
        node.start();

        if (timeout < 0) {
            System.out.println("Press Enter to Exit...");
            System.in.read();
View Full Code Here

public class CallbackJMSClient {
 
  public static void main(String[] args) throws Exception {

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("callbacks.composite", CallbackJMSClient.class.getClassLoader());
        node.start();
       
        OrderServiceClient orderServiceClient = ((SCAClient)node).getService(OrderServiceClient.class, "ClientComponent");
       
        // do something
View Full Code Here

* and locate and invoke a SCA component
*/
public class CalculatorClient {
    public static void main(String[] args) throws Exception {

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
        node.start();
       
        CalculatorService calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        // Calculate
View Full Code Here

* and locate and invoke a SCA component
*/
public class BigBankClient {
    public static void main(String[] args) throws Exception {

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("BigBank.composite", BigBankClient.class.getClassLoader());
        node.start();
       
        AccountService accountService = ((SCAClient)node).getService(AccountService.class, "AccountServiceComponent");

        System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") );
View Full Code Here

            timeout = Long.parseLong(args[0]);
        }
       
        System.out.println("Starting the Sample SCA Spring BigBank server...");
               
        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("BigBank.composite", BigBankServer.class.getClassLoader());
        node.start();

        if (timeout < 0) {
            System.out.println("Press Enter to Exit...");
            System.in.read();
View Full Code Here

            jmsBroker.setPersistent(false);
            jmsBroker.setUseJmx(false);
            jmsBroker.addConnector("tcp://localhost:61619");
            jmsBroker.start();
           
            SCANodeFactory factory = SCANodeFactory.newInstance();
            SCANode node = factory.createSCANodeFromClassLoader("CheckingsAccount.composite", CheckingAccountServer.class.getClassLoader());
            node.start();

            if (timeout < 0) {
                System.out.println("CheckingsAccount server started (press enter to shutdown)");
                System.in.read();
View Full Code Here

        } catch (java.lang.SecurityException e) {
            System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader()
                .getResource("implementation/policies/CalculatorJass.config").toString());
        }

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("implementation/policies/Calculator.composite", CalculatorServiceImpl.class.getClassLoader());
        node.start();       
             
        CalculatorService calculatorService =
            ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
View Full Code Here

            
        try {
            System.out.println("Setting up domain");

           
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
            nodeC = nodeFactory.createSCANode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeC",
                                    new File("src/main/resources/nodeC").toURL().toString()));
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeB",
                                    new File("src/main/resources/nodeB").toURL().toString()));
            nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeA",
                                    new File("src/main/resources/nodeA").toURL().toString()));

            nodeC.start();
            nodeB.start();
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCANodeFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.