java - Grails instantiating vs injecting a service -


in grails, can inject service controller. might want inject services elsewhere (for example in quartz job).

i have faced issues injecting grails services in few places. 1 of them can remember in quartz job getting null service instance. spent whole day researching , ended instantiating service instance, rather injecting it.

so whats harm in instantiating service instance instead of injecting it?


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -