Sun GlassFish Communications Server 1.5 Release Notes

getLastAccessedTime method does not provide accurate results (Issue 1351)

Description

The getLastAccessedTime method of a SIP session does not provide accurate results.

Solution

Applications that need to keep accurate track of the lastAccessedTime must store it themselves into the 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());
}