Personally I think it is better not to notify user about session expiration comming soon. I assume that if user has open window then his session should be extended. To do that i have a4j:poll with interval shorter by one minute from session timeout.
If the user has an open window and leaves his desk, you would not want to extend the timeout because that would create a security problem.
The point of the notification is that if he is sitting at his desk and he does something else (talks on phone) for longer than the JBoss timeout, he should be notified in case he wants to keep working on his application later.
I found a client side plugin to do this writen for JQuery and you are helping me in another thread (Thanks!)