In a large, deep frying pan, heat the oil over moderately high heat.
Season the chicken with 1/4 teaspoon of the salt and the pepper and add to the pan.
Cook chicken, turning until well browned, about 5 minutes in all.
Remove chicken and set aside. Pour off all but 1 tablespoon of the fat from the pan.
Add the onion to the pan and reduce the heat to moderately low. Cook, stirring occasionally, until translucent, about 5 minutes.
Add the garlic and cook, stirring, for 30 seconds longer.
Add the tomatoes, pimientos, beans, uncooked rice, water, parsley, the remaining 1 1/2 teaspoons of salt, the cayenne pepper, and arrange the chicken on top in an even layer. Bring to a boil and simmer covered until all the water is absorbed, about 15 minutes.
Turn the chicken over and reduce the heat to lowest setting, cover and cook until the chicken and rice are just done, about 10 minutes longer. Serve with the lime wedges, if desired.