2

I have a Spring Boot application deployed in Tomcat 8. I want to start background thread when my spring boot application starts.This is my current implementation

@SpringBootApplication
public class JmsTopicListApplication {

    public static void main(String[] args) {
        SpringApplication.run(JmsTopicListApplication.class, args);
        JMSListener jmsListener = new JMSListener("192.168.16.56",
                "jms/topic/ORD_CLINT_PUSH","org.jboss.naming.remote.client.InitialContextFactory",
                "http-remoting://192.168.16.56:4545","jms/RemoteConnectionFactorySTP",
                "ishara","ishara@007");
        jmsListener.start();
    }

Is there any best possible way of doing this ?

IsharaD
  • 359
  • 1
  • 3
  • 14
  • check https://stackoverflow.com/questions/39737013/spring-boot-best-way-to-start-a-background-thread-on-deployment – gladiator Oct 24 '17 at 06:10

0 Answers0