Package org.osoa.sca

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


    public static void main(String[] args) {
        try {
            HelloWorldRmiClient rmiClient = new HelloWorldRmiClient();
                       
            CompositeContext context = CurrentCompositeContext.getContext();
            HelloWorldService helloWorldService = context.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
            System.out.println("***********************************************************");
            System.out.println(helloWorldService.sayHello("SCA RMI Client"));
            System.out.println("***********************************************************");
        } catch ( Exception e ) {
            e.printStackTrace();
View Full Code Here


*/
public class HelloWorldClient {

    public  final static void main(String[] args) throws Exception {
        CompositeContext compositeContext = CurrentCompositeContext.getContext();
        HelloWorldService helloWorldService= compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
        String value = helloWorldService.getGreetings("World");
        System.out.println(value);
    }
}
View Full Code Here

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

        Object service = moduleContext.locateService(Object.class, mName);

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

            throw new JspException("Invalid profile location specified");
        }

        CompositeContext moduleContext = CurrentCompositeContext.getContext();

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

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

    @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

        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

    @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

        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

        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

        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

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.