[Building Sakai] need to delay startup of quartz

Matthew Buckett matthew.buckett at it.ox.ac.uk
Tue Jan 20 10:10:56 PST 2015


On 20 January 2015 at 15:24, Charles Hedrick <hedrick at rutgers.edu> wrote:
> We need to delay the startup of quartz until the end. Either that or
> carefully audit all the jobs.
>
> We just had a system come up with Samigo non-operational.
>
> There are two static initializers calling IntegrationContextFactory
> getInstance(). In the log there’s an error from there, Unable to read
> integration context, null pointer. That implies that the following code
> failed:
>         FactoryUtil.setUseLocator(true);
>         instance = FactoryUtil.lookup();
> If you look at FactoryUtil, it ends up asking Spring for the bean
> org.sakaiproject.tool.assessment.integration.context.spring.IntegrationContext.

The bit that made it clearer for me was that there is a bean in
samigo-services (deployed to /shared/lib) called
org.sakaiproject.spring.SpringBeanLocator which stores a
WebApplicationContext and only when the samigo webapp gets started
does this get initialised
(org.sakaiproject.tool.assessment.ui.servlet.StoreApplicationContext).
SpringBeanLocator will NPE if it hasn't had a WebApplicationContext
set.

Out of interest what was the jobs that was throwing the error?

Having a service depend on beans in the webapp indicates a bad
separation of concerns.

-- 
  Matthew Buckett, VLE Developer, IT Services, University of Oxford


More information about the sakai-dev mailing list