svn commit: r431155 - in /ibatis/trunk/java/mapper/mapper2: build/ doc/ src/com/ibatis/sqlmap/engine/builder/xml/ src/com/ibatis/sqlmap/engine/execution/ src/com/ibatis/sqlmap/engine/mapping/result/ s
Author: cbegin Date: Sun Aug 13 02:08:28 2006 New Revision: 431155 URL: http://svn.apache.org/viewvc?rev=431155&view=rev Log: Multiple ResultSet support complete. Modified: ibatis/trunk/java/mapper/mapper2/build/build.xml ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/BaseStatement.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/DefaultRowHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/MappedStatement.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/RowHandlerCallback.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbyProc.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/DerbyProcs.java Modified: ibatis/trunk/java/mapper/mapper2/build/build.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/build.xml?rev=431155&r1=431154&r2=431155&view=diff == --- ibatis/trunk/java/mapper/mapper2/build/build.xml (original) +++ ibatis/trunk/java/mapper/mapper2/build/build.xml Sun Aug 13 02:08:28 2006 @@ -26,6 +26,7 @@ + Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=431155&r1=431154&r2=431155&view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Aug 13 02:08:28 2006 @@ -1,5 +1,5 @@ #Build version info -#Wed Aug 02 15:24:03 CDT 2006 +#Sun Aug 13 02:50:18 MDT 2006 version=2.1.7 -buildDate=2006/08/02 15\:24 -buildNum=618 +buildDate=2006/08/13 02\:50 +buildNum=624 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431155&r1=431154&r2=431155&view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sun Aug 13 02:08:28 2006 @@ -9,6 +9,7 @@ o Removed deprectated JtaDaoTemplate o Removed custom nested transactions (JDBC 1.4 now required) o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) + o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. o Fixed IBATIS-224 - isNotNull node causes typehandler mappings in statement to fail o Fixed IBATIS-249 - Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java?rev=431155&r1=431154&r2=431155&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java Sun Aug 13 02:08:28 2006 @@ -1,17 +1,7 @@ package com.ibatis.sqlmap.engine.builder.xml; -import java.sql.ResultSet; -import java.util.Arrays; -import java.util.List; -import java.util.Properties; - -import org.w3c.dom.CharacterData; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - import com.ibatis.common.beans.Probe; import com.ibatis.common.beans.ProbeFactory; - import com.ibatis.common.resources.Resources; import com.ibatis.common.xml.NodeletUtils; import com.ibatis.sqlmap.client.SqlMapException; @@ -24,18 +14,16 @@ import com.ibatis.sqlmap.engine.mapping.sql.Sql; import com.ibatis.sqlmap.engine.mapping.sql.SqlText; import com.ibatis.sqlmap.engine.mapping.sql.dynamic.DynamicSql; -import com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.DynamicParent; -import com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.IterateTagHandler; -import com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.SqlTag; -import com.ibatis.sqlmap.engin
svn commit: r431297 - in /ibatis/trunk/java/mapper/mapper2: build/ doc/ src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ src/com/ibatis/sqlmap/engine/type/
Author: cbegin Date: Sun Aug 13 22:48:51 2006 New Revision: 431297 URL: http://svn.apache.org/viewvc?rev=431297&view=rev Log: Fixed IBATIS-325 SimpleDateFormat thread safety issue. Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SimpleDateFormatter.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/DateOnlyTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/DateTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlDateTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlTimeTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlTimestampTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TimeOnlyTypeHandler.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=431297&r1=431296&r2=431297&view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Aug 13 22:48:51 2006 @@ -1,5 +1,5 @@ #Build version info -#Sun Aug 13 02:50:18 MDT 2006 +#Sun Aug 13 23:45:30 MDT 2006 version=2.1.7 -buildDate=2006/08/13 02\:50 -buildNum=624 +buildDate=2006/08/13 23\:45 +buildNum=626 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431297&r1=431296&r2=431297&view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sun Aug 13 22:48:51 2006 @@ -11,6 +11,7 @@ o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. + o Fixed IBATIS-325 - DateTypeHandler uses static SimpleDateFormat instance. Not thread-safe. o Fixed IBATIS-224 - isNotNull node causes typehandler mappings in statement to fail o Fixed IBATIS-249 - Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress o Fixed IBATIS-250 - CLONE -SELECT statement returns unexpected result when 'groupBy' and 'nullValue' are specified in resultMaps. Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java?rev=431297&r1=431296&r2=431297&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java Sun Aug 13 22:48:51 2006 @@ -17,13 +17,10 @@ import com.ibatis.common.beans.Probe; import com.ibatis.common.beans.ProbeFactory; - +import com.ibatis.sqlmap.engine.type.SimpleDateFormatter; import java.math.BigDecimal; import java.math.BigInteger; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.Date; public abstract class ConditionalTagHandler extends BaseTagHandler { @@ -32,7 +29,6 @@ public static final long NOT_COMPARABLE = Long.MIN_VALUE; private static final String DATE_MASK = "/MM/dd hh:mm:ss"; - private static final DateFormat DATE_FORMAT = new SimpleDateFormat(DATE_MASK); private static final String START_INDEX = "["; @@ -137,11 +133,7 @@ } else if (type == Boolean.class || type == boolean.class) { return Boolean.valueOf(value); } else if (type == Date.class) { - try { -return DATE_FORMAT.parse(value); - } catch (ParseException e) { -throw new RuntimeException("Error parsing date. Cause: " + e, e); - } + return SimpleDateFormatter.format(DATE_MASK, value); } else if (type == BigInteger.class) { return new BigInteger(value); } else if (type == BigDecimal.class) { @@ -158,7 +150,6 @@ * * @param ctx * @param tag - * @return */ protected String getResolvedProperty(SqlTagContext ctx, SqlTag tag) { String prop = tag.getPropertyAttr(); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine
svn commit: r431298 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.ja
Author: cbegin Date: Sun Aug 13 23:10:08 2006 New Revision: 431298 URL: http://svn.apache.org/viewvc?rev=431298&view=rev Log: Fixed IBATIS-320 When every method call openSession() return same object . Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=431298&r1=431297&r2=431298&view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Aug 13 23:10:08 2006 @@ -1,5 +1,5 @@ #Build version info -#Sun Aug 13 23:45:30 MDT 2006 +#Mon Aug 14 00:07:17 MDT 2006 version=2.1.7 -buildDate=2006/08/13 23\:45 -buildNum=626 +buildDate=2006/08/14 00\:07 +buildNum=627 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java?rev=431298&r1=431297&r2=431298&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java Sun Aug 13 23:10:08 2006 @@ -214,14 +214,14 @@ } public SqlMapSession openSession() { -SqlMapSessionImpl sqlMapSession = getLocalSqlMapSession(); +SqlMapSessionImpl sqlMapSession = new SqlMapSessionImpl(this); sqlMapSession.open(); return sqlMapSession; } public SqlMapSession openSession(Connection conn) { try { - SqlMapSessionImpl sqlMapSession = getLocalSqlMapSession(); + SqlMapSessionImpl sqlMapSession = new SqlMapSessionImpl(this); sqlMapSession.open(); sqlMapSession.setUserConnection(conn); return sqlMapSession; Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java?rev=431298&r1=431297&r2=431298&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java Sun Aug 13 23:10:08 2006 @@ -838,7 +838,7 @@ session.setTransactionState(TransactionState.STATE_USER_PROVIDED); } else { session.setTransaction(null); - pushSession(session); + session.reset(); // used to be pushSession, which is probably incorrect. } } /**
svn commit: r431299 - /ibatis/trunk/java/mapper/mapper2/doc/release.txt
Author: cbegin Date: Sun Aug 13 23:12:55 2006 New Revision: 431299 URL: http://svn.apache.org/viewvc?rev=431299&view=rev Log: Updated release.txt with IBATIS-320 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431299&r1=431298&r2=431299&view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sun Aug 13 23:12:55 2006 @@ -11,6 +11,7 @@ o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. + o Fixed IBATIS-320 - openSession() returns same object o Fixed IBATIS-325 - DateTypeHandler uses static SimpleDateFormat instance. Not thread-safe. o Fixed IBATIS-224 - isNotNull node causes typehandler mappings in statement to fail o Fixed IBATIS-249 - Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress