Get an instance of com.workbrain2.platform.util.context.BeanLocator like below:
GloveOrderService gloveOrderService =
(GloveOrderService ) BeanLocator.getInstance().getBean("gloveOrderService");
This even works for code you plan to be run on the Job Scheduler. The Job Scheduler doesn't load any beans by default, but as soon as you get an instance of the BeanLocator, it will load all your beans from your service-config.xml and data-config.xml files.
This is my last post on Spring in Workbrain for a while! If you've got more questions as you are implementing your next Workbrain components, let me know.
0 comments:
Post a Comment