Skip to main content

Posts

Showing posts from December, 2011

Spring 3 Annotations - HibernateDaoSupport - Repository Requires Session Factory

HibernateDaoSupport  is supplied with  SessionFactory  via  setSessionFactory() . However, setSessionFactory()  is  final , so you can't override it to add an  @Autowired  annotation. But you can apply  @Autowired  to the arbitrary method and call  setSessionFactory()  from it: @Autowired public void init ( SessionFactory factory ) {     setSessionFactory ( factory ); }

Log4J Architecture - Introduction to the Log4J architecture

In this section we will learn about the architectural component of Log4J. Understanding the architecture of Log4J is important. Three main component of Log4J The architecture of Log4J framework is layered and consists of three main components. There components of the Log4J are: Logger Appender Layout 1. Logger Logger is the most essential component of the logging process. It is responsible for capturing the logging information. There are 5 different log levels of the Logger. The level of Logger are as following: There are 5 normal levels of logger: DEBUG :  Most useful to debug an application. INFO :  It provides   informational messages. WARN  : It provides that application may have harmful events. ERROR  : It provides that application having error events but that might allow it to continue running. FATAL :  It denotes the   severe error events which lead the application to abort.   In addition, there are two special lev...