springnet-commits Mailing List for Spring Framework .NET (Page 28)
Brought to you by:
aseovic,
markpollack
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(33) |
Aug
(163) |
Sep
(491) |
Oct
(289) |
Nov
(336) |
Dec
(84) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(227) |
Feb
(413) |
Mar
(128) |
Apr
(232) |
May
(92) |
Jun
(299) |
Jul
(386) |
Aug
(228) |
Sep
(237) |
Oct
(426) |
Nov
(325) |
Dec
(405) |
2006 |
Jan
(315) |
Feb
(311) |
Mar
(152) |
Apr
(177) |
May
(443) |
Jun
(92) |
Jul
(88) |
Aug
(80) |
Sep
(288) |
Oct
(515) |
Nov
(1049) |
Dec
(440) |
2007 |
Jan
(179) |
Feb
(406) |
Mar
(294) |
Apr
(80) |
May
(432) |
Jun
(242) |
Jul
(452) |
Aug
(710) |
Sep
(206) |
Oct
(240) |
Nov
(65) |
Dec
(227) |
2008 |
Jan
(80) |
Feb
(90) |
Mar
(98) |
Apr
(136) |
May
(101) |
Jun
(12) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark P. <mar...@us...> - 2007-12-04 19:43:21
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31283 Modified Files: Spring.Data.2005.csproj Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager SPRNET-761 - Unit tests for TxScopePlatformTransactionManager, call 'IsExistingTransaction' method on ITransactionScopeAdapter in TxMgr impl remove DataAdapterObject, was not used or implemented - cruft. Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Spring.Data.2005.csproj 4 Dec 2007 16:31:05 -0000 1.60 --- Spring.Data.2005.csproj 4 Dec 2007 19:43:17 -0000 1.61 *************** *** 190,194 **** <Compile Include="Data\Objects\AdoQuery.cs" /> <Compile Include="Data\Objects\AdoScalar.cs" /> - <Compile Include="Data\Objects\DataSetOperation.cs" /> <Compile Include="Data\Objects\MappingAdoQuery.cs" /> <Compile Include="Data\Objects\MappingAdoQueryWithContext.cs" /> --- 190,193 ---- |
From: Mark P. <mar...@us...> - 2007-12-04 19:43:20
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31283/Data/Core Modified Files: ServiceDomainPlatformTransactionManager.cs TxScopeTransactionManager.cs Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager SPRNET-761 - Unit tests for TxScopePlatformTransactionManager, call 'IsExistingTransaction' method on ITransactionScopeAdapter in TxMgr impl remove DataAdapterObject, was not used or implemented - cruft. Index: ServiceDomainPlatformTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ServiceDomainPlatformTransactionManager.cs 4 Dec 2007 16:31:04 -0000 1.5 --- ServiceDomainPlatformTransactionManager.cs 4 Dec 2007 19:43:16 -0000 1.6 *************** *** 111,115 **** protected override object DoGetTransaction() { ! return new ServiceDomainTransactionObject(); } --- 111,120 ---- protected override object DoGetTransaction() { ! ServiceDomainTransactionObject txObject = new ServiceDomainTransactionObject(); ! if (txAdapter != null) ! { ! txObject.ServiceDomainAdapter = txAdapter; ! } ! return txObject; } *************** *** 150,158 **** { SimpleServiceConfig serviceConfig = CreateServiceConfig(definition); - - if (txAdapter != null) - { - serviceDomainTxObject.ServiceDomainAdapter = txAdapter; - } //The context is created when we call Enter. serviceDomainTxObject.ServiceDomainAdapter.Enter(serviceConfig); --- 155,158 ---- Index: TxScopeTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TxScopeTransactionManager.cs 30 Nov 2007 18:38:46 -0000 1.4 --- TxScopeTransactionManager.cs 4 Dec 2007 19:43:16 -0000 1.5 *************** *** 50,54 **** /// </summary> /// <remarks>This is indented only for unit testing purposes and should not be ! /// called by application code.</remarks> /// <param name="txAdapter">The tx adapter.</param> public TxScopeTransactionManager(ITransactionScopeAdapter txAdapter) --- 50,54 ---- /// </summary> /// <remarks>This is indented only for unit testing purposes and should not be ! /// called by production application code.</remarks> /// <param name="txAdapter">The tx adapter.</param> public TxScopeTransactionManager(ITransactionScopeAdapter txAdapter) *************** *** 71,75 **** protected override object DoGetTransaction() { ! return new PromotableTxScopeTransactionObject(); } --- 71,81 ---- protected override object DoGetTransaction() { ! PromotableTxScopeTransactionObject txObject = new PromotableTxScopeTransactionObject(); ! ! if (txAdapter != null) ! { ! txObject.TxScopeAdapter = txAdapter; ! } ! return txObject; } *************** *** 97,102 **** protected override object DoSuspend(object transaction) { ! // Passing the current TxScopeAdapter as the 'suspended resource, even though DoResume has no need to operate ! // on this object as it is handled internally inside TransactionScope. PromotableTxScopeTransactionObject txMgrStateObject = (PromotableTxScopeTransactionObject) transaction; return txMgrStateObject.TxScopeAdapter; --- 103,109 ---- protected override object DoSuspend(object transaction) { ! // Passing the current TxScopeAdapter as the 'suspended resource', even though it is not used just to avoid passing null ! // TxScopeTransactionManager is not binding any resources to the local thread, instead delegating to ! // System.Transactions to handle thread local resources. PromotableTxScopeTransactionObject txMgrStateObject = (PromotableTxScopeTransactionObject) transaction; return txMgrStateObject.TxScopeAdapter; *************** *** 167,171 **** } ! private void DoTxScopeBegin(PromotableTxScopeTransactionObject transaction, Spring.Transaction.ITransactionDefinition definition) { --- 174,178 ---- } ! private void DoTxScopeBegin(PromotableTxScopeTransactionObject txObject, Spring.Transaction.ITransactionDefinition definition) { *************** *** 173,188 **** TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); TransactionOptions txOptions = CreateTransactionOptions(definition); ! ! if (txAdapter != null) ! { ! txAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! transaction.TxScopeAdapter = txAdapter; ! } ! else ! { ! //TransactionScope txScope = new TransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! //transaction.TxScopeAdapter.TransactionScope = txScope; ! transaction.TxScopeAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! } } --- 180,184 ---- TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); TransactionOptions txOptions = CreateTransactionOptions(definition); ! txObject.TxScopeAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); } |
From: Bruno B. <bb...@us...> - 2007-12-04 18:38:18
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Proxy In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv4832 Modified Files: AbstractProxyTypeBuilderTests.cs Log Message: Problems with Attributes in proxy generation [SPRNET-606] (Proxy SecurityAttribute in .NET 2.0) Index: AbstractProxyTypeBuilderTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Proxy/AbstractProxyTypeBuilderTests.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AbstractProxyTypeBuilderTests.cs 3 Dec 2007 23:31:38 -0000 1.19 --- AbstractProxyTypeBuilderTests.cs 4 Dec 2007 18:38:14 -0000 1.20 *************** *** 261,265 **** // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 [Test] ! [Ignore("http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803")] public void ProxySecurityAttribute() { --- 261,267 ---- // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 [Test] ! #if !NET_2_0 ! [Ignore("GetCustomAttributes() does not return SecurityAttribute in .NET 1.x")] ! #endif public void ProxySecurityAttribute() { *************** *** 275,279 **** Assert.AreEqual(typeof(WebPermissionAttribute), attrs[1].GetType(), "Wrong System.Type of Attribute applied to the target type."); ! WebPermissionAttribute wpa = attrs[0] as WebPermissionAttribute; Assert.AreEqual(SecurityAction.Deny, wpa.Action); } --- 277,281 ---- Assert.AreEqual(typeof(WebPermissionAttribute), attrs[1].GetType(), "Wrong System.Type of Attribute applied to the target type."); ! WebPermissionAttribute wpa = attrs[1] as WebPermissionAttribute; Assert.AreEqual(SecurityAction.Deny, wpa.Action); } |
From: Bruno B. <bb...@us...> - 2007-12-04 18:38:05
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Proxy In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv4470 Modified Files: AbstractProxyTypeBuilder.cs InheritanceProxyTypeBuilder.cs Log Message: Problems with Attributes in proxy generation [SPRNET-606] (Proxy SecurityAttribute in .NET 2.0) Index: InheritanceProxyTypeBuilder.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Proxy/InheritanceProxyTypeBuilder.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** InheritanceProxyTypeBuilder.cs 31 Mar 2007 01:09:05 -0000 1.13 --- InheritanceProxyTypeBuilder.cs 4 Dec 2007 18:38:02 -0000 1.14 *************** *** 75,79 **** { Name = "InheritanceProxy"; ! //ExposeTargetAttributes = false; } --- 75,79 ---- { Name = "InheritanceProxy"; ! //ProxyTargetAttributes = false; } Index: AbstractProxyTypeBuilder.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AbstractProxyTypeBuilder.cs 3 Dec 2007 23:31:27 -0000 1.31 --- AbstractProxyTypeBuilder.cs 4 Dec 2007 18:38:02 -0000 1.32 *************** *** 366,374 **** // add attributes that apply to the target type #if NET_2_0 try { ! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(type)) { ! attributes.Add(cad); } } --- 366,386 ---- // add attributes that apply to the target type #if NET_2_0 + object[] attrs = type.GetCustomAttributes(false); try { ! System.Collections.Generic.IList<CustomAttributeData> attrsData = ! CustomAttributeData.GetCustomAttributes(type); ! ! if (attrs.Length != attrsData.Count) { ! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 ! attributes.AddRange(attrs); ! } ! else ! { ! foreach (CustomAttributeData cad in attrsData) ! { ! attributes.Add(cad); ! } } } *************** *** 376,385 **** { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(type.GetCustomAttributes(false)); } catch (CustomAttributeFormatException) { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=161522 ! attributes.AddRange(type.GetCustomAttributes(false)); } #else --- 388,397 ---- { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(attrs); } catch (CustomAttributeFormatException) { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=161522 ! attributes.AddRange(attrs); } #else *************** *** 412,420 **** // add attributes that apply to the target method #if NET_2_0 try { ! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method)) { ! attributes.Add(cad); } } --- 424,444 ---- // add attributes that apply to the target method #if NET_2_0 + object[] attrs = method.GetCustomAttributes(false); try { ! System.Collections.Generic.IList<CustomAttributeData> attrsData = ! CustomAttributeData.GetCustomAttributes(method); ! ! if (attrs.Length != attrsData.Count) { ! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 ! attributes.AddRange(attrs); ! } ! else ! { ! foreach (CustomAttributeData cad in attrsData) ! { ! attributes.Add(cad); ! } } } *************** *** 422,426 **** { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(method.GetCustomAttributes(false)); } #else --- 446,450 ---- { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(attrs); } #else *************** *** 465,473 **** { // add attributes that apply to the target method' return type try { ! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method.ReturnParameter)) { ! attributes.Add(cad); } } --- 489,509 ---- { // add attributes that apply to the target method' return type + object[] attrs = method.ReturnTypeCustomAttributes.GetCustomAttributes(false); try { ! System.Collections.Generic.IList<CustomAttributeData> attrsData = ! CustomAttributeData.GetCustomAttributes(method.ReturnParameter); ! ! if (attrs.Length != attrsData.Count) { ! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 ! attributes.AddRange(attrs); ! } ! else ! { ! foreach (CustomAttributeData cad in attrsData) ! { ! attributes.Add(cad); ! } } } *************** *** 475,479 **** { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(method.ReturnTypeCustomAttributes.GetCustomAttributes(false)); } } --- 511,515 ---- { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(attrs); } } *************** *** 503,511 **** // add attributes that apply to the target method's parameter #if NET_2_0 try { ! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(paramInfo)) { ! attributes.Add(cad); } } --- 539,559 ---- // add attributes that apply to the target method's parameter #if NET_2_0 + object[] attrs = paramInfo.GetCustomAttributes(false); try { ! System.Collections.Generic.IList<CustomAttributeData> attrsData = ! CustomAttributeData.GetCustomAttributes(paramInfo); ! ! if (attrs.Length != attrsData.Count) { ! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 ! attributes.AddRange(attrs); ! } ! else ! { ! foreach (CustomAttributeData cad in attrsData) ! { ! attributes.Add(cad); ! } } } *************** *** 513,517 **** { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(paramInfo.GetCustomAttributes(false)); } #else --- 561,565 ---- { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032 ! attributes.AddRange(attrs); } #else |
From: Mark P. <mar...@us...> - 2007-12-04 18:19:40
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Config In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29595 Modified Files: spring-database-1.1.xsd Log Message: SPRNET-744 - update assembly version numbers to current builds in dbproviders.xml Index: spring-database-1.1.xsd =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Config/spring-database-1.1.xsd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spring-database-1.1.xsd 7 Aug 2007 22:05:32 -0000 1.1 --- spring-database-1.1.xsd 4 Dec 2007 18:19:37 -0000 1.2 *************** *** 52,55 **** --- 52,91 ---- <xs:simpleType id="buildinProvider"> <xs:restriction base="xs:string"> + <xs:enumeration value="System.Data.SqlClient"> + <xs:annotation> + <xs:documentation>Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="System.Data.SqlServerCe"> + <xs:annotation> + <xs:documentation>Microsoft SQL Server Compact Edition, provider V9.0.242.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="System.Data.OleDb"> + <xs:annotation> + <xs:documentation>OleDb, provider V2.0.0.0 in framework .NET V2.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="System.Data.OracleClient"> + <xs:annotation> + <xs:documentation>Oracle, Oracle provider V2.102.2.20</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="Oracle.DataAccess.Client"> + <xs:annotation> + <xs:documentation>Oracle, Oracle provider V2.102.2.20</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="MySql.Data.MySqlClient"> + <xs:annotation> + <xs:documentation>MySQL provider 5.1.4.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="System.Data.SQLite"> + <xs:annotation> + <xs:documentation>SQLite 1.0.47 provider</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="SqlServer-1.1"> <xs:annotation> *************** *** 92,95 **** --- 128,156 ---- </xs:annotation> </xs:enumeration> + <xs:enumeration value="MySql-1.0.9"> + <xs:annotation> + <xs:documentation>MySQL provider 1.0.9.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="MySql-5.0"> + <xs:annotation> + <xs:documentation>MySQL provider 5.0.7.0</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="MySql-5.0.8.1"> + <xs:annotation> + <xs:documentation>MySQL provider 5.0.8.1</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="MySql-5.1"> + <xs:annotation> + <xs:documentation>MySQL provider 5.1.2.2</xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="MySql-5.1.4"> + <xs:annotation> + <xs:documentation>MySQL provider 5.1.4.0</xs:documentation> + </xs:annotation> + </xs:enumeration> <xs:enumeration value="Npgsql-1.0"> <xs:annotation> *************** *** 97,100 **** --- 158,166 ---- </xs:annotation> </xs:enumeration> + <xs:enumeration value="Npgsql-2.0-beta1"> + <xs:annotation> + <xs:documentation>Npgsql provider beta-1 1.98.1.0</xs:documentation> + </xs:annotation> + </xs:enumeration> <xs:enumeration value="DB2-9.0.0-1.1"> <xs:annotation> *************** *** 122,133 **** </xs:annotation> </xs:enumeration> ! <xs:enumeration value="System.Data.SQLite"> <xs:annotation> <xs:documentation>SQLite 1.0.44 provider</xs:documentation> </xs:annotation> </xs:enumeration> ! <xs:enumeration value="SQLite-1.0.43"> <xs:annotation> ! <xs:documentation>SQLite 1.0.43 provider</xs:documentation> </xs:annotation> </xs:enumeration> --- 188,219 ---- </xs:annotation> </xs:enumeration> ! <xs:enumeration value="SQLite-1.0.43"> ! <xs:annotation> ! <xs:documentation>SQLite 1.0.43 provider</xs:documentation> ! </xs:annotation> ! </xs:enumeration> ! <xs:enumeration value="SQLite-1.0.44"> <xs:annotation> <xs:documentation>SQLite 1.0.44 provider</xs:documentation> </xs:annotation> </xs:enumeration> ! <xs:enumeration value="SybaseAse-12"> <xs:annotation> ! <xs:documentation>Sybase ASE 12.5, 1.1.411 provider</xs:documentation> ! </xs:annotation> ! </xs:enumeration> ! <xs:enumeration value="SybaseAse-15"> ! <xs:annotation> ! <xs:documentation>Sybase ASE 15, 1.15.152 provider</xs:documentation> ! </xs:annotation> ! </xs:enumeration> ! <xs:enumeration value="Odbc-1.1"> ! <xs:annotation> ! <xs:documentation>Microsoft ODBC, provider V1.0.5000.0 in framework .NET V1.1</xs:documentation> ! </xs:annotation> ! </xs:enumeration> ! <xs:enumeration value="Odbc-2.0"> ! <xs:annotation> ! <xs:documentation>Microsoft ODBC, provider V2.0.0.0 in framework .NET V2</xs:documentation> </xs:annotation> </xs:enumeration> |
From: Mark P. <mar...@us...> - 2007-12-04 18:19:17
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29571 Modified Files: dbproviders.xml Log Message: SPRNET-744 - update assembly version numbers to current builds in dbproviders.xml Index: dbproviders.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/dbproviders.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** dbproviders.xml 27 Nov 2007 15:27:02 -0000 1.28 --- dbproviders.xml 4 Dec 2007 18:19:12 -0000 1.29 *************** *** 458,461 **** --- 458,503 ---- </object> + <object id="MySql-5.0.8.1" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> + <constructor-arg name="dbMetaData"> + <object type="Spring.Data.Common.DbMetadata"> + <constructor-arg name="productName" value="MySQL, MySQL provider 5.0.8.1" /> + <constructor-arg name="assemblyName" value="MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="connectionType" value="MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="commandType" value="MySql.Data.MySqlClient.MySqlCommand, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="parameterType" value="MySql.Data.MySqlClient.MySqlParameter, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="dataAdapterType" value="MySql.Data.MySqlClient.MySqlDataAdapter, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="commandBuilderType" value="MySql.Data.MySqlClient.MySqlCommandBuilder, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="commandBuilderDeriveParametersMethod" value="DeriveParameters"/> + <constructor-arg name="parameterDbType" value="MySql.Data.MySqlClient.MySqlDbType, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="parameterDbTypeProperty" value="MySqlDbType"/> + <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> + <constructor-arg name="parameterNamePrefix" value="?"/> + <constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> + <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> + <constructor-arg name="useParameterPrefixInSql" value="true"/> + <constructor-arg name="bindByName" value="true"/> + <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for + obtaining error codes--> + <constructor-arg name="errorCodeExceptionExpression" value="Number.ToString()"/> + + <property name="ErrorCodes.badSqlGrammarCodes"> + <value>1054,1064,1146</value> + </property> + <property name="ErrorCodes.DataAccessResourceFailureCodes"> + <value>1</value> + </property> + <property name="ErrorCodes.DataIntegrityViolationCodes"> + <value>1062</value> + </property> + <property name="ErrorCodes.CannotAcquireLockCodes"> + <value>1205</value> + </property> + <property name="ErrorCodes.DeadlockLoserCodes"> + <value>1213</value> + </property> + </object> + </constructor-arg> + </object> + <!-- Connector/NET 5.1 (.NET 2.0 only) --> *************** *** 503,507 **** </object> ! <alias name="MySql-5.1" alias="MySql.Data.MySqlClient"/> --- 545,591 ---- </object> ! <object id="MySql-5.1.4" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> ! <constructor-arg name="dbMetaData"> ! <object type="Spring.Data.Common.DbMetadata"> ! <constructor-arg name="productName" value="MySQL, MySQL provider 5.1.4.0" /> ! <constructor-arg name="assemblyName" value="MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="connectionType" value="MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="commandType" value="MySql.Data.MySqlClient.MySqlCommand, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="parameterType" value="MySql.Data.MySqlClient.MySqlParameter, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="dataAdapterType" value="MySql.Data.MySqlClient.MySqlDataAdapter, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="commandBuilderType" value="MySql.Data.MySqlClient.MySqlCommandBuilder, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="commandBuilderDeriveParametersMethod" value="DeriveParameters"/> ! <constructor-arg name="parameterDbType" value="MySql.Data.MySqlClient.MySqlDbType, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="parameterDbTypeProperty" value="MySqlDbType"/> ! <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> ! <constructor-arg name="parameterNamePrefix" value="?"/> ! <constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=5.1.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> ! <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> ! <constructor-arg name="useParameterPrefixInSql" value="true"/> ! <constructor-arg name="bindByName" value="true"/> ! <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for ! obtaining error codes--> ! <constructor-arg name="errorCodeExceptionExpression" value="Number.ToString()"/> ! ! <property name="ErrorCodes.badSqlGrammarCodes"> ! <value>1054,1064,1146</value> ! </property> ! <property name="ErrorCodes.DataAccessResourceFailureCodes"> ! <value>1</value> ! </property> ! <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> ! </property> ! <property name="ErrorCodes.CannotAcquireLockCodes"> ! <value>1205</value> ! </property> ! <property name="ErrorCodes.DeadlockLoserCodes"> ! <value>1213</value> ! </property> ! </object> ! </constructor-arg> ! </object> ! ! <alias name="MySql-5.1.4" alias="MySql.Data.MySqlClient"/> *************** *** 548,551 **** --- 632,676 ---- </object> + <object id="Npgsql-2.0-beta1" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> + <constructor-arg name="dbMetaData"> + <object type="Spring.Data.Common.DbMetadata, Spring.Data"> + <constructor-arg name="productName" value="Npgsql" /> + <constructor-arg name="assemblyName" value="Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="connectionType" value="Npgsql.NpgsqlConnection, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="commandType" value="Npgsql.NpgsqlCommand, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="parameterType" value="Npgsql.NpgsqlParameter, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="dataAdapterType" value="Npgsql.NpgsqlDataAdapter, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="commandBuilderType" value="Npgsql.NpgsqlCommandBuilder, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="commandBuilderDeriveParametersMethod" value="DeriveParameters"/> + <constructor-arg name="parameterDbType" value="NpgsqlTypes.NpgsqlDbType, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="parameterDbTypeProperty" value="NpgsqlDbType"/> + <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> + <constructor-arg name="parameterNamePrefix" value=":"/> + <constructor-arg name="exceptionType" value="Npgsql.NpgsqlException, Npgsql, Version=1.98.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/> + <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> + <constructor-arg name="useParameterPrefixInSql" value="true"/> + <constructor-arg name="bindByName" value="true"/> + <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for + obtaining error codes--> + <constructor-arg name="errorCodeExceptionExpression" value="Errors[0].Code"/> + <!-- error codes taken from http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html --> + <property name="ErrorCodes.badSqlGrammarCodes"> + <value>42000,42601,42602,42622,42804</value> + </property> + <property name="ErrorCodes.DataAccessResourceFailureCodes"> + <value>53000,53100,53200,53300</value> + </property> + <property name="ErrorCodes.DataIntegrityViolationCodes"> + <value>23000,23502,23503,23505,23514</value> + </property> + <property name="ErrorCodes.CannotAcquireLockCodes"> + <value>55P03</value> + </property> + <property name="ErrorCodes.DeadlockLoserCodes"> + <value>40P01</value> + </property> + </object> + </constructor-arg> + </object> <!-- DB2 9.0.0 for .NET 1.1 --> *************** *** 856,861 **** </constructor-arg> </object> ! <alias name="SQLite-1.0.44" alias="System.Data.SQLite"/> <!-- Sybase --> --- 981,1028 ---- </constructor-arg> </object> + + <object id="SQLite-1.0.47" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> + <constructor-arg name="dbMetaData"> + <object type="Spring.Data.Common.DbMetadata"> + <constructor-arg name="productName" value="SQLite"/> + <constructor-arg name="assemblyName" value="System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="connectionType" value="System.Data.SQLite.SQLiteConnection, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="commandType" value="System.Data.SQLite.SQLiteCommand, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="parameterType" value="System.Data.SQLite.SQLiteParameter, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="dataAdapterType" value="System.Data.SQLite.SQLiteDataAdapter , System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="commandBuilderType" value="System.Data.SQLite.SQLiteCommandBuilder, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="commandBuilderDeriveParametersMethod" value="not supported"/> + <constructor-arg name="parameterDbType" value="System.Data.SQLite.TypeAffinity, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="parameterDbTypeProperty" value="DbType"/> + <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> + <constructor-arg name="parameterNamePrefix" value=":"/> + <constructor-arg name="exceptionType" value="System.Data.SQLite.SQLiteException, System.Data.SQLite, Version=1.0.47.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/> + <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> + <constructor-arg name="useParameterPrefixInSql" value="true"/> + <constructor-arg name="bindByName" value="true"/> + <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for + obtaining error codes--> + <constructor-arg name="errorCodeExceptionExpression" value="Number.ToString()"/> + + <property name="ErrorCodes.badSqlGrammarCodes"> + <value></value> + </property> + <property name="ErrorCodes.DataAccessResourceFailureCodes"> + <value>1</value> + </property> + <property name="ErrorCodes.DataIntegrityViolationCodes"> + <value></value> + </property> + <property name="ErrorCodes.CannotAcquireLockCodes"> + <value>15</value> + </property> + <property name="ErrorCodes.DeadlockLoserCodes"> + <value>5,6</value> + </property> + </object> + </constructor-arg> + </object> ! <alias name="SQLite-1.0.47" alias="System.Data.SQLite"/> <!-- Sybase --> *************** *** 895,899 **** </constructor-arg> </object> ! <object id="SybaseAse-15" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> <constructor-arg name="dbMetaData"> --- 1062,1066 ---- </constructor-arg> </object> ! <object id="SybaseAse-15" type="Spring.Data.Common.DbProvider, Spring.Data" singleton="false"> <constructor-arg name="dbMetaData"> *************** *** 936,940 **** <constructor-arg name="dbMetaData"> <object type="Spring.Data.Common.DbMetadata"> ! <constructor-arg name="productName" value="Odbc, provider V1.0.5000.0 in framework .NET V1.1"/> <constructor-arg name="assemblyName" value="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <constructor-arg name="connectionType" value="System.Data.Odbc.OdbcConnection, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> --- 1103,1107 ---- <constructor-arg name="dbMetaData"> <object type="Spring.Data.Common.DbMetadata"> ! <constructor-arg name="productName" value="Microsoft ODBC, provider V1.0.5000.0 in framework .NET V1.1"/> <constructor-arg name="assemblyName" value="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <constructor-arg name="connectionType" value="System.Data.Odbc.OdbcConnection, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> *************** *** 960,964 **** <constructor-arg name="dbMetaData"> <object type="Spring.Data.Common.DbMetadata"> ! <constructor-arg name="productName" value="Odbc, provider V2.0.0.0 in framework .NET V2"/> <constructor-arg name="assemblyName" value="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <constructor-arg name="connectionType" value="System.Data.Odbc.OdbcConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> --- 1127,1131 ---- <constructor-arg name="dbMetaData"> <object type="Spring.Data.Common.DbMetadata"> ! <constructor-arg name="productName" value="Microsoft ODBC, provider V2.0.0.0 in framework .NET V2"/> <constructor-arg name="assemblyName" value="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <constructor-arg name="connectionType" value="System.Data.Odbc.OdbcConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> |
From: Bruno B. <bb...@us...> - 2007-12-04 18:03:28
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25093 Modified Files: Spring.build Log Message: Removed extra character. Index: Spring.build =================================================================== RCS file: /cvsroot/springnet/Spring.Net/Spring.build,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** Spring.build 3 Dec 2007 16:11:30 -0000 1.191 --- Spring.build 4 Dec 2007 18:03:25 -0000 1.192 *************** *** 750,754 **** <include name="**/*.exe"/> <include name="**/*.jar"/> ! t </fileset> </copy> </target> --- 750,754 ---- <include name="**/*.exe"/> <include name="**/*.jar"/> ! </fileset> </copy> </target> |
From: Mark P. <mar...@us...> - 2007-12-04 16:47:09
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28175 Removed Files: DataSetOperation.cs Log Message: unused code. --- DataSetOperation.cs DELETED --- |
From: Mark P. <mar...@us...> - 2007-12-04 16:31:19
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22008 Modified Files: Spring.Data.Tests.2005.csproj Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: Spring.Data.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2005.csproj,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Spring.Data.Tests.2005.csproj 30 Nov 2007 18:38:59 -0000 1.30 --- Spring.Data.Tests.2005.csproj 4 Dec 2007 16:31:14 -0000 1.31 *************** *** 97,100 **** --- 97,101 ---- <Name>System.Drawing</Name> </Reference> + <Reference Include="System.EnterpriseServices" /> <Reference Include="System.Transactions" /> <Reference Include="System.Xml"> *************** *** 169,172 **** --- 170,174 ---- </ItemGroup> <ItemGroup> + <Compile Include="Data\Core\ServiceDomainTransactionManagerTests.cs" /> <Compile Include="Data\Core\TxScopeTransactionManagerIntegrationTests.cs" /> <Compile Include="Data\Core\TxScopeTransactionManagerTests.cs" /> |
From: Mark P. <mar...@us...> - 2007-12-04 16:31:18
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22008/Data/Core Modified Files: ServiceDomainTransactionManagerTests.cs Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: ServiceDomainTransactionManagerTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core/ServiceDomainTransactionManagerTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ServiceDomainTransactionManagerTests.cs 4 Dec 2007 08:38:04 -0000 1.2 --- ServiceDomainTransactionManagerTests.cs 4 Dec 2007 16:31:14 -0000 1.3 *************** *** 19,22 **** --- 19,25 ---- #endregion + + #if (!NET_1_0) + #region Imports *************** *** 76,85 **** IPlatformTransactionManager tm = new ServiceDomainPlatformTransactionManager(txAdapter); TransactionTemplate tt = new TransactionTemplate(tm); ! tt.Execute(delegate(ITransactionStatus status) ! { ! Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); ! Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); ! return null; ! }); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); --- 79,83 ---- IPlatformTransactionManager tm = new ServiceDomainPlatformTransactionManager(txAdapter); TransactionTemplate tt = new TransactionTemplate(tm); ! tt.Execute(new TransactionDelegate(TransactionCommitMethod)); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); *************** *** 90,93 **** --- 88,98 ---- } + private object TransactionCommitMethod(ITransactionStatus status) + { + Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); + Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); + return null; + } + [Test] public void TransactionRollback() *************** *** 115,126 **** try { ! tt.Execute(delegate(ITransactionStatus status) ! { ! Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); ! Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); ! Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); ! if (ex != null) throw ex; ! return null; ! }); Assert.Fail("Should have thrown exception"); } --- 120,124 ---- try { ! tt.Execute(new TransactionRollbackTxCallback(ex)); Assert.Fail("Should have thrown exception"); } *************** *** 147,150 **** } } ! } \ No newline at end of file --- 145,171 ---- } + + #region Supporting class for TransactionRollback test + + internal class TransactionRollbackTxCallback : ITransactionCallback + { + private Exception exception; + + public TransactionRollbackTxCallback(Exception exception) + { + this.exception = exception; + } + + public object DoInTransaction(ITransactionStatus status) + { + Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); + Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); + Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); + throw exception; + } + } + + #endregion } ! } ! #endif \ No newline at end of file |
From: Mark P. <mar...@us...> - 2007-12-04 16:31:11
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21617 Modified Files: Spring.Data.2005.csproj Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Spring.Data.2005.csproj 4 Dec 2007 15:22:46 -0000 1.59 --- Spring.Data.2005.csproj 4 Dec 2007 16:31:05 -0000 1.60 *************** *** 212,215 **** --- 212,216 ---- <Compile Include="Data\Support\ParameterUtils.cs" /> <Compile Include="Data\Support\RowCallbackResultSetExtractor.cs" /> + <Compile Include="Data\Support\SimpleServiceConfig.cs" /> <Compile Include="Data\Support\TypedDataSetUtils.cs" /> <Compile Include="Data\UncategorizedAdoException.cs"> |
From: Mark P. <mar...@us...> - 2007-12-04 16:31:10
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21617/Data/Core Modified Files: ServiceDomainPlatformTransactionManager.cs Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: ServiceDomainPlatformTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ServiceDomainPlatformTransactionManager.cs 4 Dec 2007 08:16:42 -0000 1.4 --- ServiceDomainPlatformTransactionManager.cs 4 Dec 2007 16:31:04 -0000 1.5 *************** *** 309,313 **** catch (Exception e) { ! throw new TransactionSystemException("Failure upon Leaving ServiceDomain (i.e. Commit)", e); } --- 309,313 ---- catch (Exception e) { ! throw new TransactionSystemException("Failure upon Leaving ServiceDomain (for Commit)", e); } *************** *** 324,330 **** txObject.ServiceDomainAdapter.Leave(); } catch (Exception e) { ! throw new Spring.Transaction.TransactionSystemException("Failure on Transaction Scope rollback.", e); } } --- 324,334 ---- txObject.ServiceDomainAdapter.Leave(); } + catch (PlatformNotSupportedException ex) + { + throw new TransactionSystemException("Failure on Rollback. Platform does not support EnterpriseServices 'Services without Components'", ex); + } catch (Exception e) { ! throw new Spring.Transaction.TransactionSystemException("Failure upon Leaving ServiceDomain (for Rollback)", e); } } |
From: Mark P. <mar...@us...> - 2007-12-04 16:31:10
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21617/Data/Support Modified Files: SimpleServiceConfig.cs Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: SimpleServiceConfig.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Support/SimpleServiceConfig.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleServiceConfig.cs 4 Dec 2007 08:16:42 -0000 1.1 --- SimpleServiceConfig.cs 4 Dec 2007 16:31:05 -0000 1.2 *************** *** 1,2 **** --- 1,24 ---- + #region License + + /* + * Copyright © 2002-2007 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #endregion + + #if (!NET_1_0) + using System.EnterpriseServices; *************** *** 4,10 **** { /// <summary> ! /// A class that contains the properties of ServiceConfig used by ServiceDomainPlatformTransactionManager. This is ! /// done to enhance testability of the transaction manager since ServiceConfig does not override Equals or Hashcode /// </summary> public class SimpleServiceConfig { --- 26,34 ---- { /// <summary> ! /// A class that contains the properties of ServiceConfig used by ServiceDomainPlatformTransactionManager. /// </summary> + /// <remarks>This is done to enhance testability of the transaction manager since ServiceConfig does not override Equals or Hashcode</remarks> + /// <author>Mark Pollack (.NET)</author> + /// <version>$Id $</version> public class SimpleServiceConfig { *************** *** 100,102 **** } } ! } \ No newline at end of file --- 124,127 ---- } } ! } ! #endif \ No newline at end of file |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:57
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web.Extensions In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Web.Extensions Modified Files: AssemblyInfo.cs Spring.Web.Extensions.2005.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Web.Extensions.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.2005.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Spring.Web.Extensions.2005.csproj 14 Sep 2007 15:45:50 -0000 1.6 --- Spring.Web.Extensions.2005.csproj 4 Dec 2007 15:22:46 -0000 1.7 *************** *** 46,49 **** --- 46,50 ---- <Link>CommonAssemblyInfo.cs</Link> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="Web\Script\Services\ScriptHandlerFactory.cs" /> </ItemGroup> Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web.Extensions/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssemblyInfo.cs 11 Jul 2007 16:37:34 -0000 1.1 --- AssemblyInfo.cs 4 Dec 2007 15:22:46 -0000 1.2 *************** *** 2,5 **** using System.Reflection; ! [assembly: AssemblyTitle("Spring.Net Web Service Extenstions support")] ! [assembly: AssemblyDescription("Interfaces and classes that provide WSE support in Spring.Net")] \ No newline at end of file --- 2,5 ---- using System.Reflection; ! [assembly: AssemblyTitle("Spring.Net ASP.NET AJAX 1.0 support")] ! [assembly: AssemblyDescription("Interfaces and classes that provide ASP.NET AJAX 1.0 support in Spring.Net")] \ No newline at end of file |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:53
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Data.NHibernate Modified Files: Spring.Data.NHibernate.2003.csproj Spring.Data.NHibernate.2005.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Data.NHibernate.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.2003.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Spring.Data.NHibernate.2003.csproj 14 Sep 2007 15:11:46 -0000 1.7 --- Spring.Data.NHibernate.2003.csproj 4 Dec 2007 15:22:46 -0000 1.8 *************** *** 135,138 **** --- 135,143 ---- <Include> <File + RelPath = "AssemblyInfo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CommonAssemblyInfo.cs" Link = "..\CommonAssemblyInfo.cs" Index: Spring.Data.NHibernate.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.2005.csproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Spring.Data.NHibernate.2005.csproj 20 Nov 2007 14:39:48 -0000 1.11 --- Spring.Data.NHibernate.2005.csproj 4 Dec 2007 15:22:46 -0000 1.12 *************** *** 56,59 **** --- 56,60 ---- <Link>CommonAssemblyInfo.cs</Link> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="Data\NHibernate\HibernateAccessor.cs" /> <Compile Include="Data\NHibernate\HibernateAdoException.cs" /> |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:52
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Testing.NUnit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Testing.NUnit Modified Files: Spring.Testing.NUnit.2003.csproj Spring.Testing.NUnit.2005.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Testing.NUnit.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.2005.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Spring.Testing.NUnit.2005.csproj 14 Sep 2007 15:45:50 -0000 1.4 --- Spring.Testing.NUnit.2005.csproj 4 Dec 2007 15:22:46 -0000 1.5 *************** *** 47,50 **** --- 47,51 ---- <Link>CommonAssemblyInfo.cs</Link> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="Testing\NUnit\AbstractDependencyInjectionSpringContextTests.cs" /> <Compile Include="Testing\NUnit\AbstractSpringContextTests.cs" /> Index: Spring.Testing.NUnit.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.2003.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Spring.Testing.NUnit.2003.csproj 14 Sep 2007 15:11:46 -0000 1.5 --- Spring.Testing.NUnit.2003.csproj 4 Dec 2007 15:22:46 -0000 1.6 *************** *** 100,103 **** --- 100,108 ---- <Include> <File + RelPath = "AssemblyInfo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CommonAssemblyInfo.cs" Link = "..\CommonAssemblyInfo.cs" |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:51
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Data.NHibernate12 Modified Files: Spring.Data.NHibernate12.2005.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Data.NHibernate12.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.2005.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Spring.Data.NHibernate12.2005.csproj 3 Oct 2007 05:02:49 -0000 1.5 --- Spring.Data.NHibernate12.2005.csproj 4 Dec 2007 15:22:43 -0000 1.6 *************** *** 108,111 **** --- 108,112 ---- <Link>Data\NHibernate\TemplateFlushMode.cs</Link> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="Data\NHibernate\Generic\FindHibernateDelegate.cs" /> <Compile Include="Data\NHibernate\Generic\HibernateDaoSupport.cs" /> |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:51
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Services Modified Files: Spring.Services.2003.csproj Spring.Services.2005.csproj Spring.Services.2008.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Services.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Spring.Services.2003.csproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Spring.Services.2003.csproj 14 Sep 2007 15:11:46 -0000 1.8 --- Spring.Services.2003.csproj 4 Dec 2007 15:22:46 -0000 1.9 *************** *** 105,108 **** --- 105,113 ---- <Include> <File + RelPath = "AssemblyInfo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CommonAssemblyInfo.cs" Link = "..\CommonAssemblyInfo.cs" Index: Spring.Services.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Spring.Services.2005.csproj,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Spring.Services.2005.csproj 14 Sep 2007 15:45:50 -0000 1.21 --- Spring.Services.2005.csproj 4 Dec 2007 15:22:46 -0000 1.22 *************** *** 99,102 **** --- 99,103 ---- <SubType>Code</SubType> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="EnterpriseServices\EnterpriseServicesExporter.cs" /> <Compile Include="EnterpriseServices\ServicedComponentExporter.cs" /> Index: Spring.Services.2008.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Spring.Services.2008.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Spring.Services.2008.csproj 14 Sep 2007 16:14:17 -0000 1.1 --- Spring.Services.2008.csproj 4 Dec 2007 15:22:46 -0000 1.2 *************** *** 98,101 **** --- 98,102 ---- <SubType>Code</SubType> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="EnterpriseServices\EnterpriseServicesExporter.cs" /> <Compile Include="EnterpriseServices\ServicedComponentExporter.cs" /> |
From: Bruno B. <bb...@us...> - 2007-12-04 15:22:50
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28482/Spring.Data Modified Files: Spring.Data.2003.csproj Spring.Data.2005.csproj Log Message: AssemblyInfo back in projects. [SPRNET-584] Index: Spring.Data.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2003.csproj,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Spring.Data.2003.csproj 11 Oct 2007 16:05:50 -0000 1.24 --- Spring.Data.2003.csproj 4 Dec 2007 15:22:46 -0000 1.25 *************** *** 110,113 **** --- 110,118 ---- <Include> <File + RelPath = "AssemblyInfo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CommonAssemblyInfo.cs" Link = "..\CommonAssemblyInfo.cs" Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Spring.Data.2005.csproj 4 Dec 2007 06:53:13 -0000 1.58 --- Spring.Data.2005.csproj 4 Dec 2007 15:22:46 -0000 1.59 *************** *** 97,100 **** --- 97,101 ---- <SubType>Code</SubType> </Compile> + <Compile Include="AssemblyInfo.cs" /> <Compile Include="Dao\CannotAcquireLockException.cs" /> <Compile Include="Dao\CannotSerializeTransactionException.cs" /> |
From: Mark P. <mar...@us...> - 2007-12-04 08:38:07
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22844 Modified Files: ServiceDomainTransactionManagerTests.cs Log Message: SPRNET-773 - Unit tests for ServiceDomainTransactionManager Index: ServiceDomainTransactionManagerTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core/ServiceDomainTransactionManagerTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServiceDomainTransactionManagerTests.cs 4 Dec 2007 08:17:23 -0000 1.1 --- ServiceDomainTransactionManagerTests.cs 4 Dec 2007 08:38:04 -0000 1.2 *************** *** 50,61 **** [Test] - public void StupidTest() - { - ServiceConfig sc1 = new ServiceConfig(); - ServiceConfig sc2 = new ServiceConfig(); - Assert.AreEqual(sc1, sc2); - - } - [Test] public void TransactionCommit() { --- 50,53 ---- *************** *** 98,101 **** --- 90,139 ---- } + [Test] + public void TransactionRollback() + { + IServiceDomainAdapter txAdapter = (IServiceDomainAdapter)mocks.CreateMock(typeof(IServiceDomainAdapter)); + using (mocks.Ordered()) + { + SimpleServiceConfig serviceConfig = CreateServiceConfig(); + serviceConfig.TransactionOption = TransactionOption.Required; + serviceConfig.IsolationLevel = TransactionIsolationLevel.Any; + txAdapter.Enter(serviceConfig); + Expect.Call(txAdapter.IsInTransaction).Return(true); + txAdapter.SetAbort(); + Expect.Call(txAdapter.Leave()).Return(TransactionStatus.Commited); + + } + mocks.ReplayAll(); + + IPlatformTransactionManager tm = new ServiceDomainPlatformTransactionManager(txAdapter); + TransactionTemplate tt = new TransactionTemplate(tm); + + Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); + + Exception ex = new ArgumentException("test exception"); + try + { + tt.Execute(delegate(ITransactionStatus status) + { + Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); + Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); + Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); + if (ex != null) throw ex; + return null; + }); + Assert.Fail("Should have thrown exception"); + } + catch (ArgumentException e) + { + Assert.AreEqual(ex, e); + } + + Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); + + + mocks.VerifyAll(); + } + private SimpleServiceConfig CreateServiceConfig() { |
From: Mark P. <mar...@us...> - 2007-12-04 08:25:25
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/Template In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18095/Template Modified Files: ExampleTests.cs ExampleTests.xml Log Message: add dataset and generic stored proc example to data access quickstart Index: ExampleTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/Template/ExampleTests.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExampleTests.xml 8 Aug 2007 23:05:48 -0000 1.3 --- ExampleTests.xml 4 Dec 2007 08:25:22 -0000 1.4 *************** *** 4,9 **** <db:provider id="dbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Northwind;User ID=springqa;Password=springqa;Trusted_Connection=False"/> <object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data"> --- 4,9 ---- <db:provider id="dbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=.\SQL2005;Initial Catalog=Northwind;Persist Security Info=True;User ID=springqa;Password=springqa;Trusted_Connection=False"/> <object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data"> *************** *** 35,38 **** --- 35,42 ---- <constructor-arg index="0" ref="dbProvider"/> </object> + + <object id="customerDataSetDao" type="Spring.DataQuickStart.Dao.Template.CustomerDataSetDao, Spring.DataQuickStart"> + <property name="AdoTemplate" ref="adoTemplate"/> + </object> </objects> \ No newline at end of file Index: ExampleTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/Template/ExampleTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ExampleTests.cs 9 Aug 2007 01:52:56 -0000 1.5 --- ExampleTests.cs 4 Dec 2007 08:25:22 -0000 1.6 *************** *** 1,11 **** using System.Collections; ! using NUnit.Framework; using Spring.Context; using Spring.Context.Support; using Spring.Data.Config; using Spring.Objects.Factory.Xml; - using Spring.Data; - using Spring.Data.Config; using Spring.DataQuickStart.Dao.Template; --- 1,11 ---- using System.Collections; ! using System.Data; ! using System.Globalization; using NUnit.Framework; using Spring.Context; using Spring.Context.Support; using Spring.Data.Config; + using Spring.Data.Core; using Spring.Objects.Factory.Xml; using Spring.DataQuickStart.Dao.Template; *************** *** 18,21 **** --- 18,22 ---- { private IApplicationContext ctx; + private AdoTemplate adoTemplate; [SetUp] *************** *** 26,29 **** --- 27,31 ---- ctx = new XmlApplicationContext( "assembly://Spring.DataQuickStart.Tests/Spring.DataQuickStart.Template/ExampleTests.xml"); + adoTemplate = ctx["adoTemplate"] as AdoTemplate; } *************** *** 96,99 **** --- 98,198 ---- } + [Test] + public void DataSetDemo() + { + CustomerDataSetDao customerDataSetDao = ctx["customerDataSetDao"] as CustomerDataSetDao; + DataSet dataSet = customerDataSetDao.GetCustomers(); + Assert.AreEqual(91, dataSet.Tables["Table"].Rows.Count); + + dataSet = customerDataSetDao.GetCustomers("Customers"); + Assert.AreEqual(91, dataSet.Tables["Customers"].Rows.Count); + + dataSet = customerDataSetDao.GetCustomersLike("M%"); + Assert.AreEqual(12, dataSet.Tables["Table"].Rows.Count); + + dataSet = new DataSet(); + dataSet.Locale = CultureInfo.InvariantCulture; + + + customerDataSetDao.FillCustomers(dataSet); + Assert.AreEqual(91, dataSet.Tables["Customers"].Rows.Count); + + + AddAndEditRow(dataSet); + + + try + { + customerDataSetDao.UpdateWithCommandBuilder(dataSet); + + int count = + (int)adoTemplate.ExecuteScalar(CommandType.Text, "select count(*) from Customers where CustomerId = 'NewID'"); + Assert.AreEqual(1, count); + + count = (int)adoTemplate.ExecuteScalar(CommandType.Text, "select count(*) from Customers where CustomerId = 'ALFKI' and Phone = '030-0074322'"); + Assert.AreEqual(1, count); + + } + finally + { + //revert changes + adoTemplate.ExecuteNonQuery(CommandType.Text, "delete from Customers where CustomerId = 'NewID'"); + adoTemplate.ExecuteNonQuery(CommandType.Text, + "update Customers SET Phone='030-0074321' where CustomerId = 'ALFKI'"); + } + + + } + + private static void AddAndEditRow(DataSet dataSet) + { + DataRow dataRow = dataSet.Tables["Customers"].NewRow(); + dataRow["CustomerId"] = "NewID"; + dataRow["CompanyName"] = "New Company Name"; + dataRow["ContactName"] = "New Name"; + dataRow["ContactTitle"] = "New Contact Title"; + dataRow["Address"] = "New Address"; + dataRow["City"] = "New City"; + dataRow["Region"] = "NR"; + dataRow["PostalCode"] = "New Code"; + dataRow["Country"] = "New Country"; + dataRow["Phone"] = "New Phone"; + dataRow["Fax"] = "New Fax"; + dataSet.Tables["Customers"].Rows.Add(dataRow); + + DataRow alfkiDataRow = dataSet.Tables["Customers"].Rows[0]; + alfkiDataRow["Phone"] = "030-0074322"; // simple change, last digit changed from 1 to 2. + } + + [Test] + public void UpdateWithoutCommandBuilder() + { + CustomerDataSetDao customerDataSetDao = ctx["customerDataSetDao"] as CustomerDataSetDao; + try + { + DataSet dataSet = new DataSet(); + dataSet.Locale = CultureInfo.InvariantCulture; + customerDataSetDao.FillCustomers(dataSet); + Assert.AreEqual(91, dataSet.Tables["Customers"].Rows.Count); + + AddAndEditRow(dataSet); + + customerDataSetDao.Update(dataSet); + + int count = (int)adoTemplate.ExecuteScalar(CommandType.Text, "select count(*) from Customers where CustomerId = 'NewID'"); + Assert.AreEqual(1, count); + + count = (int)adoTemplate.ExecuteScalar(CommandType.Text, "select count(*) from Customers where CustomerId = 'ALFKI' and Phone = '030-0074322'"); + Assert.AreEqual(1, count); + + } finally + { + //revert changes + adoTemplate.ExecuteNonQuery(CommandType.Text, "delete from Customers where CustomerId = 'NewID'"); + adoTemplate.ExecuteNonQuery(CommandType.Text, + "update Customers SET Phone='030-0074321' where CustomerId = 'ALFKI'"); + } + } + private static void AssertsOnCustomerList(IList customerList) { |
From: Mark P. <mar...@us...> - 2007-12-04 08:25:25
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/GenericTemplate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18095/GenericTemplate Modified Files: ExampleTests.cs ExampleTests.xml Log Message: add dataset and generic stored proc example to data access quickstart Index: ExampleTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/GenericTemplate/ExampleTests.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExampleTests.xml 7 Aug 2007 19:50:02 -0000 1.3 --- ExampleTests.xml 4 Dec 2007 08:25:22 -0000 1.4 *************** *** 4,9 **** <db:provider id="dbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Northwind;User ID=springqa;Password=springqa;Trusted_Connection=False"/> <object id="adoTemplate" type="Spring.Data.Generic.AdoTemplate, Spring.Data"> --- 4,9 ---- <db:provider id="dbProvider" ! provider="SqlServer-2.0" ! connectionString="Data Source=.\SQL2005;Initial Catalog=Northwind;Persist Security Info=True;User ID=springqa;Password=springqa"/> <object id="adoTemplate" type="Spring.Data.Generic.AdoTemplate, Spring.Data"> *************** *** 33,35 **** --- 33,38 ---- + <object id="custOrdersDetailStoredProc" type="Spring.DataQuickStart.Dao.GenericTemplate.CustOrdersDetailStoredProc, Spring.DataQuickStart"> + <constructor-arg index="0" ref="dbProvider"/> + </object> </objects> \ No newline at end of file Index: ExampleTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/test/Spring/Spring.DataQuickStart.Tests/DataQuickStart/GenericTemplate/ExampleTests.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ExampleTests.cs 9 Aug 2007 01:52:56 -0000 1.7 --- ExampleTests.cs 4 Dec 2007 08:25:22 -0000 1.8 *************** *** 6,11 **** using Spring.Data.Config; using Spring.Objects.Factory.Xml; - using Spring.Data; - using Spring.Data.Config; using Spring.DataQuickStart.Dao.GenericTemplate; --- 6,9 ---- *************** *** 96,99 **** --- 94,105 ---- } + [Test] + public void QueryForDetailsUsingStoredProcObject() + { + CustOrdersDetailStoredProc storedProc = ctx["custOrdersDetailStoredProc"] as CustOrdersDetailStoredProc; + List<OrderDetails> details = storedProc.GetOrderDetails(10278); + Assert.AreEqual(4, details.Count); + } + private static void AssertsOnCustomerList(IList<Customer> customerList) { |
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/src/Spring/Spring.DataQuickStart/DataQuickStart/Dao/GenericTemplate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18067/DataQuickStart/Dao/GenericTemplate Added Files: CustOrdersDetailStoredProc.cs OrderDetailRowMapper.cs Log Message: add dataset and generic stored proc example to data access quickstart --- NEW FILE: OrderDetailRowMapper.cs --- #region Licence /* * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion using System.Data; using System.Data.SqlClient; using Spring.Data.Generic; using Spring.DataQuickStart.Domain; namespace Spring.DataQuickStart.Dao.GenericTemplate { public class OrderDetailRowMapper<T> : IRowMapper<T> where T : OrderDetails, new() { /// <summary> /// Map a row of data to a OrderDetails object. /// </summary> /// <remarks>This method should not call Next() on the /// DataReader; it should only extract the values of the current row. /// </remarks> /// <param name="dataReader">The IDataReader to map</param> /// <param name="rowNum">the number of the current row.</param> /// <returns>A Customer object.</returns> public T MapRow(IDataReader dataReader, int rowNum) { SqlDataReader dr = dataReader as SqlDataReader; T ods = new T(); ods.ProductName = dr.GetString(0); ods.UnitPrice = dr.GetSqlMoney(1).ToDouble(); ods.Quantity = dr.GetInt16(2); ods.Discount = dr.GetInt32(3); ods.ExtendedPrice = dr.GetSqlMoney(4).ToDouble(); return ods; } } } --- NEW FILE: CustOrdersDetailStoredProc.cs --- using System.Collections; using System.Collections.Generic; using Spring.Data.Common; using Spring.Data.Objects.Generic; using Spring.DataQuickStart.Domain; namespace Spring.DataQuickStart.Dao.GenericTemplate { public class CustOrdersDetailStoredProc : StoredProcedure { private static string procedureName = "CustOrdersDetail"; public CustOrdersDetailStoredProc(IDbProvider dbProvider) : base(dbProvider, procedureName) { DeriveParameters(); AddRowMapper("orderDetailRowMapper", new OrderDetailRowMapper<OrderDetails>() ); Compile(); } public virtual List<OrderDetails> GetOrderDetails(int orderid) { IDictionary outParams = Query<OrderDetails>(orderid); return outParams["orderDetailRowMapper"] as List<OrderDetails>; } } } |
From: Mark P. <mar...@us...> - 2007-12-04 08:25:19
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/src/Spring/Spring.DataQuickStart/DataQuickStart/Dao/Template In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18067/DataQuickStart/Dao/Template Added Files: CustomerDataSetDao.cs Log Message: add dataset and generic stored proc example to data access quickstart --- NEW FILE: CustomerDataSetDao.cs --- using System; using System.Data; using Spring.Data.Common; using Spring.Data.Core; namespace Spring.DataQuickStart.Dao.Template { public class CustomerDataSetDao : AdoDaoSupport { private string selectAll = @"select Address, City, CompanyName, ContactName, " + "ContactTitle, Country, Fax, CustomerID, Phone, PostalCode, " + "Region from Customers"; private string selectLike = @"select Address, City, CompanyName, ContactName, " + "ContactTitle, Country, Fax, CustomerID, Phone, PostalCode, " + "Region from Customers where ContactName like @ContactName"; public DataSet GetCustomers() { return AdoTemplate.DataSetCreate(CommandType.Text, selectAll); } public DataSet GetCustomers(string dataSetName) { return AdoTemplate.DataSetCreate(CommandType.Text, selectAll, new string[] { dataSetName }); } public DataSet GetCustomersLike(string contactName) { IDbParameters dbParameters = CreateDbParameters(); dbParameters.Add("ContactName", DbType.String).Value = contactName; return AdoTemplate.DataSetCreateWithParams(CommandType.Text, selectLike, dbParameters); } public void FillCustomers(DataSet dataSet) { AdoTemplate.DataSetFill(dataSet, CommandType.Text, selectAll, new string[] { "Customers"} ); } public void UpdateWithCommandBuilder(DataSet dataSet) { AdoTemplate.DataSetUpdateWithCommandBuilder(dataSet, CommandType.Text, selectAll, null, "Customers"); } public void Update(DataSet dataSet) { string insertSql = @"INSERT Customers (CustomerID, CompanyName) VALUES (@CustomerId, @CompanyName)"; IDbParameters insertParams = CreateDbParameters(); insertParams.Add("CustomerId", DbType.String, 0, "CustomerId"); //.Value = "NewID"; insertParams.Add("CompanyName", DbType.String, 0, "CompanyName"); //.Value = "New Company Name"; string updateSql = @"update Customers SET Phone=@Phone where CustomerId = @CustomerId"; IDbParameters updateParams = CreateDbParameters(); updateParams.Add("Phone", DbType.String, 0, "Phone");//.Value = "030-0074322"; // simple change, last digit changed from 1 to 2. updateParams.Add("CustomerId", DbType.String, 0, "CustomerId");//.Value = "ALFKI"; AdoTemplate.DataSetUpdate(dataSet, "Customers", CommandType.Text, insertSql, insertParams, CommandType.Text, updateSql, updateParams, CommandType.Text, null , null); } } } |
From: Mark P. <mar...@us...> - 2007-12-04 08:25:19
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/src/Spring/Spring.DataQuickStart In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18067 Modified Files: Spring.DataQuickStart.2005.csproj Log Message: add dataset and generic stored proc example to data access quickstart Index: Spring.DataQuickStart.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.DataQuickStart/src/Spring/Spring.DataQuickStart/Spring.DataQuickStart.2005.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Spring.DataQuickStart.2005.csproj 18 Jun 2007 20:24:00 -0000 1.5 --- Spring.DataQuickStart.2005.csproj 4 Dec 2007 08:25:16 -0000 1.6 *************** *** 49,52 **** --- 49,54 ---- <ItemGroup> <Compile Include="DataQuickStart\Dao\GenericTemplate\CommandCallbackDao.cs" /> + <Compile Include="DataQuickStart\Dao\GenericTemplate\CustOrdersDetailStoredProc.cs" /> + <Compile Include="DataQuickStart\Dao\GenericTemplate\OrderDetailRowMapper.cs" /> <Compile Include="DataQuickStart\Dao\Template\OrderDetailRowMapper.cs" /> <Compile Include="DataQuickStart\Dao\Template\CustOrdersDetailStoredProc.cs" /> *************** *** 55,58 **** --- 57,61 ---- <Compile Include="DataQuickStart\Dao\Template\CommandCallbackDao.cs" /> <Compile Include="DataQuickStart\Dao\Template\CustomerRowMapper.cs" /> + <Compile Include="DataQuickStart\Dao\Template\CustomerDataSetDao.cs" /> <Compile Include="DataQuickStart\Dao\Template\QueryForObjectDao.cs" /> <Compile Include="DataQuickStart\Dao\Template\ResultSetExtractorDao.cs" /> |