Announcement Announcement Module
Collapse
No announcement yet.
How to get ApplicationContext outside of ServletContext ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get ApplicationContext outside of ServletContext ?

    Hi,

    How can I reach the ApplicationContext outside of the ServletContext? I load the application context in web.xml

    org.springframework.web.context.ContextLoaderListe ner

    I have some scheduling tasks implemented with quartz which have nothing to to withe the ServletContext - but have to get access to the ResourceBundleMessage to internationalize exceptions thrown while executing the triggered method. Is there any strategy to get the ApplicationContext?

    Implement my own Listener with a static variable with access to the application context globally?

    Regards,

    worldheart

  • #2
    You can also implement ApplicationContextAware and get the ApplicationConext injected by Spring.
    HTH

    Comment


    • #3
      thx

      thx

      Comment

      Working...
      X