It is a lesson , too , of which Mr. Obama seems keenly aware , judging from what White House officials have said about his eagerness over the months he has been considering his options in Afghanistan to give weight to the experience of the last Democratic president , LBJ , who found himself mired in a war that threatened to consume his presidency .