public EmbeddedDatabase(String path, String username, String password) throws Exception
	{
		if (username == null || username.length() == 0)
		{
			throw new Exception("please enter a username");
		}

		if (password == null || password.length() == 0)
		{
			throw new Exception("please enter a password");
		}

		if (path == null || path.length() == 0)
		{
			throw new IOException("please enter a path");
		}

		this.path = new File(path);
		this.username = username;
		this.password = password;

		if (!this.path.exists())
		{
			Logger.info("creating directory " + this.path.getAbsolutePath());
			this.path.mkdir();
		}

		if (!this.path.canWrite())
			throw new IOException("write permission failed in " + this.path.getAbsolutePath());


		config = new DefaultDBConfig(this.path);
		config.setDatabasePath(this.path.getAbsolutePath());
		config.setLogPath(this.path.getAbsolutePath() + "/log");

		control = DBController.getDefault();

		if (!exists())
			create();
	}