diff --git a/build-support/solutions/Spring.Net.Messaging.Ems.2008.sln b/build-support/solutions/Spring.Net.Messaging.Ems.2008.sln
index 035369fe..b703d098 100644
--- a/build-support/solutions/Spring.Net.Messaging.Ems.2008.sln
+++ b/build-support/solutions/Spring.Net.Messaging.Ems.2008.sln
@@ -17,7 +17,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.Tests.2008", ".
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Ems.2008", "..\..\src\Spring\Spring.Messaging.Ems\Spring.Messaging.Ems.2008.csproj", "{900E3839-301E-48B1-BAEB-B6645620ACFF}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Ems.Tests.2008", "..\..\test\Spring\Spring.Messaging.Ems.Tests\Spring.Messaging.Ems.Tests.2008.csproj", "{94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Ems.Tests.2008", "..\..\test\Spring\Spring.Messaging.Ems.Tests\Spring.Messaging.Ems.Tests.2008.csproj", "{66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Testing.NUnit.2008", "..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj", "{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}"
EndProject
@@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.2008",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.Tests.2008", "..\..\test\Spring\Spring.Messaging.Nms.Tests\Spring.Messaging.Nms.Tests.2008.csproj", "{FA7A6931-7DBE-4A32-A312-51FAD2E80332}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Ems.Integration.Tests", "..\..\test\Spring\Spring.Messaging.Ems.Integration.Tests\Spring.Messaging.Ems.Integration.Tests.csproj", "{FA934E92-C8C2-428A-BE2A-26818F17A787}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -101,16 +103,16 @@ Global
{900E3839-301E-48B1-BAEB-B6645620ACFF}.Release|Any CPU.Build.0 = Release|Any CPU
{900E3839-301E-48B1-BAEB-B6645620ACFF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{900E3839-301E-48B1-BAEB-B6645620ACFF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Release|.NET.ActiveCfg = Release|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Release|Any CPU.Build.0 = Release|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Release|.NET.ActiveCfg = Release|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|.NET.ActiveCfg = Debug|Any CPU
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -141,6 +143,16 @@ Global
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Any CPU.Build.0 = Release|Any CPU
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|.NET.ActiveCfg = Release|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln b/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln
index a16a4634..6ad03937 100644
--- a/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln
+++ b/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln
@@ -5,30 +5,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.2008", "..\..\s
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.Tests.2008", "..\..\test\Spring\Spring.Core.Tests\Spring.Core.Tests.2008.csproj", "{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Web.2008", "..\..\src\Spring\Spring.Web\Spring.Web.2008.csproj", "{BA4789EB-281A-48EA-8763-28B9F0596A18}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Web.Tests.2008", "..\..\test\Spring\Spring.Web.Tests\Spring.Web.Tests.2008.csproj", "{C67E47AA-1ACD-41B4-A465-4D336A2319CA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Web.Extensions.2008", "..\..\src\Spring\Spring.Web.Extensions\Spring.Web.Extensions.2008.csproj", "{E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aop.2008", "..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj", "{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aop.Tests.2008", "..\..\test\Spring\Spring.Aop.Tests\Spring.Aop.Tests.2008.csproj", "{2111596A-0327-4C9D-8919-294FBD988A23}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Services.2008", "..\..\src\Spring\Spring.Services\Spring.Services.2008.csproj", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Services.Tests.2008", "..\..\test\Spring\Spring.Services.Tests\Spring.Services.Tests.2008.csproj", "{4374F018-9738-46BF-A399-4594CEE75B21}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.2008", "..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj", "{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.Tests.2008", "..\..\test\Spring\Spring.Data.Tests\Spring.Data.Tests.2008.csproj", "{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.2008", "..\..\src\Spring\Spring.Template.Velocity\Spring.Template.Velocity.2008.csproj", "{BF3AB954-8375-407C-9E98-4C51D8072784}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.2008", "..\..\src\Spring\Spring.Messaging.Nms\Spring.Messaging.Nms.2008.csproj", "{AEB1578C-9018-4D49-B440-789F38DD2F29}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.Tests.2008", "..\..\test\Spring\Spring.Messaging.Nms.Tests\Spring.Messaging.Nms.Tests.2008.csproj", "{FA7A6931-7DBE-4A32-A312-51FAD2E80332}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Testing.NUnit.2008", "..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj", "{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.Integration.Tests", "..\..\test\Spring\Spring.Messaging.Nms.Integration.Tests\Spring.Messaging.Nms.Integration.Tests.csproj", "{E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -59,36 +51,6 @@ Global
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Any CPU.Build.0 = Release|Any CPU
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|.NET.ActiveCfg = Release|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Any CPU.Build.0 = Release|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Release|.NET.ActiveCfg = Release|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Release|Any CPU.Build.0 = Release|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {C67E47AA-1ACD-41B4-A465-4D336A2319CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Release|.NET.ActiveCfg = Release|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Release|Any CPU.Build.0 = Release|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {E5E287D2-EE2C-4C99-87CA-EB27B35ABF7B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|.NET.ActiveCfg = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -109,26 +71,6 @@ Global
{2111596A-0327-4C9D-8919-294FBD988A23}.Release|Any CPU.Build.0 = Release|Any CPU
{2111596A-0327-4C9D-8919-294FBD988A23}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2111596A-0327-4C9D-8919-294FBD988A23}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|.NET.ActiveCfg = Release|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.Build.0 = Release|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Release|.NET.ActiveCfg = Release|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Release|Any CPU.Build.0 = Release|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {4374F018-9738-46BF-A399-4594CEE75B21}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|.NET.ActiveCfg = Debug|Any CPU
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -149,16 +91,6 @@ Global
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Any CPU.Build.0 = Release|Any CPU
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|.NET.ActiveCfg = Release|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Any CPU.Build.0 = Release|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|.NET.ActiveCfg = Debug|Any CPU
{AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -179,6 +111,26 @@ Global
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Any CPU.Build.0 = Release|Any CPU
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|.NET.ActiveCfg = Release|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Release|.NET.ActiveCfg = Release|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build-support/solutions/Spring.Net.NHibernate21.2008.sln b/build-support/solutions/Spring.Net.NHibernate21.2008.sln
index 5617dace..bfbe0386 100644
--- a/build-support/solutions/Spring.Net.NHibernate21.2008.sln
+++ b/build-support/solutions/Spring.Net.NHibernate21.2008.sln
@@ -28,6 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aop.Tests.2008", "..
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Testing.NUnit.2008", "..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj", "{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.Integration.Tests.2008", "..\..\test\Spring\Spring.Data.Integration.Tests\Spring.Data.Integration.Tests.2008.csproj", "{91766D21-C568-459F-9BEA-759B011F23CF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -148,6 +150,16 @@ Global
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Any CPU.Build.0 = Release|Any CPU
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Release|.NET.ActiveCfg = Release|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {91766D21-C568-459F-9BEA-759B011F23CF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs
index b38602b6..c7114287 100644
--- a/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs
+++ b/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs
@@ -85,8 +85,8 @@ namespace Spring.Objects.Factory {
string.Format (
"Object named '{0}' must be of type [{1}], but was actually of type [{2}]",
name,
- requiredType.Name,
- actualInstance.GetType ().Name)) {
+ requiredType.FullName,
+ actualInstance.GetType ().FullName)) {
this.name = name;
this.actualInstance = actualInstance;
this.requiredType = requiredType;
diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
index b7912c4b..43546f74 100644
--- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
+++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
@@ -2051,9 +2051,9 @@ namespace Spring.Objects.Factory.Support
/// if is null or not assignable to .
///
private object EnsureObjectIsOfRequiredType(string name, object instance, Type requiredType)
- {
+ {
// check that any required type matches the type of the actual object instance...
- if (requiredType != null && !requiredType.IsAssignableFrom(instance.GetType()))
+ if (requiredType != null && instance!= null && !requiredType.IsAssignableFrom(instance.GetType()))
{
throw new ObjectNotOfRequiredTypeException(name, requiredType, instance);
}
diff --git a/src/Spring/Spring.Core/Spring.Core.2003.csproj b/src/Spring/Spring.Core/Spring.Core.2003.csproj
index 439f1b91..e232feee 100644
--- a/src/Spring/Spring.Core/Spring.Core.2003.csproj
+++ b/src/Spring/Spring.Core/Spring.Core.2003.csproj
@@ -857,16 +857,6 @@
SubType = "Code"
BuildAction = "Compile"
/>
-
-
+
+
-
+
+
private object connectionMonitor = new object();
+ private bool sslProxyHostSet;
+ private bool sslProxyPortSet;
+ private bool sslProxyAuthPasswordSet;
+ private bool sslProxyAuthUsernameSet;
+
#endregion
#region Constructors
@@ -350,25 +355,44 @@ namespace Spring.Messaging.Ems.Connections
public string SSLProxyHost
{
- get { return TargetConnectionFactory.SSLProxyHost; }
- set { TargetConnectionFactory.SSLProxyHost = value; }
+ get
+ {
+ return TargetConnectionFactory.SSLProxyHost;
+ }
+ set
+ {
+ TargetConnectionFactory.SSLProxyHost = value;
+ sslProxyHostSet = true;
+ }
}
public int SSLProxyPort
{
get { return TargetConnectionFactory.SSLProxyPort;}
- set { TargetConnectionFactory.SSLProxyPort = value; }
+ set
+ {
+ TargetConnectionFactory.SSLProxyPort = value;
+ sslProxyPortSet = true;
+ }
}
public string SSLProxyAuthUsername
{
- set { TargetConnectionFactory.SSLProxyAuthUsername = value; }
+ set
+ {
+ TargetConnectionFactory.SSLProxyAuthUsername = value;
+ sslProxyAuthUsernameSet = true;
+ }
get { return TargetConnectionFactory.SSLProxyAuthUsername; }
}
public string SSLProxyAuthPassword
{
- set { TargetConnectionFactory.SSLProxyAuthPassword = value; }
+ set
+ {
+ TargetConnectionFactory.SSLProxyAuthPassword = value;
+ sslProxyAuthPasswordSet = true;
+ }
get { return TargetConnectionFactory.SSLProxyAuthPassword; }
}
@@ -543,10 +567,16 @@ namespace Spring.Messaging.Ems.Connections
{
throw new ArgumentException("Connection or 'TargetConnectionFactory' is required.");
}
- // Note this is repeated in EmsConnectionFactory as this class only referes to IConnectionFactory and
+ // Note this is repeated in EmsConnectionFactory as this class only refers to IConnectionFactory and
// IConnectionFactory does not implement the spring specific lifecycle interface IInitializingObject
- TargetConnectionFactory.NativeConnectionFactory.SetSSLProxyAuth(SSLProxyAuthUsername, SSLProxyAuthPassword);
- TargetConnectionFactory.NativeConnectionFactory.SetSSLProxy(SSLProxyHost, SSLProxyPort);
+ if (sslProxyAuthUsernameSet || sslProxyAuthPasswordSet)
+ {
+ TargetConnectionFactory.NativeConnectionFactory.SetSSLProxyAuth(SSLProxyAuthUsername, SSLProxyAuthPassword);
+ }
+ if (sslProxyHostSet || sslProxyPortSet)
+ {
+ TargetConnectionFactory.NativeConnectionFactory.SetSSLProxy(SSLProxyHost, SSLProxyPort);
+ }
}
#endregion
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs
index 597b3343..3fd4097b 100644
--- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs
@@ -19,7 +19,6 @@
#endregion
using System;
-using System.Collections;
using Common.Logging;
using Spring.Messaging.Ems.Common;
using Spring.Messaging.Ems.Connections;
@@ -88,15 +87,7 @@ namespace Spring.Messaging.Ems.Core
private int deliveryMode = Message.DEFAULT_DELIVERY_MODE;
private long timeToLive = Message.DEFAULT_TIME_TO_LIVE;
-
- //TODO make optimizations later based on TIBCO EMS having thread safe sessions
- /*
- private EmsResources emsResources = new EmsResources();
-
- private bool cacheEmsResources = true;
- */
-
-
+
#endregion
#region Constructor (s)
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs
new file mode 100644
index 00000000..0d5d9006
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs
@@ -0,0 +1,105 @@
+#region License
+
+/*
+ * Copyright 2002-2009 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.Collections;
+using Common.Logging;
+using Spring.Objects.Factory;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ ///
+ /// Convenient superclass to access JndiProperties, JndiContextType or alternatively set the ILookupContext directly.
+ ///
+ /// Juergen Hoeller
+ /// Mark Pollack
+ public class JndiAccessor : IInitializingObject
+ {
+ private ILookupContext _jndiLookupContext;
+
+ private Hashtable jndiProperties = new Hashtable();
+
+ private JndiContextType contextType = JndiContextType.JMS;
+
+ protected ILog logger;
+
+ LookupContextFactory contextFactoryObject = new LookupContextFactory();
+
+ ///
+ /// Gets or sets the lookup context.
+ ///
+ /// The lookup context.
+ public ILookupContext JndiLookupContext
+ {
+ get { return _jndiLookupContext; }
+ set { _jndiLookupContext = value; }
+ }
+
+ ///
+ /// Gets or sets the JNDI environment properties.
+ ///
+ /// The jndi properties.
+ public IDictionary JndiProperties
+ {
+ get
+ {
+ return jndiProperties;
+ }
+ set
+ {
+ jndiProperties = new Hashtable(value);
+ }
+ }
+
+ ///
+ /// Gets or sets the type of the jndi context. The default is JndiContextType.JMS
+ ///
+ /// The type of the jndi context.
+ public JndiContextType JndiContextType
+ {
+ get { return this.contextType; }
+ set
+ {
+ this.contextType = value;
+ }
+ }
+
+
+ ///
+ /// Create the JndiLookupContext if it has not been explicitly set.
+ ///
+ public virtual void AfterPropertiesSet()
+ {
+ if (_jndiLookupContext == null)
+ {
+ if (JndiContextType == JndiContextType.JMS)
+ {
+ this._jndiLookupContext = contextFactoryObject.CreateContext(LookupContextFactory.TIBJMS_NAMING_CONTEXT,
+ jndiProperties);
+ }
+ else
+ {
+ this._jndiLookupContext = contextFactoryObject.CreateContext(LookupContextFactory.LDAP_CONTEXT,
+ jndiProperties);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiContextType.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiContextType.cs
new file mode 100644
index 00000000..a56cffc0
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiContextType.cs
@@ -0,0 +1,19 @@
+namespace Spring.Messaging.Ems.Jndi
+{
+
+ ///
+ /// The various JNDI Context types.
+ ///
+ public enum JndiContextType
+ {
+ ///
+ /// Create a tibjmsnaming context to lookup administered object inside the tibjmsnaming server.
+ ///
+ JMS,
+
+ ///
+ /// Create a ldap context to lookup administered object in an ldap server.
+ ///
+ LDAP
+ } ;
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs
new file mode 100644
index 00000000..adb60473
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs
@@ -0,0 +1,64 @@
+#region License
+
+/*
+ * Copyright 2002-2009 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;
+using Spring.Objects.Factory;
+using Spring.Util;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ public abstract class JndiLocatorSupport : JndiAccessor
+ {
+
+
+ protected virtual object Lookup(string jndiName)
+ {
+ object jndiObject = Lookup(jndiName, null);
+ if (logger.IsDebugEnabled)
+ {
+ logger.Debug("Located object with JNDI name [" + jndiName + "]");
+ }
+ return jndiObject;
+ }
+
+ protected virtual object Lookup(string jndiName, Type requiredType)
+ {
+ AssertUtils.ArgumentNotNull(jndiName, "jndiName");
+
+ object jndiObject = JndiLookupContext.Lookup(jndiName);
+
+
+ if (requiredType != null && !ObjectUtils.IsAssignable(requiredType, jndiObject))
+ {
+ throw new TypeMismatchNamingException(
+ jndiName, requiredType, (jndiObject != null ? jndiObject.GetType() : null));
+ }
+
+ if (logger.IsDebugEnabled)
+ {
+ logger.Debug("Located object with JNDI name [" + jndiName + "]");
+ }
+ return jndiObject;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs
new file mode 100644
index 00000000..1c1f9b1c
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs
@@ -0,0 +1,147 @@
+#region License
+
+/*
+ * Copyright 2002-2009 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;
+using Spring.Core.TypeResolution;
+using Spring.Objects.Factory;
+using Spring.Util;
+using TIBCO.EMS;
+using Common.Logging;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ public class JndiLookupFactoryObject : JndiObjectLocator, IFactoryObject
+ {
+ static JndiLookupFactoryObject()
+ {
+ TypeRegistry.RegisterType("LookupContext", typeof(LookupContext));
+ TypeRegistry.RegisterType("JndiContextType", typeof(JndiContextType));
+ }
+
+ private object defaultObject;
+ private Object jndiObject;
+
+ public JndiLookupFactoryObject()
+ {
+ this.logger = LogManager.GetLogger(GetType());
+ }
+
+ ///
+ /// Sets the default object to fall back to if the JNDI lookup fails.
+ /// Default is none.
+ ///
+ ///
+ /// This can be an arbitrary bean reference or literal value.
+ /// It is typically used for literal values in scenarios where the JNDI environment
+ /// might define specific config settings but those are not required to be present.
+ ///
+ ///
+ /// The default object to use when lookup fails.
+ public object DefaultObject
+ {
+ set { defaultObject = value; }
+ }
+
+ #region Implementation of IFactoryObject
+
+ ///
+ /// Return the Jndi object
+ ///
+ /// The Jndi object
+ public object GetObject()
+ {
+ return this.jndiObject;
+ }
+
+
+ ///
+ /// Return type of object retrieved from Jndi or the expected type if the Jndi retrieval
+ /// did not succeed.
+ ///
+ /// Return value of retrieved object
+ public Type ObjectType
+ {
+ get
+ {
+ if (this.jndiObject != null)
+ {
+ return this.jndiObject.GetType();
+ }
+ return ExpectedType;
+ }
+ }
+
+
+ ///
+ /// Returns true
+ ///
+ public bool IsSingleton
+ {
+ get { return true; }
+ }
+
+ #endregion
+
+ public override void AfterPropertiesSet()
+ {
+ base.AfterPropertiesSet();
+ TypeRegistry.RegisterType("LookupContext", typeof(LookupContext));
+ if (this.defaultObject != null && ExpectedType != null &&
+ !ObjectUtils.IsAssignable(ExpectedType, this.defaultObject))
+ {
+ throw new ArgumentException("Default object [" + this.defaultObject +
+ "] of type [" + this.defaultObject.GetType().Name +
+ "] is not of expected type [" + ExpectedType.Name + "]");
+ }
+ // Locate specified JNDI object.
+ this.jndiObject = LookupWithFallback();
+ }
+
+ protected virtual object LookupWithFallback()
+ {
+ try
+ {
+ return Lookup();
+ }
+ catch (TypeMismatchNamingException)
+ {
+ // Always let TypeMismatchNamingException through -
+ // we don't want to fall back to the defaultObject in this case.
+ throw;
+ }
+ catch (NamingException ex)
+ {
+ if (this.defaultObject != null)
+ {
+ if (logger.IsDebugEnabled)
+ {
+ logger.Debug("JNDI lookup failed - returning specified default object instead", ex);
+ }
+ else if (logger.IsInfoEnabled)
+ {
+ logger.Info("JNDI lookup failed - returning specified default object instead: " + ex);
+ }
+ return this.defaultObject;
+ }
+ throw;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs
new file mode 100644
index 00000000..debc5e90
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs
@@ -0,0 +1,94 @@
+#region License
+
+/*
+ * Copyright 2002-2009 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;
+using Spring.Objects.Factory;
+using Spring.Util;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ ///
+ /// Convenient superclass for JNDI-based service locators,
+ /// providing configurable lookup of a specific JNDI resource.
+ ///
+ ///
+ ///
+ /// Exposes a JndiName property.
+ ///
+ /// Subclasses may invoke the Lookup method whenever it is appropriate.
+ /// Some classes might do this on initialization, while others might do it
+ /// on demand. The latter strategy is more flexible in that it allows for
+ /// initialization of the locator before the JNDI object is available.
+ ///
+ ///
+ /// Juergen Hoeller
+ /// Mark Pollack (.NET)
+ public abstract class JndiObjectLocator : JndiLocatorSupport, IInitializingObject
+ {
+ private string jndiName;
+
+ private Type expectedType;
+
+ ///
+ /// Gets or sets the Jndi name to lookup.
+ ///
+ /// The name of the jndi.
+ public string JndiName
+ {
+ get { return jndiName; }
+ set { jndiName = value; }
+ }
+
+ ///
+ /// Gets or sets the type that the located JNDI object is supposed
+ /// to be assignable to, if any.
+ ///
+ /// The expected type.
+ public Type ExpectedType
+ {
+ get { return expectedType; }
+ set { expectedType = value; }
+ }
+
+ #region Implementation of IInitializingObject
+
+ ///
+ /// Ensure that the JndiName property is set and create the TIBCO EMS ILookupContext instance.
+ ///
+ public override void AfterPropertiesSet()
+ {
+ base.AfterPropertiesSet();
+ if (!StringUtils.HasLength(JndiName))
+ {
+ throw new ArgumentException("Property 'JndiName' is required");
+ }
+ }
+
+ ///
+ /// Lookups this instance using the JndiName and ExpectedType properties
+ ///
+ /// The object retrieved from Jndi
+ protected virtual object Lookup() {
+ return Lookup(JndiName, ExpectedType);
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs
new file mode 100644
index 00000000..7791c067
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs
@@ -0,0 +1,73 @@
+#region License
+
+/*
+ * Copyright 2002-2009 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;
+using Spring.Objects.Factory;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ ///
+ /// A Spring FactoryObject that returns TIBCO.EMS.ILookupContext. Use the returned
+ /// ILookupContext to do you lookups at runtime.
+ ///
+ ///
+ ///
+ /// Important properties to set are JndiProperties and JndiContexType. JndiContextType is set to
+ /// LookupContextFactory.TIBJMS_NAMING_CONT by default.
+ ///
+ /// To lookup objects at startup time and cache their values, as well as provide a
+ /// default value if lookup fail,
+ ///
+ ///
+ /// Mark Pollack
+ public class LookupContextFactoryObject : JndiLocatorSupport, IFactoryObject
+ {
+ #region Implementation of IFactoryObject
+
+ ///
+ /// Returns the TIBCO.EMS.ILookupContext
+ ///
+ /// TIBCO.EMS.ILookupContext
+ public object GetObject()
+ {
+ return this.JndiLookupContext;
+ }
+
+ ///
+ /// Return typeof(TIBCO.EMS.ILookupContext)
+ ///
+ public Type ObjectType
+ {
+ get { return typeof (ILookupContext); }
+ }
+
+ ///
+ /// Returns true
+ ///
+ public bool IsSingleton
+ {
+ get { return true; }
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs
new file mode 100644
index 00000000..90d25f0a
--- /dev/null
+++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs
@@ -0,0 +1,94 @@
+#region License
+
+/*
+ * Copyright © 2002-2005 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
+
+#region Imports
+
+using System;
+using System.Globalization;
+using System.Runtime.Serialization;
+using System.Security.Permissions;
+using System.Text;
+using Spring.Core;
+using Spring.Util;
+using TIBCO.EMS;
+
+#endregion
+
+namespace Spring.Objects.Factory
+{
+ ///
+ /// Exception thrown if a type mismatch is encountered for an object
+ /// located in a JNDI environment.
+ ///
+ /// Juergen Hoeller
+ /// Mark Pollack (.NET)
+ [Serializable]
+ public class TypeMismatchNamingException : NamingException
+ {
+ private Type requiredType;
+
+ private Type actualType;
+
+ ///
+ /// Creates a new instance of the
+ /// class.
+ ///
+ ///
+ /// A message about the exception.
+ ///
+ public TypeMismatchNamingException(string message)
+ : base(message)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// building an explanation text from the given arguments.
+ ///
+ /// The Jndi name.
+ /// Type required type of the lookup.
+ /// The actual type that the lookup returned.
+ public TypeMismatchNamingException(String jndiName, Type requiredType, Type actualType) :
+ base("Object of type [" + actualType + "] available at JNDI location [" +
+ jndiName + "] is not assignable to [" + requiredType.Name + "]")
+ {
+ this.requiredType = requiredType;
+ this.actualType = actualType;
+ }
+
+ ///
+ /// Gets the actual type that the lookup returned, if available.
+ ///
+ /// The actual type that the lookup.
+ public Type ActualType
+ {
+ get { return actualType; }
+ }
+
+ ///
+ /// Gets the required type for the lookup, if available.
+ ///
+ /// The equired type for the lookup
+ public Type RequiredType
+ {
+ get { return requiredType; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.2008.csproj b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.2008.csproj
index 02bc5da5..f3c28904 100644
--- a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.2008.csproj
+++ b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.2008.csproj
@@ -2,7 +2,7 @@
Debug
AnyCPU
- 9.0.21022
+ 9.0.30729
2.0
{900E3839-301E-48B1-BAEB-B6645620ACFF}
Library
@@ -92,6 +92,13 @@
+
+
+
+
+
+
+
diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs
index e32e7e29..627401a5 100644
--- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs
+++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs
@@ -19,6 +19,7 @@
#endregion
using System;
+using System.Runtime.Serialization;
using Apache.NMS;
namespace Spring.Messaging.Nms.Listener
@@ -27,9 +28,17 @@ namespace Spring.Messaging.Nms.Listener
/// Exception thrown when the maximum connection recovery time has been exceeded.
///
/// Mark Pollack
+ [Serializable]
public class RecoveryTimeExceededException : NMSException
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RecoveryTimeExceededException(): base()
+ {
+ }
+
///
/// Initializes a new instance of the class, with the specified message
///
@@ -49,5 +58,8 @@ namespace Spring.Messaging.Nms.Listener
: base(message, innerException)
{
}
+
+ /* Note, can not add this exception since the signature is not present in the base class.
+ protected RecoveryTimeExceededException(SerializationInfo info, StreamingContext context ) : base( info, context ) {} */
}
}
\ No newline at end of file
diff --git a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2003.csproj b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2003.csproj
index 0e231691..54f6a85c 100644
--- a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2003.csproj
+++ b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2003.csproj
@@ -114,6 +114,11 @@
AssemblyName = "Common.Logging"
HintPath = "..\..\..\lib\Net\1.1\Common.Logging.dll"
/>
+
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/AssemblyInfo.cs b/test/Spring/Spring.Messaging.Ems.Integration.Tests/AssemblyInfo.cs
new file mode 100644
index 00000000..9cead49a
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/AssemblyInfo.cs
@@ -0,0 +1,5 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("Spring.Messaging.Ems Integration Tests")]
+[assembly: AssemblyDescription("Integration tests for Spring.Messaging.Ems assembly")]
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.cs b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.cs
new file mode 100644
index 00000000..98a1c6d8
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.cs
@@ -0,0 +1,87 @@
+#region License
+
+/*
+ * Copyright © 2002-2009 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
+
+
+#region Imports
+
+using System;
+using System.Collections;
+using NUnit.Framework;
+using Spring.Context;
+using Spring.Context.Support;
+using Spring.Core.TypeResolution;
+using Spring.Expressions;
+using Spring.Messaging.Ems.Common;
+using Spring.Messaging.Ems.Jndi;
+using Spring.Messaging.Ems.Listener;
+using Spring.Objects.Factory.Xml;
+using Spring.Testing.NUnit;
+using TIBCO.EMS;
+
+#endregion
+
+namespace Spring.Messaging.Ems.Core
+{
+ [TestFixture]
+ public class EmsTemplateTests : AbstractDependencyInjectionSpringContextTests
+ {
+ protected IConnectionFactory emsConnectionFactory;
+
+ protected IConnectionFactory connectionFactory;
+
+ //This is the 'raw' TIBCO type
+ protected ConnectionFactory jndiEmsConnectionFactory;
+
+ protected IConnectionFactory cachingJndiConnectionFactory;
+
+ ///
+ /// Default constructor for EmsTemplateTests.
+ ///
+ public EmsTemplateTests()
+ {
+ this.PopulateProtectedVariables = true;
+ }
+
+
+
+ [Test]
+ public void SendAndReceive()
+ {
+ Assert.NotNull(emsConnectionFactory);
+ Assert.NotNull(connectionFactory);
+ Assert.NotNull(jndiEmsConnectionFactory);
+ Assert.NotNull(cachingJndiConnectionFactory);
+ }
+
+ #region Overrides of AbstractDependencyInjectionSpringContextTests
+
+ ///
+ /// Subclasses must implement this property to return the locations of their
+ /// config files. A plain path will be treated as a file system location.
+ ///
+ /// An array of config locations
+ protected override string[] ConfigLocations
+ {
+ get { return new string[] { "assembly://Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Core/EmsTemplateTests.xml" }; }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.xml b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.xml
new file mode 100644
index 00000000..e1c45688
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/EmsTemplateTests.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleGateway.cs b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleGateway.cs
new file mode 100644
index 00000000..9827ea24
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleGateway.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections;
+using Spring.Messaging.Ems.Common;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Core
+{
+ public class SimpleGateway : EmsGatewaySupport
+ {
+ public void Publish(string ticker, double price)
+ {
+ EmsTemplate.SendWithDelegate("APP.STOCK.MARKETDATA",
+ delegate(ISession session)
+ {
+ MapMessage message = session.CreateMapMessage();
+ message.SetString("TICKER", ticker);
+ message.SetDouble("PRICE", price);
+ message.Priority = 5;
+ return message;
+ });
+ }
+
+ public void PublishUsingDict(string ticker, double price)
+ {
+ IDictionary marketData = new Hashtable();
+ marketData.Add("TICKER", ticker);
+ marketData.Add("PRICE", price);
+ EmsTemplate.ConvertAndSendWithDelegate("APP.STOCK.MARKETDATA", marketData,
+ delegate(Message message)
+ {
+ message.Priority = 5;
+ message.CorrelationID = new Guid().ToString();
+ return message;
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleMessageListener.cs b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleMessageListener.cs
new file mode 100644
index 00000000..b7cf3da0
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimpleMessageListener.cs
@@ -0,0 +1,31 @@
+using Common.Logging;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Core
+{
+ public class SimpleMessageListener : IMessageListener
+ {
+ private static readonly ILog LOG = LogManager.GetLogger(typeof(SimpleMessageListener));
+
+ private int messageCount;
+
+ public int MessageCount
+ {
+ get { return messageCount; }
+ }
+
+ public void OnMessage(Message message)
+ {
+ messageCount++;
+ LOG.Debug("Message listener count = " + messageCount);
+ TextMessage textMessage = message as TextMessage;
+ if (textMessage != null)
+ {
+ LOG.Info("Message Text = " + textMessage.Text);
+ } else
+ {
+ LOG.Warn("Can not process message of type " message.GetType());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimplePublisher.cs b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimplePublisher.cs
new file mode 100644
index 00000000..a1d8979f
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Messaging/Ems/Core/SimplePublisher.cs
@@ -0,0 +1,28 @@
+using Spring.Messaging.Ems.Common;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Core
+{
+ public class SimplePublisher
+ {
+ private EmsTemplate emsTemplate;
+
+ public SimplePublisher()
+ {
+ emsTemplate = new EmsTemplate(new EmsConnectionFactory("tcp://localhost:7222"));
+ }
+
+ public void Publish(string ticker, double price)
+ {
+ emsTemplate.SendWithDelegate("APP.STOCK.MARKETDATA",
+ delegate(ISession session)
+ {
+ MapMessage message = session.CreateMapMessage();
+ message.SetString("TICKER", ticker);
+ message.SetDouble("PRICE", price);
+ message.Priority = 5;
+ return message;
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.csproj b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.csproj
new file mode 100644
index 00000000..6cc50fdf
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.csproj
@@ -0,0 +1,105 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {FA934E92-C8C2-428A-BE2A-26818F17A787}
+ Library
+ Properties
+ Spring
+ Spring.Messaging.Ems.Integration.Tests
+ v2.0
+ 512
+
+
+
+
+ true
+ full
+ false
+ ..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Integration.Tests\Debug\
+ TRACE;DEBUG;NET_2_0
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ ..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Integration.Tests\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\lib\Net\2.0\nunit.framework.dll
+
+
+
+
+
+ False
+ ..\..\..\lib\Net\2.0\TIBCO.EMS.dll
+
+
+
+
+ CommonAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+ {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}
+ Spring.Aop.2008
+
+
+ {710961A3-0DF4-49E4-A26E-F5B9C044AC84}
+ Spring.Core.2008
+
+
+ {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}
+ Spring.Data.2008
+
+
+ {900E3839-301E-48B1-BAEB-B6645620ACFF}
+ Spring.Messaging.Ems.2008
+
+
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}
+ Spring.Testing.NUnit.2008
+
+
+ {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}
+ Spring.Core.Tests.2008
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.dll.config b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.dll.config
new file mode 100644
index 00000000..d81af4ac
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.dll.config
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Core/MessageTemplateTests.cs b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Core/MessageTemplateTests.cs
index cf5e29d4..5388098f 100644
--- a/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Core/MessageTemplateTests.cs
+++ b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Core/MessageTemplateTests.cs
@@ -35,10 +35,9 @@ using TIBCO.EMS;
namespace Spring.Messaging.Ems.Core
{
///
- /// This class contains tests for
+ /// This class contains tests for EmsTemplate
///
/// Mark Pollack
- /// $Id:$
[TestFixture]
public class MessageTemplateTests
{
diff --git a/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/ExpectedLookupContext.cs b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/ExpectedLookupContext.cs
new file mode 100644
index 00000000..6988651c
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/ExpectedLookupContext.cs
@@ -0,0 +1,118 @@
+#region License
+
+/*
+ * Copyright © 2002-2009 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;
+using System.Collections;
+using TIBCO.EMS;
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ ///
+ /// Simple extension of the ILookupContext that always returns a given object. Useful for testing.
+ ///
+ /// Mark Pollack
+ public class ExpectedLookupContext : ILookupContext
+ {
+ private Hashtable jndiObjects = new Hashtable();
+
+ private object monitor = new object();
+
+ public ExpectedLookupContext(string name, object objValue)
+ {
+ lock (monitor)
+ {
+ jndiObjects.Add(name, objValue);
+ }
+ }
+ #region Implementation of ILookupContext
+
+ public void AddSettings(Hashtable prop)
+ {
+ lock (monitor)
+ {
+ Hashtable merged = new Hashtable();
+ foreach (DictionaryEntry dictionaryEntry in prop)
+ {
+ merged[dictionaryEntry.Key] = dictionaryEntry.Value;
+ }
+ foreach (DictionaryEntry entry in jndiObjects)
+ {
+ merged[entry.Key] = entry.Value;
+ }
+ jndiObjects = merged;
+ }
+ }
+
+ public object AddSettings(string propName, object propValue)
+ {
+ if ((propName == null) || (propValue == null))
+ {
+ throw new ArgumentException("propName or propValue cannot be null");
+ }
+
+ object originalValue = null;
+ lock (monitor)
+ {
+ if (jndiObjects.ContainsKey(propName))
+ {
+ originalValue = jndiObjects[propName];
+ jndiObjects.Remove(propValue);
+ jndiObjects.Add(propName, propValue);
+ }
+ }
+ return originalValue;
+ }
+
+ public object RemoveSettings(string propName)
+ {
+ object originalValue = null;
+ if (propName == null)
+ {
+ throw new ArgumentException("propName cannot be null");
+ }
+ lock (monitor)
+ {
+ if (this.jndiObjects.ContainsKey(propName))
+ {
+ originalValue = jndiObjects[propName];
+ jndiObjects.Remove(propName);
+ }
+ }
+ return originalValue;
+
+ }
+
+ public object Lookup(string name)
+ {
+ object foundObject = this.jndiObjects[name];
+ if (foundObject == null) {
+ throw new NamingException("Unexpected JNDI name '" + name + "': expecting one of" + this.jndiObjects.Keys);
+ }
+ return foundObject;
+ }
+
+ public Hashtable Settings
+ {
+ get { return new Hashtable(); }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/JndiLookupFactoryObjectTests.cs b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/JndiLookupFactoryObjectTests.cs
new file mode 100644
index 00000000..e03a97a1
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Ems.Tests/Messaging/Ems/Jndi/JndiLookupFactoryObjectTests.cs
@@ -0,0 +1,102 @@
+#region License
+
+/*
+ * Copyright © 2002-2009 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
+
+#region Imports
+
+using System;
+using NUnit.Framework;
+using TIBCO.EMS;
+
+#endregion
+
+namespace Spring.Messaging.Ems.Jndi
+{
+ ///
+ /// Test for JndiLookupFactoryObject
+ ///
+ [TestFixture]
+ public class JndiLookupFactoryObjectTests
+ {
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void NoJndiName()
+ {
+ JndiLookupFactoryObject jfo = new JndiLookupFactoryObject();
+ jfo.AfterPropertiesSet();
+
+ }
+
+ [Test]
+ public void LookupWithExpectedTypeAndMatch()
+ {
+ JndiLookupFactoryObject jfo = new JndiLookupFactoryObject();
+ string s = "";
+ jfo.JndiLookupContext = new ExpectedLookupContext("foo", s);
+ jfo.JndiName = "foo";
+ jfo.ExpectedType = typeof (string);
+ jfo.AfterPropertiesSet();
+ Assert.AreEqual(s, jfo.GetObject());
+ }
+
+ [Test]
+ public void LookupWithExpectedTypeAndNoMatch()
+ {
+ JndiLookupFactoryObject jfo = new JndiLookupFactoryObject();
+ object o = new object();
+ jfo.JndiLookupContext = new ExpectedLookupContext("foo", o);
+ jfo.JndiName = "foo";
+ jfo.ExpectedType = typeof (string);
+ try
+ {
+ jfo.AfterPropertiesSet();
+ Assert.Fail("Should have thrown NamingException");
+ } catch (NamingException ex)
+ {
+ Assert.True(ex.Message.IndexOf("is not assignable to [String]") != -1);
+ }
+ }
+
+ [Test]
+ public void LookupWithDefaultObjectAndExpectedType()
+ {
+ JndiLookupFactoryObject jfo = new JndiLookupFactoryObject();
+ string s = "";
+ jfo.JndiLookupContext = new ExpectedLookupContext("foo", s);
+ jfo.JndiName = "myFoo";
+ jfo.ExpectedType = typeof (string);
+ jfo.DefaultObject = "myString";
+ jfo.AfterPropertiesSet();
+ Assert.AreEqual("myString", jfo.GetObject());
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void LookupWithDefaultObjectAndExpectedTypeNoMatch()
+ {
+ JndiLookupFactoryObject jfo = new JndiLookupFactoryObject();
+ string s = "";
+ jfo.JndiLookupContext = new ExpectedLookupContext("foo", s);
+ jfo.JndiName = "myFoo";
+ jfo.ExpectedType = typeof(string);
+ jfo.DefaultObject = true;
+ jfo.AfterPropertiesSet();
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.2008.csproj b/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.2008.csproj
index 10ca3d0d..5aa5afe6 100644
--- a/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.2008.csproj
+++ b/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.2008.csproj
@@ -120,6 +120,8 @@
+
+
diff --git a/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.cs b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.cs
new file mode 100644
index 00000000..481eead0
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.cs
@@ -0,0 +1,63 @@
+#region License
+
+/*
+ * Copyright 2004-2009 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 Apache.NMS;
+using NUnit.Framework;
+using Spring.Testing.NUnit;
+
+namespace Spring.Messaging.Nms.Core
+{
+ [TestFixture]
+ public class NmsTemplateTests: AbstractDependencyInjectionSpringContextTests
+ {
+ protected IConnectionFactory nmsConnectionFactory;
+
+ protected IConnectionFactory connectionFactory;
+
+ ///
+ /// Default constructor for NmsTemplateTests.
+ ///
+ public NmsTemplateTests()
+ {
+ this.PopulateProtectedVariables = true;
+ }
+
+ [Test]
+ public void SendAndReceive()
+ {
+ Assert.NotNull(nmsConnectionFactory);
+ Assert.NotNull(connectionFactory);
+ }
+
+ #region Overrides of AbstractDependencyInjectionSpringContextTests
+
+ ///
+ /// Subclasses must implement this property to return the locations of their
+ /// config files. A plain path will be treated as a file system location.
+ ///
+ /// An array of config locations
+ protected override string[] ConfigLocations
+ {
+ get { return new string[] { "assembly://Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Core/NmsTemplateTests.xml" }; }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.xml b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.xml
new file mode 100644
index 00000000..762db6b7
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Messaging/Nms/Core/NmsTemplateTests.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.csproj b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.csproj
new file mode 100644
index 00000000..3844e521
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.csproj
@@ -0,0 +1,98 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}
+ Library
+ Properties
+ Spring
+ Spring.Messaging.Nms.Integration.Tests
+ v2.0
+ 512
+
+
+
+
+ true
+ full
+ false
+ ..\..\..\build\VS.NET.2008\Spring.Messaging.Nms.Integration.Tests\Debug\
+ TRACE;DEBUG;NET_2_0
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ ..\..\..\build\VS.NET.2008\Spring.Messaging.Nms.Tests\Release\
+ TRACE;NET_2_0
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\lib\Net\2.0\Apache.NMS.dll
+
+
+ False
+ ..\..\..\lib\Net\2.0\Apache.NMS.ActiveMQ.dll
+
+
+ False
+ ..\..\..\lib\Net\2.0\Common.Logging.dll
+
+
+ False
+ ..\..\..\lib\Net\2.0\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+ CommonAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+ {710961A3-0DF4-49E4-A26E-F5B9C044AC84}
+ Spring.Core.2008
+
+
+ {AEB1578C-9018-4D49-B440-789F38DD2F29}
+ Spring.Messaging.Nms.2008
+
+
+ {ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}
+ Spring.Testing.NUnit.2008
+
+
+ {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}
+ Spring.Core.Tests.2008
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.dll.config b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.dll.config
new file mode 100644
index 00000000..b7db2817
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Integration.Tests.dll.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/test/Spring/Spring.Messaging.Nms.Tests/NmsExceptionTests.cs b/test/Spring/Spring.Messaging.Nms.Tests/NmsExceptionTests.cs
new file mode 100644
index 00000000..5d450efb
--- /dev/null
+++ b/test/Spring/Spring.Messaging.Nms.Tests/NmsExceptionTests.cs
@@ -0,0 +1,45 @@
+#region License
+
+/*
+ * Copyright 2004 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
+
+#region Imports
+
+using System.Reflection;
+using NUnit.Framework;
+using Spring.Messaging.Nms.Connections;
+
+#endregion
+
+namespace Spring
+{
+ ///
+ /// Unit tests for all of the exception classes in the Spring.Data library...
+ ///
+ /// Rick Evans
+ [TestFixture]
+ [Ignore("Spring inherits from NMS Exceptions which do not ")]
+ public sealed class NmsExceptionTests : ExceptionsTest
+ {
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ AssemblyToCheck = Assembly.GetAssembly(typeof (SynchedLocalTransactionFailedException));
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj
index 2d23b48f..4e6a5f12 100644
--- a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj
+++ b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj
@@ -81,6 +81,7 @@
CommonAssemblyInfo.cs
+