Yes you can do it. But before you put your work inside tomcat. Pay attention to the following.
Do you have a web application in tomcat? if so, is your web application a high-activity, high-load portal?
If so, your thread jobs will take up valuable processing from the tomcat server.
Is a job running streaming jobs tightly coupled or requires tomcat?
If your work is really up to you. you better create a separate batch server and use it. You can look at spring-batch for implementation.
source share