• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Singleton class + DI/IOC

 
kri shan
Ranch Hand
Posts: 1462
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planning to apply logging(log4j) during runtime for my Singleton class using DI/IOC. Can i need Spring AOP / AspectJ for DI ?
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DI and AOP are orthogonal concepts. I think you want to use AOP, not DI.

So I guess you don't want to have logging code in your singleton class?
 
kri shan
Ranch Hand
Posts: 1462
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I do not want looging code in DAO class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic