I have a Spring Bean which I want to AutoWire in a JavaDelegate Implementation.
If I just add the bean with @Autowired annotation then it throws NullPointerException.
Adding @Component Annotation on the JavaDelegate Implementation class works fine.
Is that ok to use @Component Annotation for JavaDelegate Implementations?
I have read somewhere that the instantiation of these JavaDelegate Implementations happens at the time of Task execution and if 2 tasks are attached to the same JavaDelegate then both will get different instances of the class. Is creating a bean @Component Annotation will be a problem here?