Sun GlassFish Communications Server 2.0 Developer's Guide

SIP Session Limitation

The following JSR 289 API methods are not fully supported in a clustered environment:

javax.servlet.sip.SipSessionsUtil.getApplicationSessionById(String applicationSessionId)
javax.servlet.sip.SipSessionsUtil.getApplicationSessionByKey(String applicationSessionKey, 
boolean create)

If the session is not located in the server instance where the method is executed, these methods return a null result.

If a SIP application session contains application data that must be accessed from anywhere in the cluster, the application should store that data in a database, using the SIP application ID as the key. This makes the data easily accessible from JMS handlers, EJB components, or similar entities whose distribution in the cluster is not correlated with the distribution of SIP application sessions.