Well, apparently, you have looked at the example provided by Spring
here That page has enough information to get you started. I'm having a hard time understanding what exactly you are having a problem with. Are you having a problem understanding how the task executor works? Do you want someone to do the design for you? Have you spent time thinking about it?
As far as I can see, you can declare 2 task classes; both should implemen tRunnable. One task class should do rule_SelectInLoop and the other should do rule_CursorInLoop. Then you just create 2 instances, one for each task class, and give it to the executor. This is the approach I would take given what you are describing here.
To achieve true concurrency, you will have to make sure your threads do not modify the same state. Like Ulf said, if they are both operating on the same
Java object, and if both try to modify the Java object, the Java object will need to be synchronized, and this will reduce the amount of concurrency in the syste, The same thing applies to other things. If they are both trying to write to the same file, then you will need to protect the file, and you will reduce concurrency. If they try to modify a row in the database, then they will put locks on the database, and block each other