String type = attributes.getProperty("type");
boolean commitRequired = "true".equals(attributes.getProperty("commitRequired"));
state.getConfig().getErrorContext().setActivity("configuring the transaction manager");
type = state.getConfig().getTypeHandlerFactory().resolveAlias(type);
TransactionManager txManager;
try {
state.getConfig().getErrorContext().setMoreInfo("Check the transaction manager type or class.");
TransactionConfig config = (TransactionConfig) Resources.instantiate(type);
config.setDataSource(state.getDataSource());
state.getConfig().getErrorContext()
.setMoreInfo("Check the transactio nmanager properties or configuration.");
config.setProperties(state.getTxProps());
config.setForceCommit(commitRequired);
config.setDataSource(state.getDataSource());
state.getConfig().getErrorContext().setMoreInfo(null);
txManager = new TransactionManager(config);
} catch (Exception e) {
if (e instanceof SqlMapException) {
throw (SqlMapException) e;
} else {
throw new SqlMapException(