If the objective is to maintain a healthy ecosystem, spray is the better tool.
The objective should be for the human to stay alive. Anyone with different objectives needs to have their head examined. No offense intended hikermor, but I value human life over bear life every time.
Anyway, it's probably better for the ecosystem if humans stayed out of it in the first place.