You could stop remove the old version, install the new version, update the symlink then restart the service. You might even get away with leaving the restart to the end. I prefer to install the new version side by side and then flip the symlink just before restarting. This leaves a much smaller downtime window and makes rolling back really easy.

The first step is to update your local formula with the new version info by running the following:

As per the initial install, Homebrew links the keg which results in a handful of generically named scripts being added to your path. We'll need to unlink it.

If you try to unlink with brew unlink tomcat you'll get Error: tomcat has multiple installed versions. It seems the brew command doesn't really like multiple versions of the same formula being installed at the same time and it presently doesn't expose a way to do this other than removing the old version first. We can however unlink it by calling the Homebrew API directly: