posted 12 years ago
My take on this is that it's a good way to do it because the datasource lookup only happens once. I've seen other code where the lookup happens over and over again which is a waste of resources. I've tried different ways of doing it and based on feedback that I received here, this is the context listener that I now use.
This is the DataSourceHolder class:
Suggestions for improving this are welcome.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson