ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexmathew <alexmathe...@gmail.com>
Subject Ibatis2 select result Unpredicted results
Date Fri, 08 Jan 2010 10:18:57 GMT

Hi, 
I was working in ibatis1 and recently moved to ibatis2.Now I am facing a
problem like when  i call an select query after one insertion(most
frequently after insertion )  result will vary.If I refresh the page the
newly inserted value disappear and on repeat refresh some times it will
come.
I am really stuck with the problem ,I am listing my configuration files
.....

I will be grateful if someone can help me out of this  
 
my configuration file  look like
 ppublic class FleetSqlConfig {
	 private FleetSqlConfig() {
	    }
	 private static SqlMapClient sqlMapper;
	static {
	try {
		 Reader reader =
Resources.getResourceAsReader("fleet/properties/SqlMapConfig.xml");
	      sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
	      reader.close(); 
	} catch (Exception e) {

	e.printStackTrace();
	throw new RuntimeException ("Error initializing MyAppSqlConfig class.
Cause:" + e);
	}
	}
	public static SqlMapClient getSqlMapInstance () {
	return sqlMapper;
	}
}


And my sqlMapConfig
<sqlMapConfig>
<properties resource="fleet/properties/fleet.properties" />
 <settings
    cacheModelsEnabled="false"
    lazyLoadingEnabled="false"
    enhancementEnabled="true"
    maxSessions="64"
    maxTransactions="8"
    maxRequests="128"/>
  <!-- Configure a built-in transaction manager.  If you're using an 
       app server, you probably want to use its transaction manager 
       and a managed datasource -->
  <transactionManager type="JDBC" commitRequired="false">
    <dataSource type="SIMPLE">
      <property name="JDBC.Driver" value="${SimpleDriver}"/>
      <property name="JDBC.ConnectionURL" value="${SimpleUrl}"/>
      <property name="JDBC.Username" value="${SimpleUsername}"/>
      <property name="JDBC.Password" value="${SimplePassword}"/>
      <property name="Pool.MaximumActiveConnections" value="15"/>
      <property name="Pool.MaximumIdleConnections" value="15"/>
      <property name="Pool.MaximumWait" value="2000"/>
      
    </dataSource>
  </transactionManager>

  <!-- List the SQL Map XML files. They can be loaded from the 
       classpath, as they are here (com.domain.data...) -->
  <sqlMap resource="fleet/persistance/sql/Login.xml"/>
  <sqlMap resource="fleet/persistance/sql/GeneralReport.xml"/>
</sqlMapConfig>
 and using a class


	private static final LogSheetLogic instance = new LogSheetLogic();
	  private static SqlMapClient sqlMapper;
		private LogSheetLogic() {
			sqlMapper = FleetSqlConfig.getSqlMapInstance();
			}

	public static LogSheetLogic getInstance() {
		return instance;
	}
		public ArrayList getAllIssuedLogSheet()throws SQLException {
		return(ArrayList)sqlMapper.queryForList("getAllIssuedLogSheet",null);
	}



Thanks in advance
-- 
View this message in context: http://old.nabble.com/Ibatis2-select-result-Unpredicted-results-tp27073886p27073886.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message