aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Singleton class + DI/IOC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Singleton class + DI/IOC" Watch "Singleton class + DI/IOC" New topic
Author

Singleton class + DI/IOC

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1378
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

Joined: Jul 05, 2005
Posts: 1936
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?


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1378
Yes, I do not want looging code in DAO class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Singleton class + DI/IOC