Programmatically editing or extending the Spring configuration

Question

You are using routes, and you would like to edit or extend the Spring configuration, for example:

  • Using a JNDI data source

  • Using a container managed JMS connection pool

  • Using a container managed transaction manager

Currently, in these cases, you have to edit the Spring configuration manually.

 

Is there a way to edit the Spring configuration programmatically, for example, using a custom Talend component or extending Studio's default Spring configuration?

 

Answer

Talend does not have a component specifically designed to modify Spring configuration routes or set up data sources and so on. Camel does not support modifying the Spring configuration, and Talend doesn’t have a way to edit Spring configuration routes. However, it may be possible to create some data source/connection pool objects using a cConfig component.

 

If you would like to change the default Spring configuration when creating a new route, try performing the following steps:

  1. Close Studio.

  2. Unzip the contents of STUDIO_HOME/plugins/org.talend.camel.designertalend_version.jar file.

  3. In the directory where you unzipped the JAR, locate the org/talend/camel/designer/util/spring.xml file.

  4. Edit the file, then pack the spring.xml file back into the org.talend.camel.designer.

  5. Restart Studio.

Version history
Revision #:
8 of 8
Last update:
‎06-14-2019 09:20 PM
Updated by: