garyrussell/spring-integration — comment on commit c9b1186233c1a91ee13fcf9b24fa902d1795f945
File: spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsChannelParser.java line 121
By olegz:

The problem with loading classes in parser is property placeholders. The value of the 'containerClass' might actually be #{..} ${..},etc., and it won't get resolved until later. That is why we should start adopting the pattern of Parser -> FactoryBean -> Bean (and we already do it a lot for ServiceActivators, Transformers etc.). Since in the FB the actual values are guaranteed to be resolved the above logic would be safe and 'kosher'.

Also wrt to the comment in the catch clause. If this code were to stand than yes, I would say it should result in parser error