Friday, December 5, 2014

Pitfalls running E11 as embedded SWT browser in Eclipse

Recently I implemented a preview view for an Xtext DSL that uses an embedded jetty and renders a JSF screen without deployment. To make bidirectional navigation possible from Xtext to JSF and the other way round, I decided to use websockets. That worked pretty well since I am working on a mac, but when the customer tried to used it the application did not work at all because of Windows and IE11.

First of all there is a bug that runs IE in compatibility mode to IE9 that does not have websockets integrated. :-( After switching to Luna 4.4.1 it worked until the next bomb exploded. After exactly 6 reloads the browser raised a Security Error when someone starts to establish a websocket connection... That is because IE11 and below do not really close a websocket implicitly when a page is reloaded or closed as it happens in "modern" browsers automatically. The number of connections that are allowed is hard coded deep inside the registry. BTW I hate that registry stuff sooooo much.... After closing the websockets explicitly everything works as expected even within Windows 8.1 and IE11. The whole story took me 2 full days ... Why the hell does Microsoft always do things different in their Internet Explorer. Luckily I do not have to work with that environment sooo often.