1
votes

I would like to migrate a multi-threaded application in JSE to Spring Integration but I have to clarify some points before. First of all, the application will have the following Spring integration components:

  • JMS to Transformer to router to TCPOut
  • TcpIn (to router) to Transformer to JMS

In this context, I have to load all the TCP connections dynamically from a configuration file. I saw a couple of example of this here in StackOverflow (based in the FTP sample). These samples could be enough for the first part but I am looking for how to do that in Spring Boot and what is the best (and elegant) way to create this type of configuration.

Finally, I have to access to each different context (this is maybe the most important) from a type of Swing monitor to start/stop manually this TCP connections. Is this possible? What do you suggest me to do?

All my current components are java based configuration (not DSL).

1

1 Answers

1
votes

See my answers to this question and its follow-up for examples of how to dynamically create application contexts using Java Configuration.

Also, take a look at the new feature in the Java DSL for dynamically registering/removing integration flows with the context. The 1.2 version of the DSL, containing this feature, will be released shortly.

You can stop/start endpoints using JMX or a control bus, or programmatically.