Douglas Wayne Cornett of Spotsylvania County, Virginia, was sentenced to life in prison in federal court yesterday after he pleaded guilty to two federal hate crime charges, each involving an attempt to kill, and to discharging a firearm during a federal crime of violence.