Package com.foundationdb.server.service

Examples of com.foundationdb.server.service.ServiceManager


    /** Construct for given index and context */
    public FullTextQueryBuilder(FullTextIndex index, AkibanInformationSchema ais,
                                QueryContext buildContext) {
        this.indexName = index.getIndexName();
        ServiceManager serviceManager = null;
        if (buildContext != null) {
            try {
                serviceManager = buildContext.getServiceManager();
            }
            catch (UnsupportedOperationException ex) {
            }
        }
        if (serviceManager != null) {
            this.infos = serviceManager.getServiceByClass(FullTextIndexService.class);
        }
        else {
            this.infos = new TestFullTextIndexInfos(ais);
        }
        this.buildContext = buildContext;
View Full Code Here


            // Do not abort on error as init scripts handle this fine.
        }
    }

    private static void doStartup() throws Exception {
        final ServiceManager serviceManager = new GuicedServiceManager();

        Main.shutdownBean = new ShutdownMXBeanImpl(serviceManager);

        // JVM shutdown hook.
        // Register before startServices() so services are still brought down on startup error.
        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
            @Override
            public void run() {
                shutdownBean.shutdown();
            }
        }, "ShutdownHook"));

        // Bring system up
        serviceManager.startServices();

        ObjectName name = new ObjectName(ShutdownMXBeanImpl.BEAN_NAME);
        ManagementFactory.getPlatformMBeanServer().registerMBean(shutdownBean, name);
    }
View Full Code Here

    }
   
    private static ServiceManager prepareServices()
    {
        System.setProperty("fdbsql.home", System.getProperty("user.home"));
        ServiceManager ret = createServiceManager();
        ret.startServices();
       
        return ret;
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.service.ServiceManager

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.