Does AOP smell or not?

Fredrik has written a nice post on AOP : Remove code smell with AOP.

I’m personnaly not a fan of AOP. Sure, it can be extremely useful in some areas…exactly as is describing Fredrik. The only concern I have, is that AOP pros are always using the same argument: it’s useful for log, security, authentication…etc. I fully agree: AOP is useful for transversal services and ensure a better separation of concern…but I do not think AOP is more useful than this.

I’ve seen recently another case of usage of AOP. We are looking at adding unit test for a web application using mock. The problem is in this kind of code:
[java]
public List getFirst(int count)
{
  Context context = JsfContext.getInstance() …
[java]
Mocking works well if you inject interface, but in our case we have to deal with the singleton’s hell.

In this case AOP can provide an answer even if can only be temporary has this kind of design is not fine for me (singleton vs DI).