Package org.tubo.resource

Examples of org.tubo.resource.Resource


        //
        // set a Manager Strategy
        manager.setStrategy(STRATEGY);
        //
        // get resource
        Resource resource = manager.get();
        //
        // restore resource
        try {
            manager.restore(resource);
        } catch (TuboResourceException e) {
View Full Code Here


public class BaseComponentManagerImpl extends BaseManagerImpl implements ComponentManager {
    public static final String RCS_ID = "$Id: BaseComponentManagerImpl.java 115 2009-05-07 05:20:22Z maldito_orco $";
    private static Log log = LogFactory.getLog(BaseComponentManagerImpl.class);

    public Component getComponent() throws TuboException {
        Resource resource = get();
        Component component = (Component)resource;
        return component;
    }
View Full Code Here

     * Get a Resource from pool
     * @return a Resource
     * @throws org.tubo.exception.TuboResourceException
     */
    public Resource get() throws TuboResourceException {
        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);
View Full Code Here

     *
     * @return a Consumer instance
     * @throws TuboException
     */
    public Consumer getConsumer() throws TuboException {
        Resource resource = get();
        Consumer consumer = (Consumer)resource;
        return consumer;
    }
View Full Code Here

    /**
     * A get resource wrapper for a Connection
     * @return a Connection managed by this manager
     */
    public Connection getConnection() {
        Resource resource = get();
        Connection connection = (Connection)resource;
        return connection;
    }
View Full Code Here

TOP

Related Classes of org.tubo.resource.Resource

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.