I don't think that Quartz will work for me because I do not want to run these tasks on a schedule, but thanks for the suggestion (it will actaully solve some other issues that I have).
rrsIPOV, I think I understand what you are saying. Could you see if you think I am on the right track with my thoughts? Thank you.
What this application does it connect to any number of OPC servers. My first configuration file:
After the application reads this file, if the task should be running it will then go and retrieve the //tasks/task@name value and append .xml on it and get the configuration for it.
<task name="task1" running="true" />
<task name="task2" running="false" />
<task name="task3" running="true" />
What I am assuming that I need to do is place a bean in the Spring configuration file that is a non-singleton that implements Runnable and then for each running task in my first config file, retreive that bean, set the properties, from my the second config file, manually and run it. Does this sound like a viable option? Is there a better way of retriving a Runnable bean from the spring config file?
<!-- task1.xml file -->
<opc host="127.0.0.1" opc-server="MyOPC.Server">
<item name="Alias1.MYITEM" />