Package org.tubo.exception

Examples of org.tubo.exception.TuboKernelException


            Configuration config = manager.getConfiguration();
            //
            // crate a new Resurce Manager based on Spring implementation
            rm = SpringResourceManagerImpl.newInstance(config);
        } catch (TuboException e) {
            throw new TuboKernelException("ResourceManager can't be created",e);
        }
        //
        // create kernel
        Kernel kernel = rm.getKernel();
        //
View Full Code Here


        // create a ConfigurationManager
        ConfigurationManager configurationManager;
        try {
            configurationManager = new ConfigurationManager();
        } catch (TuboConfigurationException e) {
            throw new TuboKernelException("ConfigurationManager can't be created",e);
        }
        //
        // load base configuration
        try {
            String baseConfig = getBaseConfigLocation();
            log.info(".createKernel() - Loading base config url="+baseConfig);
            configurationManager.appendResource(baseConfig);
        } catch (TuboConfigurationException e) {
            throw new TuboKernelException("Base Config Location can't be configured",e);
        }
        //
        // append custom connfiguration
        for (Iterator it=configLocations.iterator(); it.hasNext();) {
            String resourceLocation = (String)it.next();
            log.info(".createKernel() - Appendig config url="+configLocations);
            try {
                configurationManager.appendResource(resourceLocation);
            } catch (TuboConfigurationException e) {
                throw new TuboKernelException("Config "+resourceLocation+" has problems to be appened",e);
            }
        }
        //
        // create a instance of KernelBuilder based on configuration
        String kernelBuilderClassName = configurationManager.getConfiguration().getKernelBuilderClassName();
        KernelBuilder kernelBuilder;
        try {
            kernelBuilder = (KernelBuilder)Class.forName(kernelBuilderClassName).newInstance();
        } catch (InstantiationException e) {
            throw new TuboKernelException("Error instanciating KernelBuilder ("+kernelBuilderClassName+")",e);
        } catch (IllegalAccessException e) {
            throw new TuboKernelException("Illegal Access error when try to instanciate KernelBuilder ("+kernelBuilderClassName+")",e);
        } catch (ClassNotFoundException e) {
            throw new TuboKernelException("Class not found error when try to instanciate KernelBuilder ("+kernelBuilderClassName+")",e);
        }
        //
        // create a Kernel
        Kernel kernel;
        try {
            log.info(".createKernel() - Creating Kernel");
            kernel = kernelBuilder.create(configurationManager);
        } catch (TuboException e) {
            throw new TuboKernelException("Error while creating Kernel",e);
        }
        //
        // return kernel
        log.info(".createKernel() - Kernel created");
        return kernel;
View Full Code Here

TOP

Related Classes of org.tubo.exception.TuboKernelException

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.