You need to start your application... If you just put everything in a jar file, put it somewhere on your filesystem, nothing much is going to happen.
You need a class which STARTS the whole thing so the scheduler gets kicked off.
Code:
ìmport org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public final class SpringCommandLineStarter {
/**
* Arguments passed in are assumed to be valid context locations
* @param args
*/
public static void main(final String[] args) {
if (args == null || args.length == 0) {
throw new RuntimeException("At least spring applicationcontext must be specified");
}
Thread appThread = new Thread(new Runnable() {
public void run() {
ApplicationContext appCtx = new ClassPathXmlApplicationContext(args);
while (true) {// run forever
}
}
}
);
appThread.setDaemon(true);
appThread.start();
}
}
Start the class from the command line, or startup script whatever you want.
java -cp spring.jar com.package.SpringCommandLineStarter applicationContext.xml
Everything is untested and just from the top of my head. But it should give you a general idea.