From commitsjacobsonlaura@example.net Sun Jan 01 17:32:46 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 77060 invoked from network); 1 Jan 2006 17:32:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jan 2006 17:32:45 -0000 Received: (qmail 54727 invoked by uid 500); 1 Jan 2006 17:32:45 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 54700 invoked by uid 500); 1 Jan 2006 17:32:44 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 54689 invoked by uid 99); 1 Jan 2006 17:32:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2006 09:32:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 01 Jan 2006 09:32:44 -0800 Received: (qmail 77010 invoked by uid 65534); 1 Jan 2006 17:32:23 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r360500 - /ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml Date: Sun, 01 Jan 2006 17:32:23 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: roberto Date: Sun Jan 1 09:32:14 2006 New Revision: 360500 URL: http://svn.apache.org/viewcvs?rev=360500&view=rev Log: IBATISNET-136 resultMap nullValue attribute documentation update reported by Norman Katz Modified: ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml Modified: ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml?rev=360500&r1=360499&r2=360500&view=diff ============================================================================== --- ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml (original) +++ ibatis/trunk/cs/docs/dataMapperGuide/src/en/working.xml Sun Jan 1 09:32:14 2006 @@ -904,11 +904,14 @@ </example></para> </sect3> - <sect3> + <sect3> <title>extends</title> - <para>When writing Sql, you often encounter duplicate fragments of SQL. iBATIS offers a simple yet powerful attribute to reuse them.</para> - <para><programlisting> + <para>When writing Sql, you often encounter duplicate fragments of + SQL. iBATIS offers a simple yet powerful attribute to reuse + them.</para> + + <para><programlisting> &lt;select id="<emphasis role="blue">GetAllAccounts</emphasis>" resultMap="indexed-account-result"&gt; select @@ -924,7 +927,7 @@ resultMap="indexed-account-result"&gt; order by Account_FirstName &lt;/select&gt;</programlisting></para> - </sect3> + </sect3> </sect2> </sect1> @@ -1571,17 +1574,15 @@ <title>nullValue</title> <para>The <parameter>nullValue</parameter> attribute can be set to any - valid value (based on property type). The + valid value (based on property type). The result element's <parameter>nullValue</parameter> attribute is used to specify an - outgoing null value replacement. What this means is that when the - value is detected in the object property, a NULL will be written to - the database (the opposite behavior of an inbound null value - replacement). This allows you to use a "magic" null number in your - application for types that do not support null values (such as + inbound null value replacement. What this means is that when the value + is detected in a query's result column, the corresponding object + property will be set to the the <parameter>nullValue</parameter> + attribute's value. This allows you to use a "magic" null number in + your application for types that do not support null values (such as <classname>int</classname>, <classname>double</classname>, - <classname>float</classname>). When these types of properties contain - a matching null value (say, –9999), a NULL will be written to the - database instead of the value.</para> + <classname>float</classname>).</para> <para>If your database has a NULLABLE column, but you want your application to represent NULL with a constant value, you can specify From commitsjacobsonlaura@example.net Tue Jan 10 19:08:38 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 42757 invoked from network); 10 Jan 2006 19:08:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Jan 2006 19:08:38 -0000 Received: (qmail 63209 invoked by uid 500); 10 Jan 2006 19:08:38 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 63190 invoked by uid 500); 10 Jan 2006 19:08:37 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 63162 invoked by uid 99); 10 Jan 2006 19:08:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 11:08:37 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 11:08:36 -0800 Received: (qmail 42236 invoked by uid 65534); 10 Jan 2006 19:08:16 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367738 - in /ibatis/trunk/cs/mapper: IBatisNet.DataMapper.Test/Maps/Access/OleDb/ IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/ IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/ IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/ IBatisNet.DataMapper.T... Date: Tue, 10 Jan 2006 19:08:12 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Tue Jan 10 11:07:44 2006 New Revision: 367738 URL: http://svn.apache.org/viewcvs?rev=367738&view=rev Log: - Fixed IBATISNET-138 Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Access/OleDb/Account.xml Tue Jan 10 11:07:44 2006 @@ -58,7 +58,14 @@ ============================================= --> <statements> - + + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/Odbc/Account.xml Tue Jan 10 11:07:44 2006 @@ -145,6 +145,13 @@ where Account_ID = #value# </select> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsHashtableViaResultClass" resultClass="Hashtable"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/OleDb/Account.xml Tue Jan 10 11:07:44 2006 @@ -65,6 +65,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MSSQL/SqlClient/Account.xml Tue Jan 10 11:07:44 2006 @@ -245,6 +245,13 @@ order by Account_ID </select> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetFewAccountsViaResultMap" resultMap="account-result"> <![CDATA[ Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/ByteFx/Account.xml Tue Jan 10 11:07:44 2006 @@ -110,6 +110,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/MySql/MySql/Account.xml Tue Jan 10 11:07:44 2006 @@ -110,6 +110,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/ODP/Account.xml Tue Jan 10 11:07:44 2006 @@ -111,6 +111,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/Oracle/OracleClient/Account.xml Tue Jan 10 11:07:44 2006 @@ -108,6 +108,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/Maps/PostgreSQL/Npgsql/Account.xml Tue Jan 10 11:07:44 2006 @@ -110,6 +110,13 @@ --> <statements> + <select id="GetAllAccountsCache" + resultMap="account-result" + cacheModel="account-cache"> + select * from Accounts + order by Account_ID + </select> + <select id="GetAllAccountsAsArrayListViaResultClass" resultClass="ArrayList"> select Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs Tue Jan 10 11:07:44 2006 @@ -62,14 +62,12 @@ IList list = sqlMap.QueryForList("GetCachedAccountsViaResultMap", null); int firstId = HashCodeProvider.GetIdentityHashCode(list); - //System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(list); list = sqlMap.QueryForList("GetCachedAccountsViaResultMap", null); //Console.WriteLine(sqlMap.GetDataCacheStats()); int secondId = HashCodeProvider.GetIdentityHashCode(list); - //System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(list); Assert.AreEqual(firstId, secondId); Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs Tue Jan 10 11:07:44 2006 @@ -652,6 +652,32 @@ } /// <summary> + /// Test ExecuteQueryForMap With Cache : Hashtable. + /// </summary> + [Test] + public void TestExecuteQueryForMapWithCache() + { + IDictionary map = sqlMap.QueryForMap("GetAllAccountsCache", null, "FirstName"); + + int firstId = HashCodeProvider.GetIdentityHashCode(map); + + Assert.AreEqual(5, map.Count); + AssertAccount1(((Account) map["Joe"])); + + Assert.AreEqual(1, ((Account) map["Joe"]).Id); + Assert.AreEqual(2, ((Account) map["Averel"]).Id); + Assert.AreEqual(3, ((Account) map["William"]).Id); + Assert.AreEqual(4, ((Account) map["Jack"]).Id); + Assert.AreEqual(5, ((Account) map["Gilles"]).Id); + + map = sqlMap.QueryForMap("GetAllAccountsCache", null, "FirstName"); + + int secondId = HashCodeProvider.GetIdentityHashCode(map); + + Assert.AreEqual(firstId, secondId); + } + + /// <summary> /// Test ExecuteQueryForMap : Hashtable. /// </summary> /// <remarks> Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs Tue Jan 10 11:07:44 2006 @@ -113,8 +113,14 @@ CacheKey cacheKey = this.GetCacheKey(request); cacheKey.Update("ExecuteQueryForMap"); - cacheKey.Update(keyProperty); - cacheKey.Update(valueProperty); + if (keyProperty!=null) + { + cacheKey.Update(keyProperty); + } + if (valueProperty!=null) + { + cacheKey.Update(valueProperty); + } map = this.Statement.CacheModel[cacheKey] as IDictionary; if (map == null) Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=367738&r1=367737&r2=367738&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Tue Jan 10 11:07:44 2006 @@ -802,7 +802,7 @@ object parameterObject, string keyProperty, string valueProperty, - SqlMapper.DictionaryRowDelegate rowDelegate ) + SqlMapper.DictionaryRowDelegate rowDelegate ) { IDictionary map = new Hashtable(); From commitsjacobsonlaura@example.net Wed Jan 11 03:15:13 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 80876 invoked from network); 11 Jan 2006 03:15:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 03:15:13 -0000 Received: (qmail 6382 invoked by uid 500); 11 Jan 2006 03:15:13 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 6338 invoked by uid 500); 11 Jan 2006 03:15:12 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 6323 invoked by uid 99); 11 Jan 2006 03:15:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 19:15:12 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 19:15:11 -0800 Received: (qmail 80784 invoked by uid 65534); 11 Jan 2006 03:14:51 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367891 - /ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Date: Wed, 11 Jan 2006 03:14:50 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgrabowski Date: Tue Jan 10 19:14:30 2006 New Revision: 367891 URL: http://svn.apache.org/viewcvs?rev=367891&view=rev Log: Improved patch for IBATISNET-100 to not throw a NullReferenceException if a cacheModel has a flushOnExecute node that references an invalid statement. A WARN message is issued instead (this may need to change to throwing a ConfigurationException). Thanks to Chad Humphries for discovering this. Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?rev=367891&r1=367890&r2=367891&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Tue Jan 10 19:14:30 2006 @@ -824,15 +824,28 @@ { foreach (string statementName in statementsToRegister) { - CacheModel cacheModel = _configScope.SqlMapper.GetCache(cacheModelId); - IMappedStatement mappedStatement = (IMappedStatement)_configScope.SqlMapper.MappedStatements[statementName]; + IMappedStatement mappedStatement = _configScope.SqlMapper.MappedStatements[statementName] as IMappedStatement; - if (_logger.IsDebugEnabled) + if (mappedStatement != null) { - _logger.Debug("Registering trigger statement [" + mappedStatement.Id + "] to cache model [" + cacheModel.Id + "]"); + CacheModel cacheModel = _configScope.SqlMapper.GetCache(cacheModelId); + + if (_logger.IsDebugEnabled) + { + _logger.Debug("Registering trigger statement [" + mappedStatement.Id + "] to cache model [" + cacheModel.Id + "]"); + } + + cacheModel.RegisterTriggerStatement(mappedStatement); } + else + { + if (_logger.IsWarnEnabled) + { + _logger.Warn("Unable to register trigger statement [" + statementName + "] to cache model [" + cacheModelId + "]. Statement does not exist. Removing statement from list of valid statements."); + } - cacheModel.RegisterTriggerStatement(mappedStatement); + _configScope.SqlMapper.MappedStatements.Remove(statementName); + } } } } From commitsjacobsonlaura@example.net Wed Jan 11 05:39:20 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 48190 invoked from network); 11 Jan 2006 05:39:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 05:39:19 -0000 Received: (qmail 72000 invoked by uid 500); 11 Jan 2006 05:39:19 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 71960 invoked by uid 500); 11 Jan 2006 05:39:19 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 71946 invoked by uid 99); 11 Jan 2006 05:39:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 21:39:18 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 21:39:18 -0800 Received: (qmail 47820 invoked by uid 65534); 11 Jan 2006 05:38:57 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367939 - /ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Date: Wed, 11 Jan 2006 05:38:57 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgrabowski Date: Tue Jan 10 21:38:36 2006 New Revision: 367939 URL: http://svn.apache.org/viewcvs?rev=367939&view=rev Log: Corrected WARN message from last commit. Deleted line that removed non-existent statement name from statements. Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?rev=367939&r1=367938&r2=367939&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Tue Jan 10 21:38:36 2006 @@ -841,10 +841,8 @@ { if (_logger.IsWarnEnabled) { - _logger.Warn("Unable to register trigger statement [" + statementName + "] to cache model [" + cacheModelId + "]. Statement does not exist. Removing statement from list of valid statements."); + _logger.Warn("Unable to register trigger statement [" + statementName + "] to cache model [" + cacheModelId + "]. Statement does not exist."); } - - _configScope.SqlMapper.MappedStatements.Remove(statementName); } } } From commitsjacobsonlaura@example.net Wed Jan 11 05:50:16 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 52069 invoked from network); 11 Jan 2006 05:50:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 05:50:16 -0000 Received: (qmail 81747 invoked by uid 500); 11 Jan 2006 05:50:16 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 81715 invoked by uid 500); 11 Jan 2006 05:50:15 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 81704 invoked by uid 99); 11 Jan 2006 05:50:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 21:50:15 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 21:50:14 -0800 Received: (qmail 51949 invoked by uid 65534); 11 Jan 2006 05:49:54 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367941 - in /ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net: Log4NetLogger.cs Log4NetLoggerFA.cs Date: Wed, 11 Jan 2006 05:49:53 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgrabowski Date: Tue Jan 10 21:49:43 2006 New Revision: 367941 URL: http://svn.apache.org/viewcvs?rev=367941&view=rev Log: Experimenting with the svn:keywords property to translate $Date$, $Revision$, etc. into the date and revision of the last commit. http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4 Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (contents, props changed) ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (contents, props changed) Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs?rev=367941&r1=367940&r2=367941&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Tue Jan 10 21:49:43 2006 @@ -1,8 +1,8 @@ #region Apache Notice /***************************************************************************** * $Header: $ - * $Revision: $ - * $Date: $ + * $Revision$ + * $Date$ * * iBATIS.NET Data Mapper * Copyright (C) 2004 - Gilles Bayon Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs ------------------------------------------------------------------------------ svn:keywords = HeadURL Revision Date Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs?rev=367941&r1=367940&r2=367941&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs Tue Jan 10 21:49:43 2006 @@ -2,8 +2,8 @@ #region Apache Notice /***************************************************************************** * $Header: $ - * $Revision: $ - * $Date: $ + * $Revision$ + * $Date$ * * iBATIS.NET Data Mapper * Copyright (C) 2004 - Gilles Bayon Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs ------------------------------------------------------------------------------ svn:keywords = HeadURL Revision Date From commitsjacobsonlaura@example.net Wed Jan 11 05:54:33 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 53051 invoked from network); 11 Jan 2006 05:54:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 05:54:33 -0000 Received: (qmail 83411 invoked by uid 500); 11 Jan 2006 05:54:33 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 83373 invoked by uid 500); 11 Jan 2006 05:54:33 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 83362 invoked by uid 99); 11 Jan 2006 05:54:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 21:54:32 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 21:54:32 -0800 Received: (qmail 52941 invoked by uid 65534); 11 Jan 2006 05:54:12 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367942 - in /ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net: Log4NetLogger.cs Log4NetLoggerFA.cs Date: Wed, 11 Jan 2006 05:54:11 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgrabowski Date: Tue Jan 10 21:54:02 2006 New Revision: 367942 URL: http://svn.apache.org/viewcvs?rev=367942&view=rev Log: More experimenting with the svn:keywords property to translate $Date$, $Revision$, etc. into the date and revision of the last commit. Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (contents, props changed) ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (contents, props changed) Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs?rev=367942&r1=367941&r2=367942&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Tue Jan 10 21:54:02 2006 @@ -1,8 +1,9 @@ #region Apache Notice /***************************************************************************** - * $Header: $ + * $URL$ * $Revision$ * $Date$ + * $LastChangedBy$ * * iBATIS.NET Data Mapper * Copyright (C) 2004 - Gilles Bayon Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Tue Jan 10 21:54:02 2006 @@ -1 +1 @@ -HeadURL Revision Date +HeadURL Revision Date LastChangedBy Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs?rev=367942&r1=367941&r2=367942&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs Tue Jan 10 21:54:02 2006 @@ -1,9 +1,10 @@ #region Apache Notice /***************************************************************************** - * $Header: $ + * $URL$ * $Revision$ * $Date$ + * $LastChangedBy$ * * iBATIS.NET Data Mapper * Copyright (C) 2004 - Gilles Bayon Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Tue Jan 10 21:54:02 2006 @@ -1 +1 @@ -HeadURL Revision Date +HeadURL Revision Date LastChangedBy From commitsjacobsonlaura@example.net Wed Jan 11 05:57:17 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 53952 invoked from network); 11 Jan 2006 05:57:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 05:57:17 -0000 Received: (qmail 86328 invoked by uid 500); 11 Jan 2006 05:57:17 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 86307 invoked by uid 500); 11 Jan 2006 05:57:17 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 86296 invoked by uid 99); 11 Jan 2006 05:57:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 21:57:17 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 10 Jan 2006 21:57:16 -0800 Received: (qmail 53895 invoked by uid 65534); 11 Jan 2006 05:56:56 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r367943 - in /ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net: Log4NetLogger.cs Log4NetLoggerFA.cs Date: Wed, 11 Jan 2006 05:56:55 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgrabowski Date: Tue Jan 10 21:56:46 2006 New Revision: 367943 URL: http://svn.apache.org/viewcvs?rev=367943&view=rev Log: More experimenting with the svn:keywords property to translate $Date$, $Revision$, etc. into the date and revision of the last commit. Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (contents, props changed) ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (contents, props changed) Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs?rev=367943&r1=367942&r2=367943&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Tue Jan 10 21:56:46 2006 @@ -1,8 +1,7 @@ #region Apache Notice /***************************************************************************** - * $URL$ * $Revision$ - * $Date$ + * $LastChangedDate$ * $LastChangedBy$ * * iBATIS.NET Data Mapper Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Tue Jan 10 21:56:46 2006 @@ -1 +1 @@ -HeadURL Revision Date LastChangedBy +Revision LastChangedDate LastChangedBy Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs?rev=367943&r1=367942&r2=367943&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs Tue Jan 10 21:56:46 2006 @@ -1,9 +1,8 @@ #region Apache Notice /***************************************************************************** - * $URL$ * $Revision$ - * $Date$ + * $LastChangedDate$ * $LastChangedBy$ * * iBATIS.NET Data Mapper Propchange: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLoggerFA.cs ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords Tue Jan 10 21:56:46 2006 @@ -1 +1 @@ -HeadURL Revision Date LastChangedBy +Revision LastChangedDate LastChangedBy From commitsjacobsonlaura@example.net Wed Jan 11 17:21:47 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 9636 invoked from network); 11 Jan 2006 17:21:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 17:21:46 -0000 Received: (qmail 81150 invoked by uid 500); 11 Jan 2006 17:21:45 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 81052 invoked by uid 500); 11 Jan 2006 17:21:44 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 80857 invoked by uid 99); 11 Jan 2006 17:21:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 09:21:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 11 Jan 2006 09:21:43 -0800 Received: (qmail 9305 invoked by uid 65534); 11 Jan 2006 17:21:23 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r368065 - /ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Date: Wed, 11 Jan 2006 17:21:22 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Wed Jan 11 09:21:19 2006 New Revision: 368065 URL: http://svn.apache.org/viewcvs?rev=368065&view=rev Log: Test svn:keyword Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Modified: ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs?rev=368065&r1=368064&r2=368065&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs Wed Jan 11 09:21:19 2006 @@ -23,6 +23,7 @@ ********************************************************************************/ #endregion + #region Using using System; From commitsjacobsonlaura@example.net Wed Jan 11 17:27:47 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 14635 invoked from network); 11 Jan 2006 17:27:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Jan 2006 17:27:46 -0000 Received: (qmail 99283 invoked by uid 500); 11 Jan 2006 17:27:38 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 99212 invoked by uid 500); 11 Jan 2006 17:27:38 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 99184 invoked by uid 99); 11 Jan 2006 17:27:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 09:27:38 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 11 Jan 2006 09:27:37 -0800 Received: (qmail 13730 invoked by uid 65534); 11 Jan 2006 17:27:16 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r368068 - in /ibatis/trunk/cs/mapper: IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs IBatisNet.DataMapper/SessionHolder.cs Date: Wed, 11 Jan 2006 17:27:15 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Wed Jan 11 09:27:06 2006 New Revision: 368068 URL: http://svn.apache.org/viewcvs?rev=368068&view=rev Log: Test svn:keyword Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SessionHolder.cs Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs?rev=368068&r1=368067&r2=368068&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/BaseTest.cs Wed Jan 11 09:27:06 2006 @@ -25,6 +25,7 @@ /// <summary> /// Summary description for BaseTest. /// </summary> + [TestFixture] public abstract class BaseTest { /// <summary> @@ -49,7 +50,7 @@ /// Initialize an sqlMap /// </summary> [TestFixtureSetUp] - protected void InitSqlMap() + protected virtual void SetUpFixture() { //DateTime start = DateTime.Now; @@ -78,12 +79,20 @@ /// Dispose the SqlMap /// </summary> [TestFixtureTearDown] - protected void DisposeSqlMap() + protected virtual void TearDownFixture() { sqlMap = null; } - +// [SetUp] +// public virtual void SetUp() +// { +// } +// +// [TearDown] +// public virtual void TearDown() +// { +// } protected static string Normal(string key) { Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs?rev=368068&r1=368067&r2=368068&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/CacheTest.cs Wed Jan 11 09:27:06 2006 @@ -1,6 +1,4 @@ - -//<-- To access the definition of the deleagte RowDelegate using System; using System.Collections; using System.Threading; Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SessionHolder.cs URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SessionHolder.cs?rev=368068&r1=368067&r2=368068&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SessionHolder.cs (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SessionHolder.cs Wed Jan 11 09:27:06 2006 @@ -1,12 +1,12 @@ #region Apache Notice /***************************************************************************** - * $Header: $ * $Revision: $ - * $Date: $ + * $LastChangedDate: $ + * $LastChangedBy: $ * * iBATIS.NET Data Mapper - * Copyright (C) 2004 - Gilles Bayon + * Copyright (C) 2005, 2006 The Apache Software Foundation * * * Licensed under the Apache License, Version 2.0 (the "License"); From commitsjacobsonlaura@example.net Sat Jan 14 17:35:07 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 60629 invoked from network); 14 Jan 2006 17:35:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 14 Jan 2006 17:35:07 -0000 Received: (qmail 7732 invoked by uid 500); 14 Jan 2006 17:35:07 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 7693 invoked by uid 500); 14 Jan 2006 17:35:06 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 7677 invoked by uid 99); 14 Jan 2006 17:35:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jan 2006 09:35:06 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 14 Jan 2006 09:35:05 -0800 Received: (qmail 60527 invoked by uid 65534); 14 Jan 2006 17:34:45 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r369061 - /ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml Date: Sat, 14 Jan 2006 17:34:44 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Sat Jan 14 09:34:40 2006 New Revision: 369061 URL: http://svn.apache.org/viewcvs?rev=369061&view=rev Log: - Added logging configuration in DataAccess Guide Modified: ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml Modified: ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml?rev=369061&r1=369060&r2=369061&view=diff ============================================================================== --- ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml (original) +++ ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml Sat Jan 14 09:34:40 2006 @@ -140,12 +140,9 @@ <filename>Castle.DynamicProxy.dll</filename> (creating proxies) </listitem> - <listitem> - <filename>log4net.dll</filename> (logging) - </listitem> </orderedlist> - Both of these dependencies - are found in the <filename>External-Bin</filename> folder and can also + The dependency + is found in the <filename>External-Bin</filename> folder and can also be found in the <filename>bin\Debug</filename> folder after building the solution. In addition, the framework's <filename>IBatisNet.DataAccess.Extensions</filename> and @@ -201,23 +198,6 @@ <entry>Castle.DynamicProxy.dll</entry> </row> - <row> - <entry>Log4NET 1.2.9</entry> - - <entry>Logging framework</entry> - - <entry>log4net.dll</entry> - </row> - - <row> - <entry>NHibernate </entry> - - <entry>Object persistence library; required if using - NHibernate DAO Session Handler</entry> - - <entry>HashCodeProvider.dll NHibernate.dll - Iesi.Collections.dll</entry> - </row> </tbody> </tgroup> </table></para> @@ -279,6 +259,189 @@ </sect2> </sect1> + <sect1> + <title>Logging Activity</title> + + <para>The iBATIS DataAccess framework records its interaction with the + database through an internal logging mechanism patterned after Apache + Log4Net. The internal logging mechanism can use one of the three built-in + loggers (NoOpLogger, ConsoleOutLogger, TraceLogger) or external logging + packages such as Apache Log4Net. In order for iBATIS to generate log + messages, the application's config file (App.Config or Web.Config) must + contain an appropriate configSection node:</para> + + <example> + <title>iBATIS Configuration Section Handler for logging</title> + + <programlisting>&lt;configSections&gt; + &lt;sectionGroup name="iBATIS"&gt; + &lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt; + &lt;/sectionGroup&gt; +&lt;/configSections&gt;</programlisting> + </example> + + <para>The application's config file must declare one logger + implementation. See the examples below on how to configure one of the + three built-in loggers.</para> + + <para><programlisting>&lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.ConsoleOutLoggerFA, IBatisNet.Common"&gt; + &lt;arg key="showLogName" value="true" /&gt; + &lt;arg key="showDataTime" value="true" /&gt; + &lt;arg key="level" value="ALL" /&gt; + &lt;arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:SSS" /&gt; + &lt;/logFactoryAdapter&gt; + &lt;/logging&gt; +&lt;/iBATIS&gt; +</programlisting><programlisting>&lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.NoOpLoggerFA, IBatisNet.Common" /&gt; + &lt;/logging&gt; +&lt;/iBATIS&gt; +</programlisting><programlisting>&lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.TraceLoggerFA, IBatisNet.Common" /&gt; + &lt;/logging&gt; +&lt;/iBATIS&gt;</programlisting></para> + + <para>To configure iBATIS to use another logger implementation, simple + specify the appropriate logFactoryAdapter type. To use Apache Log4Net with + the iBATIS framework, use the following configuration + setting:</para> + + <para><programlisting>&lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt; + &lt;arg key="configType" value="inline" /&gt; + &lt;/logFactoryAdapter&gt; + &lt;/logging&gt; +&lt;/iBATIS&gt;</programlisting></para> + + <para><programlisting>&lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt; + &lt;arg key="configType" value="file" /&gt; + &lt;arg key="configFile" value="log4Net.config" /&gt; + &lt;/logFactoryAdapter&gt; + &lt;/logging&gt; +&lt;/iBATIS&gt;</programlisting></para> + + <para>The Log4NetLoggerFA supports the following values for the + configTypes argument:<table> + <title>Valid configType values</title> + + <tgroup cols="2"> + <thead> + <row> + <entry>configType</entry> + + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry>inline</entry> + + <entry>log4net node will use the log4net node in the + App.Config/Web.Config file when it is configured</entry> + </row> + + <row> + <entry>file</entry> + + <entry>(also requires configFile argument) - log4net will use an + external file for its configuration</entry> + </row> + + <row> + <entry>file-watch</entry> + + <entry> (also requires configFile argument) - log4net will use + an external file for its configuration and will re-configure + itself if this file changes</entry> + </row> + + <row> + <entry>external</entry> + + <entry>iBATIS will not attempt to configure log4net.</entry> + </row> + </tbody> + </tgroup> + </table></para> + + <sect2> + <title>Sample Logging Configurations</title> + + <para>The simplest logging configuration is to output log messages to + Console.Out:</para> + + <para><programlisting>&lt;configuration&gt; + &lt;configSections&gt; + &lt;sectionGroup name="iBATIS"&gt; + &lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt; + &lt;/sectionGroup&gt; + &lt;/configSections&gt; + &lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.ConsoleLoggerFA, IBatisNet.Common.Logging" /&gt; + &lt;/logging&gt; + &lt;/iBATIS&gt; +&lt;/configuration&gt;</programlisting></para> + + <para>A common logging configuration is to use Apache Log4Net. To use + Log4Net with your own application, you need to provide your own Log4Net + configuration. You can do this by adding a configuration file for your + assembly that includes a &lt;log4Net&gt; element. The configuration file + is named after your assembly but adds a <filename>.config</filename> + extension, and is stored in the same folder as your assembly. This is an + example of a basic Log4Net configuration block + (IBatisNet.DataMapper.Test.dll.Config) that also creates a log4net.txt + which contains debug information from log4net. If log4net is not + producing output, check the log4net.txt file.</para> + + <para><programlisting>&lt;configuration&gt; + &lt;configSections&gt; + &lt;sectionGroup name="iBATIS"&gt; + &lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt; + &lt;/sectionGroup&gt; + &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt; + &lt;/configSections&gt; + &lt;appSettings&gt; + &lt;add key="log4net.Internal.Debug" value="true"/&gt; + &lt;/appSettings&gt; + &lt;system.diagnostics&gt; + &lt;trace autoflush="true"&gt; + &lt;listeners&gt; + &lt;add name="textWriterTraceListener" + type="System.Diagnostics.TextWriterTraceListener" + initializeData="C:\\inetpub\\wwwroot\\log4net.txt" /&gt; + &lt;/listeners&gt; + &lt;/trace&gt; + &lt;/system.diagnostics&gt; + &lt;iBATIS&gt; + &lt;logging&gt; + &lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt; + &lt;arg key="configType" value="inline" /&gt; + &lt;/logFactoryAdapter&gt; + &lt;/logging&gt; + &lt;/iBATIS&gt; + &lt;log4net&gt; + &lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&gt; + &lt;file value="log.txt" /&gt; + &lt;appendToFile value="true" /&gt; + &lt;layout type="log4net.Layout.SimpleLayout" /&gt; + &lt;/appender&gt; + &lt;root&gt; + &lt;level value="ALL" /&gt; + &lt;appender-ref ref="FileAppender" /&gt; + &lt;/root&gt; + &lt;/log4net&gt; +&lt;/configuration&gt;</programlisting></para> + </sect2> + </sect1> <sect1> <title>The Configuration File (dao.config)</title> From commitsjacobsonlaura@example.net Tue Jan 17 19:10:47 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 55677 invoked from network); 17 Jan 2006 19:10:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 17 Jan 2006 19:10:47 -0000 Received: (qmail 24998 invoked by uid 500); 17 Jan 2006 19:10:47 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 24967 invoked by uid 500); 17 Jan 2006 19:10:46 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 24955 invoked by uid 99); 17 Jan 2006 19:10:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2006 11:10:46 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 17 Jan 2006 11:10:45 -0800 Received: (qmail 55544 invoked by uid 65534); 17 Jan 2006 19:10:25 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r369870 - /ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config Date: Tue, 17 Jan 2006 19:10:24 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Tue Jan 17 11:10:19 2006 New Revision: 369870 URL: http://svn.apache.org/viewcvs?rev=369870&view=rev Log: - Updated bad config of logging Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config?rev=369870&r1=369869&r2=369870&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/IBatisNet.DataAccess.Test.dll.config Tue Jan 17 11:10:19 2006 @@ -34,7 +34,7 @@ <arg property="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:SSS" /> </logFactoryAdapter>--> - <logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common"> + <logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"> <arg key="configType" value="inline" /> </logFactoryAdapter> From commitsjacobsonlaura@example.net Fri Jan 20 17:29:31 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 98503 invoked from network); 20 Jan 2006 17:29:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 20 Jan 2006 17:29:31 -0000 Received: (qmail 42560 invoked by uid 500); 20 Jan 2006 17:29:31 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 42533 invoked by uid 500); 20 Jan 2006 17:29:31 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 42522 invoked by uid 99); 20 Jan 2006 17:29:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2006 09:29:30 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 20 Jan 2006 09:29:30 -0800 Received: (qmail 98369 invoked by uid 65534); 20 Jan 2006 17:29:09 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r370868 - in /ibatis/trunk/site: pages/events.vm pages/newsbyte.vm setenv.bat Date: Fri, 20 Jan 2006 17:29:08 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cbegin Date: Fri Jan 20 09:29:05 2006 New Revision: 370868 URL: http://svn.apache.org/viewcvs?rev=370868&view=rev Log: updated events calendar, removed old newsbyte Modified: ibatis/trunk/site/pages/events.vm ibatis/trunk/site/pages/newsbyte.vm ibatis/trunk/site/setenv.bat Modified: ibatis/trunk/site/pages/events.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/events.vm?rev=370868&r1=370867&r2=370868&view=diff ============================================================================== --- ibatis/trunk/site/pages/events.vm (original) +++ ibatis/trunk/site/pages/events.vm Fri Jan 20 09:29:05 2006 @@ -5,6 +5,22 @@ <body> + +<h3>March 23rd, 2006 - Las Vegas, Nevada, USA</h3> +<strong>The Server Side Java Symposium</strong> +<p> + A wise man once said: "PowerPoint is the worst thing ever to happen to + public speaking." So, in this session, Clinton will use only a Java + IDE and real-world examples to demonstrate how iBATIS is used to create + an effective persistence layer for your application. He will risk life + and limb (or at least his reputation) coding before an audience, to build + the back end of a simple Java application using a Test Driven approach. + No code snippets here, the persistence layer will be coded from scratch -- + with no safety net! Clinton will also be presenting the + <a href="http://javasymposium.techtarget.com/html/det_descriptions.htm#CBeginAgile" target="_new">Bottom 10 Reasons Agile Teams Fail</a>.<br/> + Visit the <a href="http://javasymposium.techtarget.com/" target="_new">The Server Side Java Symposium homepage</a> for more information. +</p> + <h3>December 10, 2005 - San Diego, California, USA</h3> <strong>ApacheCon US 2005</strong> <p> Modified: ibatis/trunk/site/pages/newsbyte.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/newsbyte.vm?rev=370868&r1=370867&r2=370868&view=diff ============================================================================== --- ibatis/trunk/site/pages/newsbyte.vm (original) +++ ibatis/trunk/site/pages/newsbyte.vm Fri Jan 20 09:29:05 2006 @@ -1,3 +1,3 @@ <div id="NewsByte" valign="top" align="right"> -<p><a title="ApacheCon US 2005" href="http://www.apachecon.com"><img src="ac2005us_banner_468x60.jpg" border="0"/></a></p> +<p> </p> </div> Modified: ibatis/trunk/site/setenv.bat URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/setenv.bat?rev=370868&r1=370867&r2=370868&view=diff ============================================================================== --- ibatis/trunk/site/setenv.bat (original) +++ ibatis/trunk/site/setenv.bat Fri Jan 20 09:29:05 2006 @@ -3,3 +3,5 @@ set BUILD_CP=%BUILD_CP%;%JAVA_HOME%\lib\tools.jar; set BUILD_CP=%BUILD_CP%;lib\ant-1.5.1.jar + +echo %BUILD_CP% \ No newline at end of file From commitsjacobsonlaura@example.net Sat Jan 21 10:01:04 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 74610 invoked from network); 21 Jan 2006 10:01:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 21 Jan 2006 10:01:04 -0000 Received: (qmail 32474 invoked by uid 500); 21 Jan 2006 10:01:04 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 32446 invoked by uid 500); 21 Jan 2006 10:01:03 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 32434 invoked by uid 99); 21 Jan 2006 10:01:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jan 2006 02:01:03 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 21 Jan 2006 02:01:02 -0800 Received: (qmail 74547 invoked by uid 65534); 21 Jan 2006 10:00:42 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r370998 - in /ibatis/trunk/cs/mapper: IBatisNet.DataAccess.Test/bin/Debug/providers.config IBatisNet.DataMapper.Test/bin/Debug/providers.config Date: Sat, 21 Jan 2006 10:00:41 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gbayon Date: Sat Jan 21 02:00:35 2006 New Revision: 370998 URL: http://svn.apache.org/viewcvs?rev=370998&view=rev Log: - Added SqlServer 2005 defintion in providers.config Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config?rev=370998&r1=370997&r2=370998&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config Sat Jan 21 02:00:35 2006 @@ -35,6 +35,23 @@ useParameterPrefixInSql="true" useParameterPrefixInParameter="true" parameterPrefix="@"/> +<provider + name="sqlServer2.0" + enabled="false" + description="Microsoft SQL Server 2005, provider V2.0.50215.0 in framework .NET V2.0" + assemblyName="System.Data, Version=2.0.50215.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" + connectionClass="System.Data.SqlClient.SqlConnection" + commandClass="System.Data.SqlClient.SqlCommand" + parameterClass="System.Data.SqlClient.SqlParameter" + parameterDbTypeClass="System.Data.SqlDbType" + parameterDbTypeProperty="SqlDbType" + dataAdapterClass="System.Data.SqlClient.SqlDataAdapter" + commandBuilderClass=" System.Data.SqlClient.SqlCommandBuilder" + usePositionalParameters = "false" + useParameterPrefixInSql = "true" + useParameterPrefixInParameter = "true" + parameterPrefix="@" + /> <provider name="OleDb1.1" description="OleDb, provider V1.0.5000.0 in framework .NET V1.1" enabled="true" Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config?rev=370998&r1=370997&r2=370998&view=diff ============================================================================== --- ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config (original) +++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/providers.config Sat Jan 21 02:00:35 2006 @@ -24,7 +24,8 @@ description="Microsoft SQL Server 7.0/2000, provider V1.0.5000.0 in framework .NET V1.1" enabled="true" default="true" - assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" connectionClass="System.Data.SqlClient.SqlConnection" + assemblyName="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" + connectionClass="System.Data.SqlClient.SqlConnection" commandClass="System.Data.SqlClient.SqlCommand" parameterClass="System.Data.SqlClient.SqlParameter" parameterDbTypeClass="System.Data.SqlDbType" @@ -35,6 +36,23 @@ useParameterPrefixInSql="true" useParameterPrefixInParameter="true" parameterPrefix="@"/> +<provider + name="sqlServer2.0" + enabled="false" + description="Microsoft SQL Server 2005, provider V2.0.50215.0 in framework .NET V2.0" + assemblyName="System.Data, Version=2.0.50215.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" + connectionClass="System.Data.SqlClient.SqlConnection" + commandClass="System.Data.SqlClient.SqlCommand" + parameterClass="System.Data.SqlClient.SqlParameter" + parameterDbTypeClass="System.Data.SqlDbType" + parameterDbTypeProperty="SqlDbType" + dataAdapterClass="System.Data.SqlClient.SqlDataAdapter" + commandBuilderClass=" System.Data.SqlClient.SqlCommandBuilder" + usePositionalParameters = "false" + useParameterPrefixInSql = "true" + useParameterPrefixInParameter = "true" + parameterPrefix="@" + /> <provider name="OleDb1.1" description="OleDb, provider V1.0.5000.0 in framework .NET V1.1" enabled="true" From commitsjacobsonlaura@example.net Sun Jan 22 02:32:33 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 15890 invoked from network); 22 Jan 2006 02:32:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 22 Jan 2006 02:32:33 -0000 Received: (qmail 92965 invoked by uid 500); 22 Jan 2006 02:32:32 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 92937 invoked by uid 500); 22 Jan 2006 02:32:32 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 92926 invoked by uid 99); 22 Jan 2006 02:32:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jan 2006 18:32:32 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 21 Jan 2006 18:32:31 -0800 Received: (qmail 15693 invoked by uid 65534); 22 Jan 2006 02:32:10 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r371170 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: cache/CacheModel.java mapping/statement/CachingStatement.java Date: Sun, 22 Jan 2006 02:32:10 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cbegin Date: Sat Jan 21 18:31:59 2006 New Revision: 371170 URL: http://svn.apache.org/viewcvs?rev=371170&view=rev Log: Fixed IBATIS-223 Thread deadlock due to CacheModel.flush() (Sven's fix) Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/cache/CacheModel.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/cache/CacheModel.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/cache/CacheModel.java?rev=371170&r1=371169&r2=371170&view=diff ============================================================================== --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/cache/CacheModel.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/cache/CacheModel.java Sat Jan 21 18:31:59 2006 @@ -24,17 +24,14 @@ import java.util.*; /** - * + * Wrapper for Caches. */ public class CacheModel implements ExecuteListener { - - private static final Map lockMap = new HashMap(); /** * This is used to represent null objects that are returned from the cache so * that they can be cached, too. */ public static final Object NULL_OBJECT = new Object(); - private final Object STATS_LOCK = new Object(); private int requests = 0; private int hits = 0; @@ -237,12 +234,9 @@ * Clears the cache */ public void flush() { - lastFlush = System.currentTimeMillis(); - // use the controller's key - CacheKey key = new CacheKey(); - key.update(controller); - synchronized (getLock(key)) { + synchronized (this) { controller.flush(this); + lastFlush = System.currentTimeMillis(); } } @@ -255,39 +249,32 @@ * @return The cached object (or null) */ public Object getObject(CacheKey key) { + Object value = null; synchronized (this) { if (flushInterval != NO_FLUSH_INTERVAL && System.currentTimeMillis() - lastFlush > flushInterval) { flush(); } - } - Object value = null; - synchronized (getLock(key)) { value = controller.getObject(this, key); - } - - if (serialize && !readOnly && (value != NULL_OBJECT && value != null)) { - try { - ByteArrayInputStream bis = new ByteArrayInputStream((byte[]) value); - ObjectInputStream ois = new ObjectInputStream(bis); - value = ois.readObject(); - ois.close(); - } catch (Exception e) { - throw new NestedRuntimeException("Error caching serializable object. Be sure you're not attempting to use " + - "a serialized cache for an object that may be taking advantage of lazy loading. Cause: " + e, e); + if (serialize && !readOnly && + (value != NULL_OBJECT && value != null)) { + try { + ByteArrayInputStream bis = new ByteArrayInputStream((byte[]) value); + ObjectInputStream ois = new ObjectInputStream(bis); + value = ois.readObject(); + ois.close(); + } catch (Exception e) { + throw new NestedRuntimeException("Error caching serializable object. Be sure you're not attempting to use " + + "a serialized cache for an object that may be taking advantage of lazy loading. Cause: " + e, e); + } } - } - - synchronized (STATS_LOCK) { requests++; if (value != null) { hits++; } } - return value; - } /** @@ -297,39 +284,21 @@ * @param value The object to be cached */ public void putObject(CacheKey key, Object value) { - if (null == value) value = NULL_OBJECT; - if (serialize && !readOnly && value != NULL_OBJECT) { - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(value); - oos.flush(); - oos.close(); - value = bos.toByteArray(); - } catch (IOException e) { - throw new NestedRuntimeException("Error caching serializable object. Cause: " + e, e); + if (null == value) value = NULL_OBJECT; + synchronized ( this ) { + if (serialize && !readOnly && value != NULL_OBJECT) { + try { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(value); + oos.flush(); + oos.close(); + value = bos.toByteArray(); + } catch (IOException e) { + throw new NestedRuntimeException("Error caching serializable object. Cause: " + e, e); + } } - } - synchronized (getLock(key)) { controller.putObject(this, key, value); } } - - /** - * OK, honestly, i have no idea what this does. - * @param key - * @return - */ - public synchronized final Object getLock(CacheKey key) { - int controllerId = System.identityHashCode(controller); - int keyHash = key.hashCode(); - Integer lockKey = new Integer(29 * controllerId + keyHash); - Object lock = lockMap.get(lockKey); - if (lock == null) { - lock = lockKey; //might as well use the same object - lockMap.put(lockKey, lock); - } - return lock; - } - } Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java?rev=371170&r1=371169&r2=371170&view=diff ============================================================================== --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/CachingStatement.java Sat Jan 21 18:31:59 2006 @@ -76,10 +76,8 @@ // This was cached, but null object = null; }else if (object == null) { - synchronized (cacheModel.getLock(cacheKey)) { - object = statement.executeQueryForObject(request, trans, parameterObject, resultObject); - cacheModel.putObject(cacheKey, object); - } + object = statement.executeQueryForObject(request, trans, parameterObject, resultObject); + cacheModel.putObject(cacheKey, object); } return object; } @@ -96,10 +94,8 @@ // The cached object was null list = null; }else if (listAsObject == null) { - synchronized (cacheModel.getLock(cacheKey)) { - list = statement.executeQueryForList(request, trans, parameterObject, skipResults, maxResults); - cacheModel.putObject(cacheKey, list); - } + list = statement.executeQueryForList(request, trans, parameterObject, skipResults, maxResults); + cacheModel.putObject(cacheKey, list); }else{ list = (List) listAsObject; } From commitsjacobsonlaura@example.net Sun Jan 22 03:14:12 2006 Return-Path: <commitsjacobsonlaura@example.net> Delivered-To: jacobsonlaura@example.net Received: (qmail 25921 invoked from network); 22 Jan 2006 03:14:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 22 Jan 2006 03:14:12 -0000 Received: (qmail 10993 invoked by uid 500); 22 Jan 2006 03:14:12 -0000 Delivered-To: jacobsonlaura@example.net Received: (qmail 10961 invoked by uid 500); 22 Jan 2006 03:14:11 -0000 Mailing-List: contact jacobsonlaura@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:jacobsonlaura@example.net> List-Unsubscribe: <mailto:jacobsonlaura@example.net> List-Post: <mailto:jacobsonlaura@example.net> List-Id: <commits.ibatis.apache.org> Reply-To: jacobsonlaura@example.net Delivered-To: mailing list jacobsonlaura@example.net Received: (qmail 10950 invoked by uid 99); 22 Jan 2006 03:14:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jan 2006 19:14:11 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 21 Jan 2006 19:14:10 -0800 Received: (qmail 25840 invoked by uid 65534); 22 Jan 2006 03:13:49 -0000 Message-ID: <jacobsonlaura@example.net> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r371173 - in /ibatis/trunk/java/mapper/mapper2: src/com/ibatis/sqlmap/engine/mapper/ src/com/ibatis/sqlmap/engine/mapper/metadata/ test/com/ibatis/sqlmap/mapper/ Date: Sun, 22 Jan 2006 03:13:47 -0000 To: jacobsonlaura@example.net From: jacobsonlaura@example.net X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cbegin Date: Sat Jan 21 19:13:39 2006 New Revision: 371173 URL: http://svn.apache.org/viewcvs?rev=371173&view=rev Log: Implemented stats based name matcher for use with auto crud ops generation Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/NameMatcher.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Column.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Database.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/DatabaseFactory.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Table.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/CanonicalizerTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/DatabaseMetadataTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/MatchCalculatorTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/NameMatcherTest.java Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java?rev=371173&view=auto ============================================================================== --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java Sat Jan 21 19:13:39 2006 @@ -0,0 +1,177 @@ +package com.ibatis.sqlmap.engine.mapper; + +import java.util.StringTokenizer; +import java.util.Map; +import java.util.HashMap; +import java.util.Iterator; + +public class Canonicalizer { + + public Map buildCanonicalMap(String[] originals) { + return buildCanonicalMap(originals, null); + } + public Map buildCanonicalMap(String[] originals, String parentName) { + Map map = new HashMap(); + for (int i=0; i < originals.length; i++) { + map.put(originals[i], originals[i]); + } + upperCase(map); + removeUnderscores(map); + removePKFK(map); + removePrefixes(map); + removeSuffixes(map); + removePluralization(map); + removeParentName(map, parentName); + return map; + } + + private void removeParentName(Map map, String parentName) { + if (parentName != null) { + parentName = parentName.toUpperCase(); + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + if (canonical.startsWith(parentName)) { + map.put(original, canonical.substring(parentName.length())); + } + if (canonical.endsWith(parentName)) { + map.put(original, canonical.substring(0, canonical.length() - parentName.length())); + } + } + } + } + + private void upperCase(Map map) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, canonical.toUpperCase()); + } + } + + private void removePKFK(Map map) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + if (canonical.startsWith("PK")) { + map.put(original, canonical.substring(2)); + } else if (canonical.startsWith("FK")) { + map.put(original, canonical.substring(2)); + } + if (canonical.endsWith("PK")) { + map.put(original, canonical.substring(0, canonical.length() - 2)); + } else if (canonical.endsWith("FK")) { + map.put(original, canonical.substring(0, canonical.length() - 2)); + } + } + } + + private void removePrefixes(Map map) { + int prefix = findPrefixLength(map); + + if (prefix > 1) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, canonical.substring(prefix)); + } + } + } + + private void removeSuffixes(Map map) { + int suffix = findSuffixLength(map); + + if (suffix > 1) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, canonical.substring(0, canonical.length() - suffix)); + } + } + } + + private int findPrefixLength(Map map) { + String[] originals = (String[])map.keySet().toArray(new String[map.keySet().size()]); + char[] samples = ((String) map.get(findShortestString(originals))).toCharArray(); + int prefix = 0; + for (int i=0; i < samples.length; i++) { + for (int j=0; j < originals.length; j++) { + String original = originals[j]; + String canonical = (String) map.get(original); + if (canonical.charAt(prefix) != samples[i]) { + return prefix; + } + } + prefix++; + } + if (prefix == samples.length) { + prefix = 0; + } + return prefix; + } + + private int findSuffixLength(Map map) { + String[] originals = (String[])map.keySet().toArray(new String[map.keySet().size()]); + char[] samples = ((String) map.get(findShortestString(originals))).toCharArray(); + int suffix = 0; + for (int i=0; i < samples.length; i++) { + for (int j=0; j < originals.length; j++) { + String original = originals[j]; + String canonical = (String) map.get(original); + if (canonical.charAt(canonical.length() - suffix - 1) != samples[samples.length - i - 1]) { + return suffix; + } + } + suffix++; + } + if (suffix == samples.length) { + suffix = 0; + } + return suffix; + } + + private String findShortestString(String[] originals) { + String shortest = originals[0]; + for (int i=0; i < originals.length; i++) { + if (originals[i].length() < shortest.length()) { + shortest = originals[i]; + } + } + return shortest; + } + + private void removeUnderscores (Map map) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, removeUnderscoresFromString(canonical)); + } + } + + private void removePluralization (Map map) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + if (canonical.endsWith("S") || canonical.endsWith("s")) { + map.put(original, canonical.substring(0, canonical.length() - 1)); + } + } + } + + private String removeUnderscoresFromString (String original) { + StringBuffer canonical = new StringBuffer(); + StringTokenizer parser = new StringTokenizer (original, "_", false); + while(parser.hasMoreTokens()) { + canonical.append(parser.nextToken()); + } + return canonical.toString(); + } + +} Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java?rev=371173&view=auto ============================================================================== --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java Sat Jan 21 19:13:39 2006 @@ -0,0 +1,32 @@ +package com.ibatis.sqlmap.engine.mapper; + +public class Match { + + private String property; + private String field; + private double matchScore; + + public Match(String property, String field, double matchScore) { + this.property = property; + this.field = field; + this.matchScore = matchScore; + } + + public String getProperty() { + return property; + } + + public String getField() { + return field; + } + + public double getMatchScore() { + return matchScore; + } + + + public String toString() { + return property + " => " + field + " ("+matchScore+")"; + } + +} Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java?rev=371173&view=auto ============================================================================== --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java Sat Jan 21 19:13:39 2006 @@ -0,0 +1,69 @@ +package com.ibatis.sqlmap.engine.mapper; + +import java.util.Set; +import java.util.HashSet; +import java.util.Iterator; + +public class MatchCalculator { + + private static final int SET_BEGIN = 2; + private static final int SET_END = 5; + private static final double MAX_VALUE = 1; + + public MatchCalculator() { + } + + public double calculateMatch (String first, String second) { + + Set firstSet = buildSets(first); + Set secondSet = buildSets(second); + + double value1 = compareSets(firstSet, secondSet); + double value2 = compareSets(secondSet, firstSet); + return (value1 + value2) / 2; + } + + private Set buildSets(String string) { + Set set = new HashSet(); + char[] chars = string.toUpperCase().toCharArray(); + for (int i = SET_BEGIN; i <= SET_END; i++) { + setsOf(i, chars, set); + } +
{'source': 'Apache Software Foundation Public Mail Archives'}