JIRA: https://jira.spring.io/browse/INT-3916
The `JpaOutboundGatewayFactoryBean` used CTOR injection for the `JpaExecutor`.
That one, in turn, uses CTOR injection for the `EntityManagerFactory`.
Such a dependency may cause the `early bean instantiating` in case of `AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck()`.
And we end up with the `BeanCurrentlyInCreationException`.
Therefore no one `FactoryBean` should use CTOR injection if there is a potential hierarchical dependency.
NOTE: there is no tests on the matter, since we don't change the components behavior.
The `JPA` sample application will be changed to the Boot to track this fix.
**Cherry-pick to 4.2.x**
Address PR comments and fix other `FactoryBean`s for the same issue, when it is reasonable
Polishing
Address PR comments
Make setter `setSockJsTaskScheduler` as `public`