String url = (String) dict.objectForKey("url"); Boolean autoCommit = (Boolean) dict.objectForKey("autoCommit");
String url = (String) dict.objectForKey("URL"); if (url == null) { url = (String) dict.objectForKey("url"); } Boolean autoCommit; Object autoCommitObj = dict.objectForKey("autoCommit"); if (autoCommitObj instanceof String) { autoCommit = Boolean.valueOf((String)autoCommitObj); } else { autoCommit = (Boolean)autoCommitObj; }
		protected Connection connectionWithDictionary(NSDictionary dict) throws SQLException {			String username = (String) dict.objectForKey("username");			String password = (String) dict.objectForKey("password");			String driver = (String) dict.objectForKey("driver");			String url = (String) dict.objectForKey("url");			Boolean autoCommit = (Boolean) dict.objectForKey("autoCommit");			boolean ac = autoCommit == null ? true : autoCommit.booleanValue();			// Boolean readOnly = (Boolean) dict.objectForKey("readOnly");			// boolean ro = readOnly == null ? false : readOnly.booleanValue();			try {				Class.forName(driver);			}			catch (ClassNotFoundException e) {				throw new SQLException("Could not find driver: " + driver);			}			Connection con = DriverManager.getConnection(url, username, password);			DatabaseMetaData dbmd = con.getMetaData();			log.info("Connection to " + dbmd.getDatabaseProductName() + " " + dbmd.getDatabaseProductVersion() + " successful.");			con.setAutoCommit(ac);			return con;		}