The Sony Xperia P (LT22i) received the Android 4.1.2 Jelly Bean update last week in the form of firmware version 6.2.A.0.400. Unfortunately there isn’t an easy rooting solution for this firmware yet, but fear not, you can get root as long as you’re willing to invest in a bit of effort. The workaround involves downloading a zip file, flashing an Ice Cream Sandwich kernel, then flashing the zip file before flashing the Jelly Bean kernel.
This method requires that your bootloader is unlocked, however another method is also available for locked bootloaders, although not everyone is reporting success with this one. The good news is that there is a fall back and that involves downloading and flashing a pre-rooted Jelly Bean ROM. Hopefully, an easier one-click solution is on horizon, but until then these methods should work.