merged commit from zhfeng https://github.com/zhfeng/jboss-as/commit/99bcfe007979da4cb3b3d21eb632806a1b97ec5c