Announcement Announcement Module
Collapse
No announcement yet.
How to create a Spring Bean listener which is loaded before ContextLoaderListener? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create a Spring Bean listener which is loaded before ContextLoaderListener?

    Hi,

    I don't know if this is a chicken-and-egg situation, but I need to perform a custom log4j initialization upon the launch of my webapp. I found the Log4jConfigListener which I was hoping to extend and use as a spring bean. I have a couple of properties that I would have wanted to set in my applicationContext.xml file, but as per the documentation in the bean, it indicates that it must be called in the web.xml file prior to the ContextLoaderListener.

    So, my question then becomes, is there anyway to use it as a spring bean, and set the property values in the bean definition, or is this an impossibility since it has to be loaded before the ContextLoader?

    Thanks,

    Eric
Working...
X