当前位置: 首页>>代码示例>>Java>>正文


Java ServiceManager类代码示例

本文整理汇总了Java中org.apache.openejb.server.ServiceManager的典型用法代码示例。如果您正苦于以下问题:Java ServiceManager类的具体用法?Java ServiceManager怎么用?Java ServiceManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ServiceManager类属于org.apache.openejb.server包,在下文中一共展示了ServiceManager类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startNetworkServices

import org.apache.openejb.server.ServiceManager; //导入依赖的package包/类
@PostConstruct
public void startNetworkServices() throws Exception {

	if (ServiceManager.get() != null) {
		return;
	}

	getLog().info("Starting network services");

	manager = ServiceManager.getManager();

	manager.init();
	manager.start(false);
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:15,代码来源:NetworkServices.java

示例2: init

import org.apache.openejb.server.ServiceManager; //导入依赖的package包/类
@Override
public void init(final Properties props) throws Exception {
    if (props == null) {
        return;
    }

    virtualHost = props.getProperty("virtualHost", "localhost");
    auth = props.getProperty("auth", "NONE");
    realm = props.getProperty("realm", "PropertiesLogin");
    enabled = ServiceManager.isEnabled(props);
}
 
开发者ID:apache,项目名称:tomee,代码行数:12,代码来源:RESTService.java

示例3: checkZipIsOn

import org.apache.openejb.server.ServiceManager; //导入依赖的package包/类
@Test
public void checkZipIsOn() throws Exception {
    int checked = 0;
    for (final ServerService daemon : SimpleServiceManager.class.cast(ServiceManager.get()).getDaemons()) {
        if (ServiceDaemon.class.isInstance(daemon) && daemon.getName().equals("ejbd")) {
            assertTrue(EjbDaemon.class.cast(Reflections.get(Reflections.get(Reflections.get(Reflections.get(Reflections.get(Reflections.get(Reflections.get(daemon, "next"),
                    "service"), "service"), "service"),
                "service"), "service"), "server")).isGzip());
            checked++;
        }
    }
    assertEquals(1, checked);
}
 
开发者ID:apache,项目名称:tomee,代码行数:14,代码来源:ZEjbdTest.java

示例4: test

import org.apache.openejb.server.ServiceManager; //导入依赖的package包/类
@Test
public void test() throws Exception {
    System.setProperty("openejb.jmx.active", "true");
    final MBeanServer server = LocalMBeanServer.get();

    OpenEJB.init(new Properties());

    final Properties p = new Properties();
    p.put("server", "org.apache.openejb.server.ejbd.EjbServer");
    p.put("bind", "127.0.0.1");
    p.put("port", "0");
    p.put("disabled", "false");
    p.put("threads", "10");
    p.put("backlog", "200");
    p.put("discovery", "ejb:ejbd://{bind}:{port}");
    final ServerService service = ServiceManager.manage("ejbd", p, new EjbServer());
    service.init(p);
    service.start();

    ServiceManager.register("ejbd", service, server);

    ObjectName invocationsName = new ObjectName("openejb:type=ServerService,name=ejbd");

    MBeanInfo beanInfo = server.getMBeanInfo(invocationsName);

    for (MBeanAttributeInfo info : beanInfo.getAttributes()) {
        System.out.println(info);
    }

    service.stop();
    OpenEJB.destroy();
}
 
开发者ID:apache,项目名称:tomee,代码行数:33,代码来源:EjbdJmxTest.java

示例5: start

import org.apache.openejb.server.ServiceManager; //导入依赖的package包/类
public void start(final BundleContext bundleContext) throws Exception {
    manager = new ServiceManagerExtender(bundleContext);
    registration = bundleContext.registerService(ServiceManager.class.getName(), manager, null);
}
 
开发者ID:apache,项目名称:tomee,代码行数:5,代码来源:Activator.java


注:本文中的org.apache.openejb.server.ServiceManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。