SPRNET-1278 - Add integration with JNDI for TIBCO EMS
SPRNET-1279 - Create integration test project for NMS SPRNET-1280 - Create integration test project for TIBCO EMS
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2051,9 +2051,9 @@ namespace Spring.Objects.Factory.Support
|
||||
/// if <paramref name="instance"/> is null or not assignable to <paramref name="requiredType"/>.
|
||||
/// </exception>
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -857,16 +857,6 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath="Expressions\Processors\DateConversionProcessor.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath="Expressions\Processors\IMethodCallProcessor.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Expressions\DefaultNode.cs"
|
||||
SubType = "Code"
|
||||
@@ -1700,6 +1690,11 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Expressions\Processors\DateConversionProcessor.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Expressions\Processors\DistinctProcessor.cs"
|
||||
SubType = "Code"
|
||||
@@ -1710,6 +1705,11 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Expressions\Processors\IMethodCallProcessor.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Expressions\Processors\MaxAggregator.cs"
|
||||
SubType = "Code"
|
||||
@@ -2070,11 +2070,6 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Objects\Factory\Config\DelegateObjectFactoryConfigurer.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Objects\Factory\Config\ConstructorArgumentValues.cs"
|
||||
SubType = "Code"
|
||||
@@ -2090,6 +2085,11 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Objects\Factory\Config\DelegateObjectFactoryConfigurer.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Objects\Factory\Config\DependencyDescriptor.cs"
|
||||
SubType = "Code"
|
||||
@@ -2962,6 +2962,11 @@
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Util\IEventExceptionsCollector.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Util\IoUtils.cs"
|
||||
SubType = "Code"
|
||||
|
||||
@@ -98,6 +98,11 @@ namespace Spring.Messaging.Ems.Connections
|
||||
/// </summary>
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Convenient superclass to access JndiProperties, JndiContextType or alternatively set the ILookupContext directly.
|
||||
/// </summary>
|
||||
/// <author>Juergen Hoeller</author>
|
||||
/// <author>Mark Pollack</author>
|
||||
public class JndiAccessor : IInitializingObject
|
||||
{
|
||||
private ILookupContext _jndiLookupContext;
|
||||
|
||||
private Hashtable jndiProperties = new Hashtable();
|
||||
|
||||
private JndiContextType contextType = JndiContextType.JMS;
|
||||
|
||||
protected ILog logger;
|
||||
|
||||
LookupContextFactory contextFactoryObject = new LookupContextFactory();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the lookup context.
|
||||
/// </summary>
|
||||
/// <value>The lookup context.</value>
|
||||
public ILookupContext JndiLookupContext
|
||||
{
|
||||
get { return _jndiLookupContext; }
|
||||
set { _jndiLookupContext = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the JNDI environment properties.
|
||||
/// </summary>
|
||||
/// <value>The jndi properties.</value>
|
||||
public IDictionary JndiProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return jndiProperties;
|
||||
}
|
||||
set
|
||||
{
|
||||
jndiProperties = new Hashtable(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the jndi context. The default is JndiContextType.JMS
|
||||
/// </summary>
|
||||
/// <value>The type of the jndi context.</value>
|
||||
public JndiContextType JndiContextType
|
||||
{
|
||||
get { return this.contextType; }
|
||||
set
|
||||
{
|
||||
this.contextType = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create the JndiLookupContext if it has not been explicitly set.
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace Spring.Messaging.Ems.Jndi
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The various JNDI Context types.
|
||||
/// </summary>
|
||||
public enum JndiContextType
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a tibjmsnaming context to lookup administered object inside the tibjmsnaming server.
|
||||
/// </summary>
|
||||
JMS,
|
||||
|
||||
/// <summary>
|
||||
/// Create a ldap context to lookup administered object in an ldap server.
|
||||
/// </summary>
|
||||
LDAP
|
||||
} ;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the default object to fall back to if the JNDI lookup fails.
|
||||
/// Default is none.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>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.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <value>The default object to use when lookup fails.</value>
|
||||
public object DefaultObject
|
||||
{
|
||||
set { defaultObject = value; }
|
||||
}
|
||||
|
||||
#region Implementation of IFactoryObject
|
||||
|
||||
/// <summary>
|
||||
/// Return the Jndi object
|
||||
/// </summary>
|
||||
/// <returns>The Jndi object</returns>
|
||||
public object GetObject()
|
||||
{
|
||||
return this.jndiObject;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Return type of object retrieved from Jndi or the expected type if the Jndi retrieval
|
||||
/// did not succeed.
|
||||
/// </summary>
|
||||
/// <value>Return value of retrieved object</value>
|
||||
public Type ObjectType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.jndiObject != null)
|
||||
{
|
||||
return this.jndiObject.GetType();
|
||||
}
|
||||
return ExpectedType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns true
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Convenient superclass for JNDI-based service locators,
|
||||
/// providing configurable lookup of a specific JNDI resource.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Exposes a JndiName property.
|
||||
/// </para>
|
||||
/// <para>Subclasses may invoke the <code>Lookup</code> 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.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <author>Juergen Hoeller</author>
|
||||
/// <author>Mark Pollack (.NET)</author>
|
||||
public abstract class JndiObjectLocator : JndiLocatorSupport, IInitializingObject
|
||||
{
|
||||
private string jndiName;
|
||||
|
||||
private Type expectedType;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Jndi name to lookup.
|
||||
/// </summary>
|
||||
/// <value>The name of the jndi.</value>
|
||||
public string JndiName
|
||||
{
|
||||
get { return jndiName; }
|
||||
set { jndiName = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type that the located JNDI object is supposed
|
||||
/// to be assignable to, if any.
|
||||
/// </summary>
|
||||
/// <value>The expected type.</value>
|
||||
public Type ExpectedType
|
||||
{
|
||||
get { return expectedType; }
|
||||
set { expectedType = value; }
|
||||
}
|
||||
|
||||
#region Implementation of IInitializingObject
|
||||
|
||||
/// <summary>
|
||||
/// Ensure that the JndiName property is set and create the TIBCO EMS ILookupContext instance.
|
||||
/// </summary>
|
||||
public override void AfterPropertiesSet()
|
||||
{
|
||||
base.AfterPropertiesSet();
|
||||
if (!StringUtils.HasLength(JndiName))
|
||||
{
|
||||
throw new ArgumentException("Property 'JndiName' is required");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lookups this instance using the JndiName and ExpectedType properties
|
||||
/// </summary>
|
||||
/// <returns>The object retrieved from Jndi</returns>
|
||||
protected virtual object Lookup() {
|
||||
return Lookup(JndiName, ExpectedType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// A Spring FactoryObject that returns TIBCO.EMS.ILookupContext. Use the returned
|
||||
/// ILookupContext to do you lookups at runtime.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Important properties to set are JndiProperties and JndiContexType. JndiContextType is set to
|
||||
/// LookupContextFactory.TIBJMS_NAMING_CONT by default.
|
||||
/// </para>
|
||||
/// <para>To lookup objects at startup time and cache their values, as well as provide a
|
||||
/// default value if lookup fail, <see cref="JndiLookupFactoryObject"/>
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <author>Mark Pollack</author>
|
||||
public class LookupContextFactoryObject : JndiLocatorSupport, IFactoryObject
|
||||
{
|
||||
#region Implementation of IFactoryObject
|
||||
|
||||
/// <summary>
|
||||
/// Returns the TIBCO.EMS.ILookupContext
|
||||
/// </summary>
|
||||
/// <returns>TIBCO.EMS.ILookupContext</returns>
|
||||
public object GetObject()
|
||||
{
|
||||
return this.JndiLookupContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return typeof(TIBCO.EMS.ILookupContext)
|
||||
/// </summary>
|
||||
public Type ObjectType
|
||||
{
|
||||
get { return typeof (ILookupContext); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true
|
||||
/// </summary>
|
||||
public bool IsSingleton
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown if a type mismatch is encountered for an object
|
||||
/// located in a JNDI environment.
|
||||
/// </summary>
|
||||
/// <author>Juergen Hoeller</author>
|
||||
/// <author>Mark Pollack (.NET)</author>
|
||||
[Serializable]
|
||||
public class TypeMismatchNamingException : NamingException
|
||||
{
|
||||
private Type requiredType;
|
||||
|
||||
private Type actualType;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="Spring.Objects.Factory.ObjectCreationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
public TypeMismatchNamingException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TypeMismatchNamingException"/> class
|
||||
/// building an explanation text from the given arguments.
|
||||
/// </summary>
|
||||
/// <param name="jndiName">The Jndi name.</param>
|
||||
/// <param name="requiredType">Type required type of the lookup.</param>
|
||||
/// <param name="actualType">The actual type that the lookup returned.</param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the actual type that the lookup returned, if available.
|
||||
/// </summary>
|
||||
/// <value>The actual type that the lookup.</value>
|
||||
public Type ActualType
|
||||
{
|
||||
get { return actualType; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the required type for the lookup, if available.
|
||||
/// </summary>
|
||||
/// <value>The equired type for the lookup</value>
|
||||
public Type RequiredType
|
||||
{
|
||||
get { return requiredType; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{900E3839-301E-48B1-BAEB-B6645620ACFF}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
@@ -92,6 +92,13 @@
|
||||
<Compile Include="Messaging\Ems\Core\MessagePostProcessorDelegate.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\ProducerDelegate.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\SessionDelegate.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiContextType.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiAccessor.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiLocatorSupport.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiLookupFactoryObject.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiObjectLocator.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\LookupContextFactoryObject.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\TypeMismatchNamingException.cs" />
|
||||
<Compile Include="Messaging\Ems\Listener\AbstractListenerContainer.cs" />
|
||||
<Compile Include="Messaging\Ems\Listener\AbstractMessageListenerContainer.cs" />
|
||||
<Compile Include="Messaging\Ems\Listener\Adapter\ListenerExecutionFailedException.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.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[Serializable]
|
||||
public class RecoveryTimeExceededException : NMSException
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RecoveryTimeExceededException"/> class.
|
||||
/// </summary>
|
||||
public RecoveryTimeExceededException(): base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RecoveryTimeExceededException"/> class, with the specified message
|
||||
/// </summary>
|
||||
@@ -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 ) {} */
|
||||
}
|
||||
}
|
||||
@@ -114,6 +114,11 @@
|
||||
AssemblyName = "Common.Logging"
|
||||
HintPath = "..\..\..\lib\Net\1.1\Common.Logging.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Spring.Testing.NUnit.2003"
|
||||
Project = "{6B8639E3-88BB-4F7B-9F23-699E84C30D58}"
|
||||
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
|
||||
@@ -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")]
|
||||
@@ -0,0 +1,87 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for EmsTemplateTests.
|
||||
/// </summary>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Subclasses must implement this property to return the locations of their
|
||||
/// config files. A plain path will be treated as a file system location.
|
||||
/// </summary>
|
||||
/// <value>An array of config locations</value>
|
||||
protected override string[] ConfigLocations
|
||||
{
|
||||
get { return new string[] { "assembly://Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Core/EmsTemplateTests.xml" }; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ems="http://www.springframework.net/ems">
|
||||
|
||||
<!-- the default ConnectionFactory -->
|
||||
|
||||
<object id="emsConnectionFactory" type="Spring.Messaging.Ems.Common.EmsConnectionFactory, Spring.Messaging.Ems">
|
||||
<constructor-arg name="serverUrl" value="tcp://localhost:7222"/>
|
||||
<constructor-arg name="clientId" value="SpringEMSClient"/>
|
||||
<property name="ConnAttemptCount" value="10" />
|
||||
<property name="ConnAttemptDelay" value="100" />
|
||||
<property name="ConnAttemptTimeout" value="1000" />
|
||||
</object>
|
||||
|
||||
|
||||
<object id="connectionFactory" type="Spring.Messaging.Ems.Connections.CachingConnectionFactory, Spring.Messaging.Ems">
|
||||
<property name="SessionCacheSize" value="10" />
|
||||
<property name="TargetConnectionFactory">
|
||||
<object type="Spring.Messaging.Ems.Common.EmsConnectionFactory, Spring.Messaging.Ems">
|
||||
<constructor-arg name="serverUrl" value="tcp://localhost:7222"/>
|
||||
<constructor-arg name="clientId" value="SpringEMSClient"/>
|
||||
<property name="ConnAttemptCount" value="10" />
|
||||
<property name="ConnAttemptDelay" value="100" />
|
||||
<property name="ConnAttemptTimeout" value="1000" />
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
<!--
|
||||
<property name="JndiProperties">
|
||||
<dictionary>
|
||||
<entry key="TIBCO.EMS.provider.url" value="tibjmsnaming://localhost:7222"/>
|
||||
</dictionary>
|
||||
</property>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<object id="simpleGateway" type="Spring.Messaging.Ems.Core.SimpleGateway, Spring.Messaging.Ems.Integration.Tests">
|
||||
<property name="ConnectionFactory" ref="connectionFactory" />
|
||||
</object>
|
||||
|
||||
|
||||
<object id="cachingJndiConnectionFactory" type="Spring.Messaging.Ems.Connections.CachingConnectionFactory, Spring.Messaging.Ems">
|
||||
<property name="SessionCacheSize" value="10" />
|
||||
<property name="TargetConnectionFactory">
|
||||
<object type="Spring.Messaging.Ems.Common.EmsConnectionFactory, Spring.Messaging.Ems">
|
||||
<constructor-arg ref="jndiEmsConnectionFactory"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
|
||||
<object name="simpleMessageListener"
|
||||
type="Spring.Messaging.Ems.Core.SimpleMessageListener, Spring.Messaging.Ems.Integration.Tests"/>
|
||||
|
||||
|
||||
|
||||
<ems:listener-container connection-factory="connectionFactory" concurrency="10">
|
||||
<ems:listener ref="simpleMessageListener" destination="APP.STOCK.REQUEST" />
|
||||
</ems:listener-container>
|
||||
|
||||
</objects>
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FA934E92-C8C2-428A-BE2A-26818F17A787}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Messaging.Ems.Integration.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkSubset>
|
||||
</TargetFrameworkSubset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Integration.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TIBCO.EMS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5b83db8ff05c64ba, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\TIBCO.EMS.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\CommonAssemblyInfo.cs">
|
||||
<Link>CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\EmsTemplateTests.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\SimpleGateway.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\SimpleMessageListener.cs" />
|
||||
<Compile Include="Messaging\Ems\Core\SimplePublisher.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
|
||||
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
|
||||
<Name>Spring.Aop.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Messaging.Ems\Spring.Messaging.Ems.2008.csproj">
|
||||
<Project>{900E3839-301E-48B1-BAEB-B6645620ACFF}</Project>
|
||||
<Name>Spring.Messaging.Ems.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj">
|
||||
<Project>{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Messaging.Ems.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Messaging\Ems\Core\EmsTemplateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net"
|
||||
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
|
||||
</configSections>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="TestConnectionString"
|
||||
connectionString="TestConnectionString-TestConnectionString" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v1.1.4322">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
applies-to="v2.0.50727">
|
||||
<qualifyAssembly partialName="System.Web"
|
||||
fullName="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblyBinding>
|
||||
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- The assembly binding for FirebirdClient ADO.NET 2.0 DataProvider -->
|
||||
<qualifyAssembly partialName="FirebirdSql.Data.FirebirdClient" fullName="FirebirdSql.Data.FirebirdClient, Version=2.1.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
|
||||
|
||||
<!-- Spring.NET uses a new version of NUnit -->
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.5.1.9189"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
|
||||
</runtime>
|
||||
|
||||
|
||||
<log4net>
|
||||
<!-- Define some output appenders -->
|
||||
<appender name="trace"
|
||||
type="log4net.Appender.TraceAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="console"
|
||||
type="log4net.Appender.ConsoleAppender, log4net">
|
||||
<layout type="log4net.Layout.PatternLayout,log4net">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="WARN" />
|
||||
<appender-ref ref="trace" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4net>
|
||||
</configuration>
|
||||
@@ -35,10 +35,9 @@ using TIBCO.EMS;
|
||||
namespace Spring.Messaging.Ems.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains tests for
|
||||
/// This class contains tests for EmsTemplate
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
/// <version>$Id:$</version>
|
||||
[TestFixture]
|
||||
public class MessageTemplateTests
|
||||
{
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple extension of the ILookupContext that always returns a given object. Useful for testing.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Test for JndiLookupFactoryObject
|
||||
/// </summary>
|
||||
[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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,8 @@
|
||||
<Compile Include="Messaging\Ems\Integration\LoggingExceptionHandler.cs" />
|
||||
<Compile Include="Messaging\Ems\Integration\SimpleMessageListener.cs" />
|
||||
<Compile Include="Messaging\Ems\Integration\SimpleMessageListenerContainerTests.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\ExpectedLookupContext.cs" />
|
||||
<Compile Include="Messaging\Ems\Jndi\JndiLookupFactoryObjectTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Messaging\Ems\Integration\SimpleMessageListenerContainerTests.xml" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for NmsTemplateTests.
|
||||
/// </summary>
|
||||
public NmsTemplateTests()
|
||||
{
|
||||
this.PopulateProtectedVariables = true;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SendAndReceive()
|
||||
{
|
||||
Assert.NotNull(nmsConnectionFactory);
|
||||
Assert.NotNull(connectionFactory);
|
||||
}
|
||||
|
||||
#region Overrides of AbstractDependencyInjectionSpringContextTests
|
||||
|
||||
/// <summary>
|
||||
/// Subclasses must implement this property to return the locations of their
|
||||
/// config files. A plain path will be treated as a file system location.
|
||||
/// </summary>
|
||||
/// <value>An array of config locations</value>
|
||||
protected override string[] ConfigLocations
|
||||
{
|
||||
get { return new string[] { "assembly://Spring.Messaging.Nms.Integration.Tests/Spring.Messaging.Nms.Core/NmsTemplateTests.xml" }; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<objects xmlns="http://www.springframework.net"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:nms="http://www.springframework.net/nms">
|
||||
|
||||
<!-- the default ConnectionFactory -->
|
||||
<object id="nmsConnectionFactory" type="Apache.NMS.ActiveMQ.ConnectionFactory, Apache.NMS.ActiveMQ">
|
||||
<constructor-arg index="0" value="tcp://localhost:61616"/>
|
||||
</object>
|
||||
|
||||
|
||||
<object id="connectionFactory" type="Spring.Messaging.Nms.Connections.CachingConnectionFactory, Spring.Messaging.Nms">
|
||||
<property name="SessionCacheSize" value="10" />
|
||||
<property name="TargetConnectionFactory">
|
||||
<object type="Apache.NMS.ActiveMQ.ConnectionFactory, Apache.NMS.ActiveMQ">
|
||||
<constructor-arg index="0" value="tcp://localhost:61616"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
</objects>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E5323AC8-137E-4EF7-BC62-3BD6FC0576CD}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Spring</RootNamespace>
|
||||
<AssemblyName>Spring.Messaging.Nms.Integration.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkSubset>
|
||||
</TargetFrameworkSubset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Nms.Integration.Tests\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Nms.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Apache.NMS, Version=1.1.0.1642, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Apache.NMS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Apache.NMS.ActiveMQ, Version=1.1.0.1642, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Apache.NMS.ActiveMQ.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Messaging.Nms.Integration.Tests.dll.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\CommonAssemblyInfo.cs">
|
||||
<Link>CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Messaging\Nms\Core\NmsTemplateTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Messaging\Nms\Core\NmsTemplateTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
|
||||
<Name>Spring.Core.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Messaging.Nms\Spring.Messaging.Nms.2008.csproj">
|
||||
<Project>{AEB1578C-9018-4D49-B440-789F38DD2F29}</Project>
|
||||
<Name>Spring.Messaging.Nms.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Testing.NUnit\Spring.Testing.NUnit.2008.csproj">
|
||||
<Project>{ED204A7B-832F-44C7-BFE3-504AEBE1BCC8}</Project>
|
||||
<Name>Spring.Testing.NUnit.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
||||
45
test/Spring/Spring.Messaging.Nms.Tests/NmsExceptionTests.cs
Normal file
45
test/Spring/Spring.Messaging.Nms.Tests/NmsExceptionTests.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
[Ignore("Spring inherits from NMS Exceptions which do not ")]
|
||||
public sealed class NmsExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (SynchedLocalTransactionFailedException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,6 +81,7 @@
|
||||
<Link>CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="NmsExceptionTests.cs" />
|
||||
<Compile Include="NmsCompilerOptionsTests.cs" />
|
||||
<Compile Include="Messaging\Nms\Config\NmsNamespaceHandlerTests.cs" />
|
||||
<Compile Include="Messaging\Nms\Connections\CachingConnectionFactoryTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user