Skip to content

Commit

Permalink
Merge branch '3.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasohlund committed May 8, 2013
2 parents 3ead51b + 392fee8 commit bee0220
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ public void Run()

EndpointTransport.FinishedMessageProcessing += (a, b) =>
{
if (Bus.CurrentMessageContext.Headers.ContainsKey(NServiceBus.Headers.Retries))
{
return;
}
SendReadyMessage(1);
SendReadyMessage();
};
}

void SendReadyMessage(int capacityAvailable, bool isStarting = false)
void SendReadyMessage(int capacityAvailable = 1, bool isStarting = false)
{
//we use the actual address to make sure that the worker inside the masternode will check in correctly
var readyMessage = ControlMessage.Create(Bus.InputAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<Reference Include="NServiceBus.Setup.Windows">
<HintPath>..\..\..\..\..\build\nservicebus.core\NServiceBus.Setup.Windows.dll</HintPath>
</Reference>
<Reference Include="NServiceBus.Unicast.Config">
<HintPath>..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Config.dll</HintPath>
</Reference>
<Reference Include="NServiceBus.Unicast.Queuing">
<HintPath>..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll</HintPath>
<Private>False</Private>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,23 @@ void ITransport.Start(string inputqueue)
void ITransport.Start(Address address)
{
MessageReceiver.Init(address, IsTransactional);
FailureManager.Init(address);

var returnAddressForFailures = address;

//figure out if this transport is the one feeding messages into the unicastbus
if (returnAddressForFailures.Queue.ToLower().EndsWith(".worker") || address == Address.Local) //this is a hack until we can refactor the SLR to be a feature. "Worker" is there to catch the local worker in the distributor
{
//GetMasterNodeAddress returns Address.Local if no masternode is defined so we can safely call this for all endpoints
returnAddressForFailures = Configure.Instance.GetMasterNodeAddress();

if (address != returnAddressForFailures)
{
Logger.InfoFormat("Worker started, failures will be redirected to {0}", returnAddressForFailures);
}
}

FailureManager.Init(returnAddressForFailures);

Logger.DebugFormat("Going to start [{0}] receiving thread/s for Address [{1}].", numberOfWorkerThreads, address);
for (int i = 0; i < numberOfWorkerThreads; i++)
AddWorkerThread().Start();
Expand Down
2 changes: 1 addition & 1 deletion src/integration/NServiceBus.Integration.WCF/IWcfService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace NServiceBus
/// </summary>
/// <typeparam name="TRequest"></typeparam>
/// <typeparam name="TResponse"></typeparam>
[ServiceContract]
[ServiceContract(Namespace = "http://nservicebus.com")]
public interface IWcfService<TRequest, TResponse>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ void IManageUnitsOfWork.End(Exception ex)
return;

if (ex != null)
session.Transaction.Rollback();
{
// Due to a race condition in NH3.3, explicit rollback can cause exceptions and corrupt the connection pool.
// Especially if there are more than one NH session taking part in the DTC transaction
//session.Transaction.Rollback();
}
else
session.Transaction.Commit();
}
Expand Down

0 comments on commit bee0220

Please sign in to comment.