forked from hibernating-rhinos/rhino-esb
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the notion of automatically executing deployment & env. valida…
…tion actions. git-svn-id: https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk@2040 079b0acf-d9fa-0310-9935-e5ade295c882
- Loading branch information
ayenderahien
committed
Feb 18, 2009
1 parent
893fca4
commit 1a03139
Showing
21 changed files
with
239 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Messaging; | ||
using Rhino.ServiceBus.Internal; | ||
using Rhino.ServiceBus.MessageModules; | ||
using Rhino.ServiceBus.Msmq; | ||
|
||
namespace Rhino.ServiceBus.Actions | ||
{ | ||
public class CreateLogQueueAction : IDeploymentAction | ||
{ | ||
private readonly MessageLoggingModule messageLoggingModule; | ||
private readonly ITransport transport; | ||
|
||
public CreateLogQueueAction(MessageLoggingModule messageLoggingModule, ITransport transport) | ||
{ | ||
this.messageLoggingModule = messageLoggingModule; | ||
this.transport = transport; | ||
} | ||
|
||
public void Execute(string user) | ||
{ | ||
// will create the queues if they are not already there | ||
messageLoggingModule.Init(transport); | ||
var queuePath = MsmqUtil.GetQueuePath(new Endpoint | ||
{ | ||
Uri = messageLoggingModule.LogQueue | ||
}).QueuePath; | ||
|
||
using (var queue = new MessageQueue(queuePath)) | ||
{ | ||
queue.SetPermissions(user, | ||
MessageQueueAccessRights.DeleteMessage | | ||
MessageQueueAccessRights.DeleteJournalMessage | | ||
MessageQueueAccessRights.GenericRead | | ||
MessageQueueAccessRights.GenericWrite | | ||
MessageQueueAccessRights.GetQueuePermissions | | ||
MessageQueueAccessRights.PeekMessage | | ||
MessageQueueAccessRights.ReceiveJournalMessage | | ||
MessageQueueAccessRights.ReceiveMessage | | ||
MessageQueueAccessRights.WriteMessage, | ||
AccessControlEntryType.Allow); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Messaging; | ||
using Rhino.ServiceBus.Msmq; | ||
|
||
namespace Rhino.ServiceBus.Actions | ||
{ | ||
public class CreateQueuesAction : IDeploymentAction | ||
{ | ||
private readonly IQueueStrategy queueStrategy; | ||
private readonly IServiceBus serviceBus; | ||
|
||
public CreateQueuesAction(IQueueStrategy queueStrategy, IServiceBus serviceBus) | ||
{ | ||
this.queueStrategy = queueStrategy; | ||
this.serviceBus = serviceBus; | ||
} | ||
|
||
public void Execute(string user) | ||
{ | ||
// will create the queues if they are not already there | ||
var queues = queueStrategy.InitializeQueue(serviceBus.Endpoint); | ||
foreach (var queue in queues) | ||
{ | ||
queue.SetPermissions(user, | ||
MessageQueueAccessRights.DeleteMessage | | ||
MessageQueueAccessRights.DeleteJournalMessage | | ||
MessageQueueAccessRights.GenericRead | | ||
MessageQueueAccessRights.GenericWrite | | ||
MessageQueueAccessRights.GetQueuePermissions | | ||
MessageQueueAccessRights.PeekMessage | | ||
MessageQueueAccessRights.ReceiveJournalMessage | | ||
MessageQueueAccessRights.ReceiveMessage | | ||
MessageQueueAccessRights.WriteMessage, | ||
AccessControlEntryType.Allow); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...o.ServiceBus/Actions/IValidationAction.cs → ...s/Actions/IEnvironmentValidationAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
|
||
namespace Rhino.ServiceBus.Hosting | ||
{ | ||
public interface IApplicationHost : IDisposable | ||
{ | ||
void Start(string assembly); | ||
void InitialDeployment(string assembly, string user); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.