Topic
3 replies Latest Post - ‏2012-02-01T04:41:13Z by mburati
EJW
EJW
18 Posts
ACCEPTED ANSWER

Pinned topic Timer Event to cache data from database nightly

‏2012-01-31T16:48:43Z |
I am using WPF 6.1.5 on WPS 6.1 and need to implement a scheduled timer that runs a SQL Query once per night and then caches the data for fast access during the day by various WPF Portlets. I was hoping there might be a builder to enable this within WPF to allow me to make the SQL call using a SQL Call Builder etc. in a Service Provider model but can't see anything available - the Timed Action Builder seems to just be generating a JavaScript setTimeout within a page...
Updated on 2012-02-01T04:41:13Z at 2012-02-01T04:41:13Z by mburati
  • SystemAdmin
    SystemAdmin
    1493 Posts
    ACCEPTED ANSWER

    Re: Timer Event to cache data from database nightly

    ‏2012-01-31T18:41:54Z  in response to EJW
    Hi,

    That doesn't sound like a good fit for a portlet application. I would suggest some type of scheduled process outside the context of a portlet request/response.
  • DGawron
    DGawron
    76 Posts
    ACCEPTED ANSWER

    Re: Timer Event to cache data from database nightly

    ‏2012-01-31T22:54:10Z  in response to EJW
    WEF relies upon an inbound client request to cause a model to execute. You cannot easily execute models outside of a request / session. I've worked with customers that had a similar requirement and they performed the back-end calls outside of WEF, but made the results available to WEF through a global cache that was accessed as needed by models. You may be able to do the same and leverage the J2EE timer service to run the SQL and refresh the cache.
    • mburati
      mburati
      423 Posts
      ACCEPTED ANSWER

      Re: Timer Event to cache data from database nightly

      ‏2012-02-01T04:41:13Z  in response to DGawron
      The following WebSphere Scheduler Service doc may help you find more about mechanisms that could help you accomplish what Tom/Dave appear to be recommending:
      http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.multiplatform.doc%2Finfo%2Fae%2Fae%2Fwelc6tech_sch_dev.html

      ..mb1