Package org.apache.geronimo.testsuite.aries.custom.api

Examples of org.apache.geronimo.testsuite.aries.custom.api.HelloService


            bundleContext = (BundleContext) sc.getAttribute("osgi-bundlecontext");
            PrintWriter pw = response.getWriter();
            if (bundleContext != null) {
                ServiceReference sr = bundleContext.getServiceReference(HelloService.class.getName());
                if (sr != null) {
                    HelloService sm = (HelloService) bundleContext.getService(sr);
                    pw.println(sm.sayHello());
                    bundleContext.ungetService(sr);
                }
            } else {
                pw.println("Bundle Context is Null");
            }
         
            //JNDI Lookup via osgi:service
            HelloService sm = (HelloService) getOSGIService(HelloService.class.getName(),null);
            if(sm != null){
                pw.println(sm.sayHello());
            }else {
                pw.println("Service Lookup is Null");
            }
           
          
View Full Code Here

TOP

Related Classes of org.apache.geronimo.testsuite.aries.custom.api.HelloService

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.