Oracle Server E10293-02 ユーザーズマニュアル

ページ / 108
SIP Servlets in OCMS
2-20  Oracle Communication and Mobility Server Developer’s Guide
Protocol Sessions
The SIP Servlet specification infers that other protocol sessions, such as HTTP, can be 
placed in the same SIP Application Session. However, OCMS currently supports only 
the SIP protocol.
Extended doRequest Methods
The OCMS SCE wizard offers a doPublish() method. The wizard extends the 
doRequest
 methods by also dispatching the SIP PUBLISH request (RFC 3903).
For request handling, the doPublish() method is used for SIP PUBLISH requests.
.
Asynchronous Send
In OCMS, the send() method on a SipServletRequest never throws an 
IOException
. The container posts the request on a send queue and returns it 
successfully. If the send operation later fails, a final response will be generated by the 
container. Failure in a DNS lookup returns 408 (Request Timeout) or for other types of 
failures, a 500 (Server Internal Error).
Multi-Threading
In OCMS, a servlet runs in a multi-threaded environment and multiple servlets may 
have access to the same session object at the same time. The request and responses use 
an available thread from the thread pool of the container. Therefore the developer may 
be responsible for synchronizing access to sessions and their resources if required by 
the application logic.
Sip Servlet API Javadoc
The Javadoc can be downloaded from the jcp.org Web page, 
http://jcp.org/
 
aboutJava/communityprocess/final/jsr116/index.html
When the download of the zip file is complete, you can update the Javadoc location in 
Eclipse to include the new location of the Javadoc. 
External Access to SIP Servlets
To enable convergent applications between SIP and HTTP, the OCMS Container 
allows you to get access to the javax.servlet.sip.SipFactory by looking it up 
through JNDI. The SIP Factory will be registered under the same name as the display 
name of your SIP servlet as illustrated in 
. The <display-name> in the 
sip.xml in this case must be "My sip app".
Example 2–12  Accessing the Data for a SIP Session through JNDI
InitialContext ic = new InitialContext();
SipFactory sipFactory = (SipFactory)ic.lookup("sip/My sip app");
Note: 
This does not prevent you from creating converged SIP and 
HTTP applications. Please refer to Oracle Communication and 
Mobility Server documents on Oracle Technology Network 
(http://www.oracle.com/technology/index.html) for examples.