Examples of registerService()


Examples of org.apache.felix.ipojo.context.ServiceRegistry.registerService()

    try {
      assertNull("Check that there is no available service", registry.getServiceReferences(null, null));
    } catch (InvalidSyntaxException e) { fail("Cannot query the registry : " + e.getMessage()); }
    registry.addServiceListener(all);
   
    ServiceRegistration reg1 = registry.registerService(im, BarService.class.getName(), new barProvider(), null);
   
    try {
      assertEquals("Check number of registred service", 1, registry.getServiceReferences(null, null).length);
    } catch (InvalidSyntaxException e) { fail("Cannot query the registry : " + e.getMessage());
     }
View Full Code Here

Examples of org.apache.felix.ipojo.context.ServiceRegistry.registerService()

    try {
      assertEquals("Check number of registred service", 1, registry.getServiceReferences(null, null).length);
    } catch (InvalidSyntaxException e) { fail("Cannot query the registry : " + e.getMessage());
     }
 
      ServiceRegistration reg2 = registry.registerService(im2, BarService.class.getName(), new barProvider(), null);
     
     try {
      assertEquals("Check number of registred service", 2, registry.getServiceReferences(null, null).length);
    } catch (InvalidSyntaxException e) { fail("Cannot query the registry : " + e.getMessage()); }
     
View Full Code Here

Examples of org.apache.geronimo.kernel.osgi.MockBundleContext.registerService()

                @Override
                public int getBundleType(Bundle bundle) {
                    return 0;
                }
            };
        bundleContext.registerService(PackageAdmin.class.getName(), packageAdmin, null);
        builder = new JettyModuleBuilder(defaultEnvironment,
                new Integer(1800),
                new AbstractNameQuery(containerName),
                //new AbstractNameQuery(containerName),
                new WebAppInfo(),
View Full Code Here

Examples of org.apache.hadoop.gateway.services.registry.ServiceRegistry.registerService()

          contributor.contributeService( context, service );
          if (gatewayServices != null) {
            ServiceRegistry sr = (ServiceRegistry) gatewayServices.getService(GatewayServices.SERVICE_REGISTRY_SERVICE);
            if (sr != null) {
              String regCode = sr.getRegistrationCode(topology.getName());
              sr.registerService(regCode, topology.getName(), service.getRole(), service.getUrl() );
            }
          }
        } catch( Exception e ) {
          // Maybe it makes sense to throw exception
          log.failedToContributeService( service.getName(), service.getRole(), e );
View Full Code Here

Examples of org.apache.hadoop.yarn.lib.ZKClient.registerService()

    test("/some/test");
  }

  private void test(String testClient) throws Exception {
    ZKClient client = new ZKClient(hostPort);
    client.registerService("/nodemanager", "hostPort");
    client.unregisterService("/nodemanager");
  }

}
View Full Code Here

Examples of org.apache.lucene.gdata.server.registry.GDataServerRegistry.registerService()

        field.setPath("/somePath");
        field.setContentType(ContentType.TEXT);
        this.schema.addSchemaField(field);
        stub.setIndexSchema(this.schema);

        reg.registerService(stub);
    }

    protected void tearDown() throws Exception {
        super.tearDown();
        GDataServerRegistry.getRegistry().destroy();
View Full Code Here

Examples of org.apache.tuscany.sca.host.rmi.DefaultRMIHost.registerService()

        }
    }

    public void testRegisterService1() throws RMIHostRuntimeException, RMIHostException {
        DefaultRMIHost host = new DefaultRMIHost();
        host.registerService("foo1", new MockRemote());
        host.unregisterService("foo1");
    }

    public void testRegisterService2() throws RMIHostRuntimeException, RMIHostException {
        DefaultRMIHost host = new DefaultRMIHost();
View Full Code Here

Examples of org.apache.velocity.tools.view.servlet.ServletToolboxManager.registerService()

            ServletToolboxManager toolboxManager = (ServletToolboxManager) VelocityUtil.getToolboxManager();
            if ( toolboxManager != null ) {

                serviceRefSelected = context.getServiceReference( PrimitiveToolboxManager.class.getName() );
                if ( serviceRefSelected == null ) {
                    toolboxManager.registerService();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext.registerService()

        services.put(ResourceInjectionService.class, new CdiResourceInjectionService());
        services.put(ScannerService.class, new CdiScanner());
        WebBeansContext webBeansContext = new WebBeansContext(services, properties);
        //must be last since it copies stuff
        OpenEJBLifecycle lifecycle = new OpenEJBLifecycle(webBeansContext);
        webBeansContext.registerService(ContainerLifecycle.class, lifecycle);

        WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
        try {
            //from OWB's WebBeansConfigurationListener
View Full Code Here

Examples of org.codehaus.activesoap.handler.xmlbeans.XMLBeansRegistry.registerService()

    public void testSubscribeWithSOAPEndpoint() throws Exception {
        StubNotificationConsumer service = new StubNotificationConsumer();

        XMLBeansRegistry registry = new XMLBeansRegistry();
        registry.registerService(service);

        final SoapService serverSide = new SoapService(registry);
        serverSide.setRepairingNamespace(true);

        ActiveMQNotificationBroker broker = new ActiveMQNotificationBroker() {
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.