It was really happening.
Towards the end during the climax scene it was focussed on all characters who are still alive. We see Morgan Freeman looking at the Bat to see it had a software update, we see Gordon looking at the new Bat symbol. We see there is a package for Blake which leads him to Batcave. the only alive characters remaining are Alfred and Selina. I am going with supposed hypothesis that batman is dead.
When the camera focuses to Alfred, He sees Bruce and Selina. Correlating with other events which I mentioned earlier I don't think all of that was done by Alfred which only leads to one possibility which is Batman being alive (This is similar to the ending in Dark Knight Returns by Frank Miller) and we already have a movie for this argument for dream ending hypothesis which is Inception. This is Dark Knight Rises. I am pretty sure its not Alfred's imagination (theory is quite fantastic but sadly not the case).
+1 Batman very much alive. Its not a dream