Package org.jboss.dashboard.database

Examples of org.jboss.dashboard.database.JNDIDataSourceEntry


        String jndiName = hbmConfig.getProperty("hibernate.connection.datasource");
        if (StringUtils.isBlank(jndiName)) throw new Exception("Property 'hibernate.connection.datasource' not specified.");

        // Obtain the application data source.
        JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
        jndiDS.setJndiPath(jndiName);
        return localDataSource = jndiDS.getDataSource();
    }
View Full Code Here


        }
    }

    public Connection getConnection() throws Exception {
        if (getType().equals(JNDI_TYPE)) {
            JNDIDataSourceEntry jndi = new JNDIDataSourceEntry();
            jndi.setJndiPath(getJndiPath());
            return jndi.getConnection();
        }
        if (getType().equals(CUSTOM_TYPE)) {
            JDBCDataSourceEntry custom = new JDBCDataSourceEntry();
            custom.setUrl(getUrl());
            custom.setDriverClass(getDriverClass());
View Full Code Here

                if (dSource instanceof JNDIDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    setJndiStatusError();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    setJdbcStatusError();
                } else if (dSource instanceof JNDIDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    JNDIDataSourceEntry jndiDS = (JNDIDataSourceEntry) dSource;
                    fillValues(jndiDS);
                    jndiDS.save();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    JDBCDataSourceEntry polyDS = (JDBCDataSourceEntry) dSource;
                    fillValues(polyDS);
                    if(polyDS.getPassword()==null ||
                            (passwordChanged!=null && "true".equals(passwordChanged))||
                            !PARAM_DEFAULT_PASS_VALUE.equals(getPassword())){
                        polyDS.setPassword(getPassword());
                    }
                    polyDS.save();
                }
            }
        }
        // Create a DataSource
        else {
            if (getType().equals(JNDI_TYPE)) {
                JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
                fillValues(jndiDS);
                jndiDS.save();

            } else if (getType().equals(CUSTOM_TYPE)) {
                JDBCDataSourceEntry polyDS = new JDBCDataSourceEntry();
                fillValues(polyDS);
                polyDS.setPassword(getPassword());
View Full Code Here

        }
    }

    public Connection getConnection() throws Exception {
        if (getType().equals(JNDI_TYPE)) {
            JNDIDataSourceEntry jndi = new JNDIDataSourceEntry();
            jndi.setJndiPath(getJndiPath());
            return jndi.getConnection();
        }
        if (getType().equals(CUSTOM_TYPE)) {
            JDBCDataSourceEntry custom = new JDBCDataSourceEntry();
            custom.setUrl(getUrl());
            custom.setDriverClass(getDriverClass());
View Full Code Here

                if (dSource instanceof JNDIDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    setJndiStatusError();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    setJdbcStatusError();
                } else if (dSource instanceof JNDIDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    JNDIDataSourceEntry jndiDS = (JNDIDataSourceEntry) dSource;
                    fillValues(jndiDS);
                    jndiDS.save();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    JDBCDataSourceEntry polyDS = (JDBCDataSourceEntry) dSource;
                    fillValues(polyDS);
                    if(polyDS.getPassword()==null ||
                            (passwordChanged!=null && "true".equals(passwordChanged))||
                            !PARAM_DEFAULT_PASS_VALUE.equals(getPassword())){
                        polyDS.setPassword(getPassword());
                    }
                    polyDS.save();
                }
            }
        }
        // Create a DataSource
        else {
            if (getType().equals(JNDI_TYPE)) {
                JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
                fillValues(jndiDS);
                jndiDS.save();

            } else if (getType().equals(CUSTOM_TYPE)) {
                JDBCDataSourceEntry polyDS = new JDBCDataSourceEntry();
                fillValues(polyDS);
                polyDS.setPassword(getPassword());
View Full Code Here

        String jndiName = hbmConfig.getProperty("hibernate.connection.datasource");
        if (StringUtils.isBlank(jndiName)) throw new Exception("Property 'hibernate.connection.datasource' not specified.");

        // Obtain the application data source.
        JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
        jndiDS.setJndiPath(jndiName);
        return localDataSource = jndiDS.getDataSource();
    }
View Full Code Here

        }
    }

    public Connection getConnection() throws Exception {
        if (getType().equals(JNDI_TYPE)) {
            JNDIDataSourceEntry jndi = new JNDIDataSourceEntry();
            jndi.setJndiPath(getJndiPath());
            return jndi.getConnection();
        }
        if (getType().equals(CUSTOM_TYPE)) {
            JDBCDataSourceEntry custom = new JDBCDataSourceEntry();
            custom.setUrl(getUrl());
            custom.setDriverClass(getDriverClass());
View Full Code Here

                if (dSource instanceof JNDIDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    setJndiStatusError();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    setJdbcStatusError();
                } else if (dSource instanceof JNDIDataSourceEntry && getType().equals(JNDI_TYPE)) {
                    JNDIDataSourceEntry jndiDS = (JNDIDataSourceEntry) dSource;
                    fillValues(jndiDS);
                    jndiDS.save();
                } else if (dSource instanceof JDBCDataSourceEntry && getType().equals(CUSTOM_TYPE)) {
                    JDBCDataSourceEntry polyDS = (JDBCDataSourceEntry) dSource;
                    fillValues(polyDS);
                    if(polyDS.getPassword()==null ||
                            (passwordChanged!=null && "true".equals(passwordChanged))||
                            !PARAM_DEFAULT_PASS_VALUE.equals(getPassword())){
                        polyDS.setPassword(getPassword());
                    }
                    polyDS.save();
                }
            }
        }
        // Create a DataSource
        else {
            if (getType().equals(JNDI_TYPE)) {
                JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
                fillValues(jndiDS);
                jndiDS.save();

            } else if (getType().equals(CUSTOM_TYPE)) {
                JDBCDataSourceEntry polyDS = new JDBCDataSourceEntry();
                fillValues(polyDS);
                polyDS.setPassword(getPassword());
View Full Code Here

        String jndiName = hbmConfig.getProperty("hibernate.connection.datasource");
        if (StringUtils.isBlank(jndiName)) throw new Exception("Property 'hibernate.connection.datasource' not specified.");

        // Obtain the application data source.
        JNDIDataSourceEntry jndiDS = new JNDIDataSourceEntry();
        jndiDS.setJndiPath(jndiName);
        return localDataSource = jndiDS.getDataSource();
    }
View Full Code Here

        return result;
    }

    public Connection getConnection() throws Exception {
        if (getType().equals(JNDI_TYPE)) {
            JNDIDataSourceEntry jndi = new JNDIDataSourceEntry();
            jndi.setJndiPath(getJndiPath());
            return jndi.getConnection();
        }
        if (getType().equals(CUSTOM_TYPE)) {
            JDBCDataSourceEntry polyds = new JDBCDataSourceEntry();
            polyds.setUrl(getUrl());
            polyds.setDriverClass(getDriverClass());
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.database.JNDIDataSourceEntry

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.