Corporation Server User Manual
Programming Guidelines 4-1
4
Programming Guidelines
This chapter describes programming guidelines for SIP Servlet applications in the
following sections:
■ Introduction
■ Marking Applications as Distributable
■ Storing Data in Application Sessions
■ Avoiding Static Data
■ Avoiding Blocking Calls
■ Invalidating the SipApplicationSession and SIPSession
■ Monitoring the Memory Usage
■ Avoiding Storing Shared Resources in Sessions
■ Avoiding Creating Threads
■ Creating B2BUA Applications
Introduction
For an application to take full advantage of OCMS as a JSR 116 SIP Servlet Application
platform, observe the following recommendations.
Marking Applications as Distributable
For stateful applications, that is applications that save state in SipSessions or
SipApplicationSessions, to be highly available in a SIP Application Server cluster, the
sip.xml as well as the web.xml file must contain the <distributable> element. Marking
applications as distributable will make sure that the application and session state is
replicated to cluster nodes that will be able to resume execution of the session in the
event of a failure of a cluster node.
There are performance implications related to how session state is replicated in a
distributable environment. Replication is triggered each time there is a setAttribute()
call on the session object, so large numbers of such calls in a servlet may impact
performance.
For OC4J there are additional requirements if the application is packaged as an
Enterprise Archive. See the Oracle Communication and Mobility Server Administration
Guide for details.