Package org.apache.airavata.common.utils

Examples of org.apache.airavata.common.utils.DBUtil


      ClassNotFoundException, InstantiationException {
    String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
    String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
    String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
    String driver = ServerSettings.getCredentialStoreDBDriver();
    return new CredentialReaderImpl(new DBUtil(jdbcUrl, jdbcUsr, jdbcPass,
        driver));
  }
View Full Code Here


        try {
            String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
            String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
            String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
            String driver = ServerSettings.getCredentialStoreDBDriver();
          return new DBUtil(jdbcUrl,jdbcUsr,jdbcPass,driver);
        } catch (InstantiationException e) {
          logger.error("Error while accesing registrty settings ", e);
          throw new RegException("Error while accesing registrty settings ", e);
        } catch (IllegalAccessException e) {
          logger.error("Error while reading registrty settings ", e);
View Full Code Here

    private NotifierBootstrap notifierBootstrap;

    public void init() throws ServletException {

        DBUtil dbUtil;

        try {
            dbUtil = DBUtil.getCredentialStoreDBUtil();
        } catch (Exception e) {
            throw new ServletException("Error initializing database operations.", e);
View Full Code Here

    }

    private void initializeDatabaseLookup() throws RuntimeException {

        try {
            this.dbUtil = new DBUtil(getDatabaseURL(), getDatabaseUserName(), getDatabasePassword(), getDatabaseDriver());
        } catch (ClassNotFoundException e) {
            throw new RuntimeException("Error loading database driver. Driver class not found.", e);
        } catch (InstantiationException e) {
            throw new RuntimeException("Error loading database driver. Error instantiating driver object.", e);
        } catch (IllegalAccessException e) {
View Full Code Here

        log.debug(stringBuilder.toString());
    }

    protected void initializeDatabaseLookup(String passwordColumn, String userTable, String userNameColumn) throws IllegalAccessException, ClassNotFoundException, InstantiationException {

        DBUtil dbUtil = new DBUtil(getDatabaseURL(), getDatabaseUserName(), getDatabasePassword(), getDatabaseDriver());
        DataSource dataSource = dbUtil.getDataSource();
        jdbcRealm.setDataSource(dataSource);

        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append("SELECT ").append(passwordColumn).append(" FROM ").append(userTable).append(" WHERE ")
View Full Code Here

        try {
          String url = RegistrySettings.getSetting("registry.jdbc.url");
          String driver = RegistrySettings.getSetting("registry.jdbc.driver");
          String username = RegistrySettings.getSetting("registry.jdbc.user");
          String password = RegistrySettings.getSetting("registry.jdbc.password");
          DBUtil dbConnector = new DBUtil(url,username,password,driver);
            return dbConnector;
        } catch (InstantiationException e) {
          logger.error("Error while accesing registrty settings ", e);
          throw new RegException("Error while accesing registrty settings ", e);
        } catch (IllegalAccessException e) {
View Full Code Here

    private static ConfigurationReader configurationReader;

    public void init() throws ServletException {

        DBUtil dbUtil;

        try {
            dbUtil = DBUtil.getCredentialStoreDBUtil();
        } catch (Exception e) {
            throw new ServletException("Error initializing database operations.", e);
View Full Code Here

        try {
          String url = RegistrySettings.getSetting("registry.jdbc.url");
          String driver = RegistrySettings.getSetting("registry.jdbc.driver");
          String username = RegistrySettings.getSetting("registry.jdbc.user");
          String password = RegistrySettings.getSetting("registry.jdbc.password");
          DBUtil dbConnector = new DBUtil(url,username,password,driver);
            return dbConnector;
        } catch (InstantiationException e) {
          logger.error("Error while accesing registrty settings ", e);
          throw new RegistryException("Error while accesing registrty settings ", e);
        } catch (IllegalAccessException e) {
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {

        DBUtil dbUtil = new DBUtil(getJDBCUrl(), getUserName(), getPassword(), getDriver());

        localUserStore = new LocalUserStore(dbUtil);
    }
View Full Code Here

    public LocalUserStore(ServletContext servletContext) throws Exception {
        // Properties properties = WebAppUtil.getAiravataProperties(servletContext);

        hashMethod = RegistrySettings.getSetting("default.registry.password.hash.method");

        dbUtil = new DBUtil(RegistrySettings.getSetting("registry.jdbc.url"),
                RegistrySettings.getSetting("registry.jdbc.user"),
                RegistrySettings.getSetting("registry.jdbc.password"),
                RegistrySettings.getSetting("registry.jdbc.driver"));

    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.common.utils.DBUtil

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.