Can be confusing if you are coming from a comfy "web.xml" world where everything is bootstrapped for you
Originally Posted by kousik.majumder
But in reality there is no difference whether it is a web container ( e.g. Tomcat ) or a server with a command line interface: JVM can be agnostic of its whereabouts.
So what really happens when you run "java <props> CommandLineJobRunner" including all the JARs, your JVM, that belongs to the process of the shell / or can be backgrounded ( via & ), is created and since your JARs will have Spring config files, the Spring ApplicationContext will be created within that JVM ( allowing for / using the Dependency Injection ), and the Job will be launched.
Humans are stateful and mutable beings that have no problems processing many things concurrently and share state with others + they are usually "coupled"