Package org.tubo.exception

Examples of org.tubo.exception.TuboResourceException


            return RESOURCE;
        }

        public void restore(Resource resource) throws TuboResourceException {
            if (!RESOURCE.equals(resource))
                throw new TuboResourceException();
        }
View Full Code Here


        Resource resource = null;
        try {
            resource = (Resource)getPool().borrowObject();
        } catch (Exception e) {
            log.fatal(".get() - Error getting resource.",e);
            TuboResourceException ex = new TuboResourceException("Error getting resource",e);
            throw ex;
        }
        return resource;
    }
View Full Code Here

    public void restore(Resource resource) throws TuboResourceException {
        try {
            getPool().returnObject(resource);
        } catch (Exception e) {
            log.fatal(".restore() - Error returning resource.",e);
            TuboResourceException ex = new TuboResourceException("Error returning resource",e);
            throw ex;
        }
    }
View Full Code Here

            //
            // log error
            log.error("Error trying to get a KERNEL", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get a Kernel",e);
        }
        //
        // return
        return kernel;
    }
View Full Code Here

            //
            // log error
            log.error("Error trying to get an Item", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get an Item",e);
        }
        //
        // return
        return item;
    }
View Full Code Here

            //
            // log error
            log.error("Error trying to get an Event", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get an Event",e);
        }
        //
        // return
        return event;
    }
View Full Code Here

            //
            // log error
            log.error("Error trying to get a FlowContext", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get a FlowContext",e);
        }
        //
        // return
        return flowContext;
    }
View Full Code Here

            //
            // log error
            log.error("Error trying to get ExceptionManager", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get ExceptionManager '"+SPRING_EXCEPTION_MANAGER_BEAN_ID+"'",e);
        }
        //
        // check if manager==null (I need to be sure of this ... this method can'tt return null!)
        if (manager == null) {
            //
            // log error
            log.error("Error when returning ExceptionManager, return null");
            //
            // throw
            throw new TuboResourceException("Error when returning ExceptionManager, return null");
        }
        //
        // return
        return manager;
    }
View Full Code Here

        // create Spring resource descriptor based on configuration
        String stringResource = null;
        try {
            stringResource = createSpringContext(config);
        } catch (TuboResourceException e) {
            throw new TuboResourceException("Tubo configuration can't be created",e);
        }
        //
        // create Bean Factory
        ByteArrayResource byteResource = new ByteArrayResource(stringResource.getBytes());
        BeanFactory beanFactory = new XmlBeanFactory(byteResource);
        //
        // get resource manager
        SpringResourceManagerImpl rm = null;
        try {
            //
            // get FlowExecutor via Spring
            rm = (SpringResourceManagerImpl)beanFactory.getBean(SPRING_RESOURCE_MANAGER_BEAN_ID);
        } catch (BeansException e) {
            //
            // log error
            log.error("Error trying to get ResourceManager", e);
            //
            // throw
            throw new TuboResourceException("Error trying to get Spring ResourceManager",e);
        }
        //
        // set configuration
        // TODO: can be inyected?
        rm.setConfiguration(config);
View Full Code Here

        p.setProperty("resource.loader", "class");
        p.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
        try {
            Velocity.init(p);
        } catch (Exception e) {
            throw new TuboResourceException("Velocity can't be initialized",e);
        }
    }
View Full Code Here

TOP

Related Classes of org.tubo.exception.TuboResourceException

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.