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

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
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 =
	      sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
	} catch (Exception e) {

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

And my sqlMapConfig
<properties resource="fleet/properties/fleet.properties" />
  <!-- 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"/>

  <!-- 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"/>
 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 {

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

View raw message