Package org.apache.geronimo.converter

Examples of org.apache.geronimo.converter.JDBCPool


    public ImportStatus(DatabaseConversionStatus original) {
        this.original = original;
        List list = new ArrayList();
        for (int i = 0; i < original.getNoTXPools().length; i++) {
            JDBCPool pool = original.getNoTXPools()[i];
            list.add(new PoolProgress(pool, PoolProgress.TYPE_NOTX));
        }
        for (int i = 0; i < original.getJdbcPools().length; i++) {
            JDBCPool pool = original.getJdbcPools()[i];
            list.add(new PoolProgress(pool, PoolProgress.TYPE_LOCAL));
        }
        for (int i = 0; i < original.getXaPools().length; i++) {
            XADatabasePool pool = original.getXaPools()[i];
            final PoolProgress progress = new PoolProgress(pool, PoolProgress.TYPE_XA);
            if(pool.getXaDataSourceClass().indexOf("apache.derby") < 0) {
                progress.setSkipped(true);
            }
            list.add(progress);
        }
        pools = (PoolProgress[]) list.toArray(new PoolProgress[list.size()]);
View Full Code Here


        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {
        if (!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() != null ? Integer.toString(
                    pool.getIdleTimeoutMillis().intValue() / (60 * 1000)) : null;
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if (pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if (info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

            }
        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {        if(!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() == null ? null : Integer.toString(pool.getIdleTimeoutMillis().intValue() / (60 * 1000));
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if(pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if(info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {
        if (!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() != null ? Integer.toString(
                    pool.getIdleTimeoutMillis().intValue() / (60 * 1000)) : null;
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if (pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if (info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

        if(pool.getDriverName().toLowerCase().indexOf("sybase") > -1) target.setVendor(JDBCPool.VENDOR_SYBASE);
        if(pool.getDriverName().toLowerCase().indexOf("informix") > -1) target.setVendor(JDBCPool.VENDOR_INFORMIX);
    }

    private static JDBCPool createJDBCPool(ConnectionPool pool, String name, String jndiName) {
        JDBCPool result = new JDBCPool();
        result.setName(name);
        result.setJndiName(jndiName);
        populatePool(pool, result);
        result.setConnectionProperties(pool.getProperties());
        result.setDriverClass(pool.getDriverName());
        result.setJdbcURL(pool.getUrl());
        // Don't bother putting encrypted passwords into the pool
        if(pool.getPassword() != null && !pool.getPassword().startsWith("{")) {
            result.setPassword(pool.getPassword());
        }
        result.setUsername(pool.getUsername());
        return result;
    }
View Full Code Here

        test = getChildText(root, "prepared-statement-cache-size");
        if(test != null && !test.equals("")) pool.setStatementCacheSize(new Integer(test));
    }

    private static void addJDBCDataSource(Element root, List status, List results) {
        JDBCPool pool = new JDBCPool();
        addDataSourceCommon(root, pool, status);
        pool.setJdbcURL(getChildText(root, "connection-url"));
        pool.setDriverClass(getChildText(root, "driver-class"));
        NodeList list = root.getElementsByTagName("connection-property");
        for(int i=0; i<list.getLength(); i++) {
            Element prop = (Element) list.item(i);
            pool.getConnectionProperties().setProperty(prop.getAttribute("name"), getText(prop));
        }
        pool.setUsername(getChildText(root, "user-name"));
        pool.setPassword(getChildText(root, "password"));


        if(pool.getName() != null && !pool.getName().equals("")) {
            results.add(pool);
        } else {
            status.add("WARN: Ignoring pool with no JNDI name");
        }
    }
View Full Code Here

    public ImportStatus(DatabaseConversionStatus original) {
        this.original = original;
        List list = new ArrayList();
        for (int i = 0; i < original.getNoTXPools().length; i++) {
            JDBCPool pool = original.getNoTXPools()[i];
            list.add(new PoolProgress(pool, PoolProgress.TYPE_NOTX));
        }
        for (int i = 0; i < original.getJdbcPools().length; i++) {
            JDBCPool pool = original.getJdbcPools()[i];
            list.add(new PoolProgress(pool, PoolProgress.TYPE_LOCAL));
        }
        for (int i = 0; i < original.getXaPools().length; i++) {
            XADatabasePool pool = original.getXaPools()[i];
            final PoolProgress progress = new PoolProgress(pool, PoolProgress.TYPE_XA);
            if(pool.getXaDataSourceClass().indexOf("apache.derby") < 0) {
                progress.setSkipped(true);
            }
            list.add(progress);
        }
        pools = (PoolProgress[]) list.toArray(new PoolProgress[list.size()]);
View Full Code Here

        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {
        if(!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() == null ? null : Integer.toString(pool.getIdleTimeoutMillis().intValue() / (60 * 1000));
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if(pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if(info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {
        if (!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() != null ? Integer.toString(
                    pool.getIdleTimeoutMillis().intValue() / (60 * 1000)) : null;
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if (pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if (info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

        }
    }

    private void loadImportedData(PortletRequest request, PoolData data, ImportStatus.PoolProgress progress) throws PortletException {
        if (!progress.getType().equals(ImportStatus.PoolProgress.TYPE_XA)) {
            JDBCPool pool = (JDBCPool) progress.getPool();
            data.dbtype = "Other";
            data.adapterDisplayName = "TranQL Generic JDBC Resource Adapter";
            data.blockingTimeout = getImportString(pool.getBlockingTimeoutMillis());
            data.driverClass = pool.getDriverClass();
            data.idleTimeout = pool.getIdleTimeoutMillis() != null ? Integer.toString(
                    pool.getIdleTimeoutMillis().intValue() / (60 * 1000)) : null;
            data.maxSize = getImportString(pool.getMaxSize());
            data.minSize = getImportString(pool.getMinSize());
            data.name = pool.getName();
            data.password = pool.getPassword();
            data.url = pool.getJdbcURL();
            data.user = pool.getUsername();
            if (pool.getDriverClass() != null) {
                DatabaseDriver info = getDatabaseInfoFromDriver(request, data);
                if (info != null) {
                    data.rarPath = info.getRAR().toString();
                    data.urlPrototype = info.getURLPrototype();
                } else {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.converter.JDBCPool

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.