SpringSource/spring-net-amqp — pull request #22 by simoneb (2012-01-10 21:08:43+00:00)
Title: Some fixes to have RabbitBrokerAdmin working as a service on Windows

## !Not tested! ##

Added the ability to pass the cookie but not the node name. I couldn't get it to work in any way using the .erlang.cookie file. Although I copied the same file everywhere (user directories of pretty much all users on my machine, c:\Windows, ...), I couldn't figure out what the two nodes were picking up, apparently two different ones. I fixed it by setting the cookie explicitly on both nodes.

Using the same hostname as self node also for the peer connection, as by default the OtpSelf class if hostname is not passed (which before this fix wasn't) tries to figure out the hostname and doesn't convert it to upper case (which RabbitBrokerAdmin does for the connection to self), thus introducing the chance for peer and self to have hostnames which differ in casing, which in turn appears to prevent them from talking to each other.