Only time shall tell on this deal, as there are many other teams that have signed goalies to a longer term deal. So yes the Bruins did sign him to a long contract, but there are many other teams that have done the same.
Luongo signed 12 years
Quick 10 years
Rinne/Fleury 7 years
Lundqvist/Price/Ward/Smith/Howard 6 years
Thats is basically 1/3 the league that has signed a goalie to a long term contract.
Luongo, yes his contract length is a little long, but he is still a very serviceable goalie, Fleury is suspect, but the rest I would take on my team.
All in all, time shall tell, just like the never ending debate of who won the Kessel trade.