Use setAttribute to Modify Session Data in “No-Call” Scope

Requirements and Best Practices for SIP Applications 4-5

4.8 Mark SIP Servlets as Distributable

If you have designed and programmed your SIP Servlet to be deployed to a cluster environment, you must include the distributable marker element in the Servlets deployment descriptor when deploying the application to a cluster of engine tier servers. If you omit the distributable element, WebLogic Server does not deploy the Servlet to a cluster of engine tier servers. If you mark distributable in sip.xml it must also be marked in the web.xml for a WAR file. The distributable element is not required, and is ignored if you deploy to a single, combined-tier non-replicated WebLogic Server instance.

4.9 Use SipApplicationSessionActivationListener Sparingly

The SIP Servlet 1.1 specification introduces SipApplicationSessionActivationListener, which can provide callbacks to an application when SIP Sessions are passivated or activated. Keep in mind that callbacks occur only in a replicated WebLogic Server deployment. Single-server deployments use no SIP data tier, so SIP Sessions are never passivated. Also, keep in mind that in a replicated deployment WebLogic Server activates and passivates a SIP Session many times, before and after SIP messages are processed for the session. This occurs normally in any replicated deployment, even when RDBMS-based persistence is not configured. Because this constant cycle of activation and passivation results in frequent callbacks, use SipApplicationSessionActivationListener sparingly in your applications.

4.10 Session Expiration Best Practices

For a JSR289 application, the container is more intelligent in removing sessions. For example, there is no need to explicity call invalidate on a session or sipappsession. However, if setExpirs is used on a session and the application is of a JSR289 type then that call has no effect unless setInvalidateWhenReadfalse is called on the session.

4.11 Observe Best Practices for Java EE Applications

If you are deploying applications that use other Java EE APIs, observe the basic clustering guidelines associated with those APIs. For example, if you are deploying EJBs you must design all methods to be idempotent and make EJB homes clusterable in the deployment descriptor. 4-6 Oracle WebLogic Server SIP Container Developer’s Guide