Sun GlassFish Communications Server 2.0 版本說明

getLastAccessedTime 方法未提供精確的結果 (問題 1351)

說明

SIP 階段作業的 getLastAccessedTime 方法並不會提供精確的結果。

解決方案

需要精確追蹤 lastAccessedTime 的應用程式必須自行將其儲存到 SipApplicationSession 之中。

synchronized (sas) {
	Long last = (Long) sas.getAttribute("myLastAccessedTime");
	if (last == null) {last = 0};
	// do something with the last one
	// and...
	// set the new one.
	sas.setAttribute("myLastAccessedTime", System.currentTimeMillis());
}