[ http://issues.apache.org/jira/browse/IBATIS-102?page=comments#action_62462 ] Brandon Goodin commented on IBATIS-102: ---------------------------------------
you are correct. The "vars.txProps = new Properties();" get's initialized in other places. But, even if it wasn't it would be totally worthless where it is at. Thanks! > Some codes in the SqlMapConfigParser.java > ----------------------------------------- > > Key: IBATIS-102 > URL: http://issues.apache.org/jira/browse/IBATIS-102 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b > Environment: windows2003 Server > Reporter: Jason Zhang > Priority: Minor > > In the Class com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.java,I > think some codes are unwanted: > private void addTransactionManagerNodelets() { > //I think these codes are unwanted. > parser.addNodelet("/sqlMapConfig/transactionManager/end()", new Nodelet() > { > public void process(Node node) throws Exception { > vars.txProps = new Properties(); > } > }); > //Because of these codes. > parser.addNodelet("/sqlMapConfig/transactionManager/end()", new Nodelet() > { > public void process(Node node) throws Exception { > vars.errorCtx.setActivity("configuring the transaction manager"); > Properties attributes = NodeletUtils.parseAttributes(node, > vars.properties); > String type = attributes.getProperty("type"); > type = vars.typeHandlerFactory.resolveAlias(type); > TransactionManager txManager = null; > try { > vars.errorCtx.setMoreInfo("Check the transaction manager type or > class."); > TransactionConfig config = (TransactionConfig) > Resources.instantiate(type); > config.setDataSource(vars.dataSource); > > config.setMaximumConcurrentTransactions(vars.client.getDelegate().getMaxTransactions()); > vars.errorCtx.setMoreInfo("Check the transactio nmanager properties > or configuration."); > config.initialize(vars.txProps); > vars.errorCtx.setMoreInfo(null); > txManager = new TransactionManager(config); > > txManager.setForceCommit("true".equals(attributes.getProperty("commitRequired"))); > } catch (Exception e) { > if (e instanceof SqlMapException) { > throw (SqlMapException) e; > } else { > throw new SqlMapException("Error initializing TransactionManager. > Could not instantiate TransactionConfig. Cause: " + e, e); > } > } > vars.client.getDelegate().setTxManager(txManager); > } > }); > ......... > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira