Examples of locateService()


Examples of org.osoa.sca.CompositeContext.locateService()

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);
        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List entries;
        try {
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

    @Override
    public int doStartTag() throws JspException {
        CompositeContext moduleContext = CurrentCompositeContext.getContext();

        ProfileService profile = moduleContext.locateService(ProfileService.class, mProfileService);

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

        if (profile == null) {
            throw new JspException("Profile [" + mProfileService + "] not found in current module context");
        }

        AccountService service = (AccountService) moduleContext.locateService(AccountService.class, mAccountService);

        if (service == null) {
            throw new JspException("Service [" + mAccountService + "] not found in current module context");
        }
        List summaries;
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

        System.out.println("\n\n***************************************");
        System.out.println("Starting the Calculator Combo sample!!!");
        System.out.println("***************************************");
        CompositeContext context = CurrentCompositeContext.getContext();
        CalculatorService calculatorService =
            (CalculatorService)context.locateService(CalculatorService.class, "CalculatorServiceComponent");
        System.out.println("\nInvoking Java Implementation ... ");
        System.out.println((new StringBuilder()).append("3 + 2 = ").append(calculatorService.add(3D, 2D))
            .toString());
        System.out.println("\nInvoking Ruby Implementation ... ");
        System.out.println((new StringBuilder()).append("3 - 2 = ")
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

        System.out.println("\nInvoking WebService Implementation ... ");
        System.out.println((new StringBuilder()).append("3 / 2 = ").append(calculatorService.divide(3D, 2D))
            .toString());
        System.out.println("\nInvoking Scientific Calculator Composite Implementation ... ");
        SciCalculatorService sciCalculator =
            (SciCalculatorService)context.locateService(SciCalculatorService.class, "sciCalculatorService");
        double values[] = {1.0D, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D};
        System.out.println("\tInvoking Java Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tAverage of 1,2,3,4,5,6,7,8,9 = ")
            .append(sciCalculator.average(values)).toString());
        System.out.println("\n\tInvoking JavaScript Implementation  ... ");
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

    protected void setUp() throws Exception {
        setApplicationSCDL(Source.class, "META-INF/sca/default.scdl");
        super.setUp();

        CompositeContext context = CurrentCompositeContext.getContext();
        source = context.locateService(Source.class, "SourceComponent");
    }

    public void test() throws Exception {
        try {
            System.out.println("Main thread " + Thread.currentThread());
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

public class SimpleCallbackClient {

    public static void main(String[] args) throws Exception {
        // Locate the MyClient component and invoke it
        CompositeContext context = CurrentCompositeContext.getContext();
        MyClient myClient = context.locateService(MyClient.class, "MyClientComponent");
        System.out.println("Main thread " + Thread.currentThread());
        myClient.aClientMethod();
        Thread.sleep(500);
    }
}
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

        addExtension("binding.ws", new URL(base, "default.scdl"));
        base = getClass().getResource("/META-INF/sca/databinding.sdo.scdl");
        addExtension("databindning.sdo", new URL(base, "default.scdl"));
        super.setUp();
        CompositeContext compositeContext = CurrentCompositeContext.getContext();
        helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
    }

    public void testWSClient() throws Exception {
        String msg = helloWorldService.getGreetings("Smith");
        Assert.assertEquals("Hello Smith", msg);
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

    public static final void main(String[] args) throws Exception {
       
        // Locate the Customer component and invoke it
        CompositeContext context = CurrentCompositeContext.getContext();
        Customer customer =
                context.locateService(Customer.class, "CustomerComponent");

        System.out.println("Main thread " + Thread.currentThread());
        customer.purchaseGoods();
        System.out.println("Main thread sleeping ...");
        Thread.sleep(1000);
View Full Code Here

Examples of org.osoa.sca.CompositeContext.locateService()

public class InnerCompositeClient {

    public static void main(String[] args) throws Exception {
        CompositeContext context = CurrentCompositeContext.getContext();

        Source source = context.locateService(Source.class, "SourceComponent");
        System.out.println("Main thread " + Thread.currentThread());
        source.clientMethod("Client.main");
        Thread.sleep(500);
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.