CouchClient couchClient = createCouchClient();
// Get database from Couch Client
CouchDb couchDb = null;
{
if( false == couchClient.databaseExists(dbName) ) {
throw new Exception("Can not find a database with the name: "+dbName);
}
couchDb = couchClient.getDatabase(dbName);
}
return couchDb;