Does anybody know whether Action.getDataSource is removed from Struts 1.2.9? Checked the API doc on apache web site and couldn't see this method anymore. But 1.2.9 struts.jar file seems still support this method. Does anyone know what's going on? Thanks.
For a long time the authors of Struts have indicated that the datasource functions included with Struts are a "last resort" in case your Application server doesn't support data sources very well. Since now any application server that's worth anything at all has good support for data sources, the authors of Struts have deprecated the Struts data source API.
The best practice is (and for a long time has been) to define datasources using whatever method your App Server recommends, and then to access them in your code with a JNDI lookup.