Wednesday, October 13, 2010

Windows 7 Wireless Crash

According to Microsoft:

“This issue tends to occur when you select a Wireless LAN from 5 or more access points. (…) This problem occurs because the message handling for Wireless connection is not fast enough and causes overflow in the message queue,”


Here is the official bug report on Microsoft's website:
http://support.microsoft.com/kb/979244/

However, they don't mention any realy solutions, other than to move your computer away from too many wireless access points. Not a real solution at all.

One user reported in detail the pain he went through and the solution he used to get it working:
http://blogs.techrepublic.com.com/window-on-windows/?p=2342

The solution?
Disable IPv6

Lazy Loading with Java's InvocationHandler

To make the most of performance, we typically don't want to eagerly load everything on a DAO Transfer object. We can use Java's InvocationHandler to proxy method calls. Here's a good read on how to do it:

http://blog.frankel.ch/the-power-of-proxies-in-java

Wednesday, October 6, 2010

AJAX and accessing DIV elements

In Firefox I encountered a strange problem when using AJAX to access DIV elements.
I was using a timer to repetitively access a DIV element as follows:

Javascript:
var statusEl = document.getElementById('status');
alert('statusEl'+statusEl);
HTML:
<div id="status" />


On the first timed interval, firefox has no problem finding the element and the alert identifies it as an HTMLElement object. But upon subsequent timed intervals, the alert begins to report the statusEl as null!! Very strange indeed.

Solution:

The solution ended up being to change from <div id="status" />
to <div id="status"></div>

Tuesday, October 5, 2010

Differentiating objects in Java

Use System.identityHashCode(obj) to differentiate objects in java