How to handle connection drops in spring rabbit ? - spring-rabbit

How can I handle the connection dropping from my rabbit server in spring-rabbit ? Are there any specific options I need to set ? Config shown below :
<rabbit:connection-factory id="connectionFactory" host="${}" port="${rabbitmq.port:5672}"
username="guest" password="guest" />
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory" />
<rabbit:admin connection-factory="connectionFactory" />
<rabbit:queue name="Q1.${}" />
<rabbit:queue name="Q2.${}" />
<rabbit:listener-container connection-factory="connectionFactory">
<rabbit:listener queues="Q2.${}" ref="q1QueueConsumer" />
<rabbit:listener queues="Q2.${}" ref="q2QueueConsumer" />
<rabbit:topic-exchange name="Exchange">
<rabbit:binding queue="Q1.${}" pattern="#.Q1.#" />
<rabbit:binding queue="Q2.${}" pattern="#.Q2.#" />

Spring rabbit can automatically handle reconnecting to the broker. Just be careful as the 1.0.0 Release doesnt play nice with the 1.8.x releases of RabbitMQ


Silverlight and JavaScript Communication

I'm having a dandy of a time getting Silverlight and JavaScript to communicate with each other.
In the page.xaml.cs file, I marked the class as ScriptableType and two methods with ScriptableMember. I then declared:
HtmlPage.RegisterScriptableObject("Page", this);
When I attempt to invoke either method, I get obj.Content.Page is undefined:
var obj = document.getElementById('silverlightControl');
alert(obj); // [object HtmlObjectElement]
alert(obj.Content); // Content
alert(obj.Content.Page); // obj.Content.Page is undefined
On the flip side, inside of a method in page.xaml.cs, I am calling:
HtmlPage.Window.Invoke("mapRegionChanged", GetRegion());
I have a respective method in JavaScript, which never gets called:
function mapRegionChanged(region) {
alert("Region changed: " + region);
The Silverlight object is declared as follows:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="151px" height="77px" id="silverlightControl">
<param name="onload" value="regionsLoaded" />
<param name="source" value="<%= Url.Content("~/ClientBin/Worldmap.xap") %>" />
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<param name="enableHtmlAccess" value="true" />
<a href="" style="text-decoration: none;">
<img src="" alt="Get Microsoft Silverlight" style="border-style: none" />
The UserControl is defined in XAML as:
Width="151" Height="77" xmlns:d="" xmlns:mc="" mc:Ignorable="d">
<Grid x:Name="LayoutRoot" Background="White" Width="151" Height="77" Cursor="Hand" MouseMove="OnMouseMove" MouseLeftButtonUp="OnMouseUp" MouseLeave="OnMouseLeave">
I experienced this problem. Firefox is my default browser and is therefore the browser that Visual Studio (actually VWD, but no matter) starts up. While developing, I added the JavaScript calling code to the client page and found that the "content" child member of the Silverlight component could not be found in the DOM in FireFox -- but it could be found in IE. I restarted the Visual Studio web servers (the ones in the system tray) and hey, presto -- it worked in Firefox! The problem seems to have been caused by the caching of the Silverlight component in those web servers.
Make sure to enable HTML acces:
in C#:
System.Windows.Interop.SilverlightHost host = Application.Current.Host;
System.Windows.Interop.Settings settings = host.Settings;
bool enableAcces = settings.EnableHTMLAccess;
enableAcces = true;
in HTML:
<param name="enablehtmlaccess" value="true" />
This worked for me.
If you found some incompatibility between FireFox and IE, we'll need to report it. Might be something else in the JS on the page, or it might be a setting in FF3 (like flashblock-type stuff)
Some days ago I have read the php architect magazine and there's an article about Silverlight that explains how to communicate with javascript, you might want to check it out.
Go to and register so you can download the magazine, then you must download the May 2009 issue, all other issues must be paid but this one in my account was free, I hope in yours too, if you can't download it just let me know and I can send you the PDF by email.
And here is the direct link to download it:
Best regards,

How do I hook into IDP initiated single logout to run custom code?

I'm using sustainsys.saml2.httpmodule. I would like to run some code to log the logout from an IDP initiated single log out. The user also does not seem to be logged out (IsAuthenticated is still true) after an IDP initiated single log out even though gives me a success result.
I can't seem to find anyone else needing the same functionality or having the same issues. My Sustainsys config is below.
<sustainsys.saml2 entityId="http://localhost:53758/Saml2"
publicOrigin ="http://localhost:53758/">
<nameIdPolicy allowCreate="false" format="Unspecified"/>
<metadata cacheDuration="PT1440M" wantAssertionsSigned="true">
<organization name="ab" displayName="ab" url="" language="en" />
<contactPerson type="Technical" email="" />
<add friendlyName ="Some Name" name="urn:someName" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true" />
<add entityId=""
<signingCertificate storeName="CertificateAuthority" storeLocation="CurrentUser"
findValue="cdf7090a433561a843b51198b0ba6456" x509FindType="FindBySerialNumber" />
<add storeName="CertificateAuthority" storeLocation="CurrentUser" findValue="2cfe21cb930c19a341e9e30a07a3c123" x509FindType="FindBySerialNumber" />
You can use the LogoutCommandResultCreated notification. It will get called both when the redirect to the Idp is about to happen as well as after the response has been received from the Idp.

Zk Notify multiple view

I'm working on a project using zk framework. I have many users who can use the application at the same time.
If one of them change a value of a field and fire the #notifychange I want to update the views of all other users.
For example if all the users are in the same page
<window title="Search" width="600px" border="normal"
viewModel="#id('vm') #init('demo.getting_started.mvvm.SearchViewModel')"
binder="#id('b') #init('demo.getting_started.mvvm.AnnotateBinderExt',queueName='myqueue',queueScope='session')">
<hbox align="center">
<textbox id="txt" value="#bind(vm.keyword)" />
<textbox value="#load(vm.keyword)" />
and one of them change the value of the textfield I want update the value of the label for the other users.
I'm trying to work with the eventQueue but couldn't out how to implement it.
Your almost there.
The reason why it doesn't change is because #notifychange is propably called from a Command in stead of a GlobalCommand.
Take a look at this small talk what I wrote.
#Command is always the same viewmodel, #GlobalCommand can reach out to other viewmodels in the binders scope.

Orbeon 4.9 strange client-side javascript error

Another migration issue. I have changed orbeon forms version from 3.8 to 4.9.
One of my xforms isn't working after migration, this button freezes form with "xforms-loading-loading" span visible. There are no errors on the server side. Both submissions from this action are getting WSDL/SCHEMA from exist and replaces two xform instances. It is working correctly as I can see with inspector. The only error i can see is Javascript Error "TypeError: "spanContainer is undefined" from line 120 orbeon...*js. spanContainer.appendChild(templateClone) this is the part of code that crashes my application.
<xf:trigger ref="instance('page')/edition-valid">
<xf:action ev:event="DOMActivate">
<xf:send submission="get-wsdl" />
<xf:send submission="get-schema" />
<xf:action if="not(instance('schema')//xsd:appinfo[text()='imported'])">
<xf:setvalue ref="instance('page')/edition/operation"
value="instance('wsdl')//wsdl:portType[1]/wsdl:operation[1]/#name" />
<xf:setvalue ref="instance('page')/edition/cdm"
value="if (instance('page')/edition/adapter='') then 'true' else ()" />
<xf:toggle case="edition" />
What is wrong?

CRM 2011: Global JavaScript and button in status bar

I'm not so new in CRM 2011, but I faced with one big problem... I found some solution on net that makes some scoring/ranking system in CRM. I was completely confused when I saw star in top status bar, above ribbon buttons bar, next to username on right corner of screen.
When I click on this button, I open div with some information about users, and scores they have.
Where I can put Java Script function (jQuery for example) that can be executed globally? How to call that function, what event to catch? I need this button/function be active on all pages in CRM like this one.
What is id of that place in top bar? I need it to put this button from my script.
The CRM solution you appear to be talking about is this
This is obviously unsupported.
However they achieve it by adding a dummy button to the ribbon, specifically the Jewel Menu.
This button command is linked to a JS function in a webresource.
The button is always hidden but the JS file is always loaded.
It should be noted that your JS is loaded into Main.aspx (the root document)
From there its a matter of injecting HTML elements or javascript into the desired frame. (Nav or Content)
Here is the RibbonDiffXML to add to a solution.
<CustomAction Id="Dummy.CustomAction" Location="Mscrm.Jewel.Controls1._children" Sequence="41">
<Button Id="Dummy" Command="Dummy.Command" Sequence="50" ToolTipTitle="$LocLabels:Dummy.LabelText" LabelText="$LocLabels:Dummy.LabelText" ToolTipDescription="$LocLabels:Dummy.Description" TemplateAlias="isv" />
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
<CommandDefinition Id="Dummy.Command">
<EnableRules />
<DisplayRule Id="Dummy.Command.DisplayRule.PageRule" />
<JavaScriptFunction Library="$webresource:MyGlobal.js" FunctionName="Anything" />
<TabDisplayRules />
<DisplayRule Id="Dummy.Command.DisplayRule.PageRule">
<PageRule Address="aaaa" />
<EnableRules />
<LocLabel Id="Dummy.Description">
<Title languagecode="1033" description="Description" />
<LocLabel Id="Dummy.LabelText">
<Title languagecode="1033" description="Description" />
This goes in the root ImportExportXml element of the customizations.xml
You may also need to add Application Ribbons as a solution component via the UI