* to the AbstractDatabaseAction specifications.
*/
public Map act( Redirector redirector, SourceResolver resolver, Map objectModel,
String source, Parameters param ) throws Exception {
DataSourceComponent datasource = null;
Connection conn = null;
Map results = new HashMap();
// read global parameter settings
boolean reloadable = Constants.DESCRIPTOR_RELOADABLE_DEFAULT;
Request request = ObjectModelHelper.getRequest(objectModel);
// call specific default modes apart from output mode are not supported
// set request attribute
String outputMode = param.getParameter("output", (String) defaultModeNames.get(MODE_OUTPUT));
request.setAttribute(ATTRIBUTE_KEY, outputMode);
if (this.settings.containsKey("reloadable"))
reloadable = Boolean.getBoolean((String) this.settings.get("reloadable"));
// read local parameter settings
try {
Configuration conf =
this.getConfiguration(param.getParameter("descriptor", (String) this.settings.get("descriptor")),
resolver,
param.getParameterAsBoolean("reloadable",reloadable));
// get database connection and try to turn off autocommit
datasource = this.getDataSource(conf, param);
conn = datasource.getConnection();
if (conn.getAutoCommit() == true) {
try {
conn.setAutoCommit(false);
} catch (Exception ex) {
String tmp = param.getParameter("use-transactions",(String) this.settings.get("use-transactions",null));