public void cleanUp()
	{
		try
		{
			synchronized (this.mutex)
			{
				while (!pool.isEmpty())
				{
					pool.get(0).setTaken(true);
					Connection c = pool.get(0).getConnection();
					c.commit();
				
					//this is a workaround for a bug in some databases that 
					//won't properly close connections if they're not in autocommit mode
					c.setAutoCommit(true);
					
					c.close();
					pool.remove(0);
				}
				this.pool = null;
			}
		}
		catch (Exception e)
		{
			//We catch all exceptions, there's nothing to be done if we can't close a connection.
			LOGGER.log(Level.WARNING, "Exception: ", e);
		}
	}