Bear spray is not needed on the JMT except as a personal comfort item. If it makes you feel more secure, carry the extra 16 oz.
You already know about and plan to use a bear canister. That will solve most of your problems, assuming you keep it locked unless you're sctively working in and out of it.
The next best thing you can do is to avoid camping in areas of historically high bear activity; Lower Vidette Meadow, Bubbs Creek, the Rae Lakes, LeConte Canyon, Thousand Island Lake, and Lyell Canyon. Plan your route so as to minimize the need to camp in these areas.
When you must camp in one of these areas, try to avoid the established campsites if possible, especially those with bear boxes. These are on every bear's nightly travel route. Fix dinner along the trail, then continue hiking for another couple of miles and set up a stealth camp where no one has been before. This does NOT mean alongside the trail; get 50 meters or more off to the side and out of site. Bears often walk the trail at night for the same reason you do - it's easier than bushwacking.
The only really troublesome (camper-acclimated) bears are found between Reds Meadow and Happy Isle. The one exception to my no campsite with bear boxes rule is the backpackers' campground at Tuolumne Meadows. It is almost impossible to avoid staying there, since you'll want the store, post office, and/or grill. Each tent site has its own bear box.