He was dying from when he went to pick up Harry from the Dursley's. The entire withered arm/blackened hand that would not heal was a pretty good clue, but the best clue was that he wanted to start teaching Harry himself. Dumbledore's kept Harry on a relatively arms-length for the most part, give or take revelatory end-of-term meetings. He went to get the ring, knowing that it was going to weaken him tremendously, and then picked up Harry to get the ball rolling before his time was up.
Teaching Harry--okay, at the beginning of the book, Harry came around really pretty fast, but I'm going to just go with the idea that the kiddo had a few months there to do nothing *but* think, and he had plenty of time to calm down. He got out a lot of rage at the end of OotP, which I still applaud, cause wow, he needed that badly. The memories pulled from Slugguy (like I feel like looking this up right now, my book is *feet away from my chair*), the way Dumbledore made him go out and *do* things, on his own, work out the problem, and then brought him along for that final journey for the locket, and if that wasn't a death march, nothing is. He knew he was going to die, and he knew his time was running out, and he's a Gryffindor. He wasn't just going to die--he was going to die *doing something*, and make that death mean something.
You know, I would have said, that scene would have gutted me, but it didn't. It was *dazzling*. There's Dumbledore, looking up, seeing that time is almost out, get Snape, get Snape *now*, Harry, and don't let anyone see you, no one can know I sent you for him, he has one last task. Hmm. Draco stops him, and Dumbledore stops Harry from interfering, because really, this wasn't part of Harry's journey at all, this part was Draco's journey, and Harry had no business in that but to stand witness, to watch, to *see*.
The scene was long, and I really enjoyed Malfoy's half-proud, half-utterly-appalled recitation of events--the kid isn't a murderer. He's a nasty piece of work all around, and no, he's not nice, and at this point, I wouldn't invite him out for crumpets and tea, but--that's what Snape and Dumbledore accomplished between them. He had Voldemort, his mother, his father, his entire heritage on one side, and let's not forget, utterly messy death of himself and family, and really, stacked up? I'm not sure I wouldn't commit murder on that. But he *didn't*, though he planned it--and can I say, wow, this kid is fucking *bright* to work out how to do what pretty much *no active Death Eater or Voldemort has been able to pull off*?--and he stood there, and he made a *choice*, and I don't have to like him to be so fucking proud of that. Most likely back at Death Eater Central, he'll be banging his head against the wall asking himself, Oh God, why the *fuck* did I freeze, why didn't I *kill the bastard*, but he already knows why and now he knows what he isn't. He's not a murderer. Now he just has to figure out what he *is*.
His journey is *fascinating*. I wish we could see more of it.
For the record: in failure of all other arguments, I cannot and will not believe Dumbledore would plead for his life, for any reason, at any time. Dumbledore doesn't fear death, or dying, or what comes after, he's never feared it. He was dying right there, and the only thing his living accomplished at this point was to assure Draco a quick and messy death, along with his family, and cast suspicion on Snape. Everything he'd worked for would be for nothing.
He knew he was dying, and it wasn't an easy death, and Snape could do this, for him, for Draco, and for the fight that had nothing to do with muggles and purebreds at all, though it *does*, but a war that created by a man who hated himself so much that there was nothing else left in him, hated *everything* for that hate in himself, and in that hate, poisoned everything and everyone he touched, blighted it, destroyed it, made it unfit to believe itself worth anything better, made it unfit to know it *could* be better. He made his fellow Death Eaters from the weak, and from people like Snape, internalized hate from that half-muggle side that made him less than purebred (it makes you kinda wonder what the Prince side of the family was like, doesn't it?), that strikes out and out and never rests, and from that idiotic Wormtail, who hated himself for not being what his friends were, who let bitter envy overshadow friendship and loyalty, let that hate become his entire universe. And he almost had Draco, too, and if Dumbledore had any single moment of perfect contentment at death, it's knowing that Harry and Draco *escaped* it, that he set them free, that he took away something from Voldemort that he *wanted*, the soul of one unhappy boy. Harry will carry on the war, not because he hates Voldemort, though that's a reason, and not just for those who died before him, though that's a reason, too, but because he knows as well as Dumbledore does that there are so many things worse than death--there's living as Snape was forced to once, as Wormtail *does*, in a prison of yourself, where there's no peace, no contentment, no rest, no *escape*. And if Voldemort wins, that's all that will be left when he's done. Just fear, and hate, and all the destructive, terrible things people do to escape those things, even when there's no way they can.
So in a way, Dumbledore accomplished pretty much everything he meant to that year, and he had to have died knowing it. Snape did it, for Dumbledore, who helped him get *away* from that and be more, be better, and for Draco, who he never wants to see trapped in that place, and for Harry, who can be strong enough, sure enough of who and what he is, to see this war to the end for the right reasons, all the right reasons.
Okay, now I'm getting teary. *sighs* I love this book so much.