Skip Headers
Oracle® Communications Converged Application Server Developer's Guide
Release 5.1

Part Number E27707-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

18 Packaging and Deploying SFT Applications

In order to develop and deploy Converged Application Framework Essentials (SFT) applications, you must package the applications using the configurations described in this chapter.

Structure of a SFT Application

SFT applications consist of the following programming artifacts:

Packaging SFT Applications

SFT applications are packaged in WAR (web archive) files. When deployed with the SFT domain template, the .war extension is recognized and the application is scanned to find SFT annotations. If a SFT specific annotation is found, the SFT framework is enabled.

SFT applications may be packaged in WAR files, or the WAR file may itself be packaged within an Enterprise archive (EAR), similar to a typical Java EE application. This means a SFT application that has been packaged in a WAR may be packaged with Enterprise Bean components, Java Persistence API JARs, and any other Java EE component that is allowed to be packaged in EAR files.

Integrating SFT with SIP Servlets

SFT uses ServletContextListener as the trigger for annotation scanning. This event class handles notifications about changes to the servlet context of the Web application that it is part of. There is one ServletContextListener for each WAR application you deploy. When ServletContextListener intercepts an event, the SFT annotations will be scanned. For each SFT-enabled WAR file, a SIP Servlet is used by the SFT framework. SIP messages from different SIP entities will be received by this SIP Servlet. Example 18-1 illustrates the implementation the ServletContextListener class in a SFT application by declaring it in the sip.xml deployment descriptor.

Example 18-1 Integrating SFT With OCCAS Using SIP.XML

<?xml version="1.0" encoding="UTF-8"?>
<sip-app xmlns:ee="http://java.sun.com/xml/ns/javaee"
         xmlns="http://www.jcp.org/xml/ns/sipservlet"
         version="1.1">
  <app-name>com.oracle.example.test</app-name>
  <servlet>
    <ee:servlet-name>ExampleServlet</ee:servlet-name>
    <ee:servlet-class>com.oracle.SFT.core.Servlet<</ee:servlet-class>
    <ee:load-on-startup>0</ee:load-on-startup>
  </servlet>
 
  <listener>
    <ee:listener-class>
     com.oracle.sft.deployment.SFTContextListener
    </ee:listener-class>
  </listener>
</sip-app>

SFT.XML Deployment Descriptor

You use the sft.xml deployment descriptor to configure SFT applications. Much of the information can be specified programmatically using the @ServiceAttributes annotation. However, this information can also be overridden using the sft.xml deployment descriptor. You can also specify which Java packages the SFT application should scan for annotations, which may improve performance.

Example 18-2 illustrates the use of the annotation-scanning XML elements of the sft.xml deployment descriptor. In this example, the configuration information contained in the service-attributes element overrides the configuration information in the ServiceAttributes annotation. If the annotation-scanning element is present in sft.xml deployment descriptor, it will scan only the listed JAR files and Java packages for SFT annotations.

Example 18-2 Annotation Scanning Using SFT.XML

<SFT-app>
  <service-attributes>
    <domain-proxy>sip:example.proxy.oracle.com:5060</domain-proxy>
    <domain-name>example.com</domain-name>
    <xcap-root>http://example.xdms.oracle.com:8080/xdmserver</xcap-root>
 
    <mediacontrol-jndi-name>mscontrol/dialogic1</mediacontrol-jndi-name>
    <allowed-javaee-modules>*</allowed-javaee-modules>
  </service-attributes>
 
  <annotation-scanning>
    <jars>
      <jar>example1.jar</jar>
      <jar>example2.jar</jar>
    </jars>
    <packages>
      <package>com.oracle.SFT.api</package>
      <package>com.oracle.SFT.api.bean</package>
    </packages>
  </annotation-scanning>
</SFT-app>