CDI Telco Framework and Aquillian to the Sip Servlets platform Annual Mobicents Community Summit Sochi-Russia, December 4-9, 2011George VagenasCDI Telco Framework project lead
Agenda● CDI Telco Framework ○ Few words about CDI JSR-299 ○ CTF Introduction ○ Examples ○ Sip Servlets 2.0● Sip Servlets Arquillian Container ○ Introduction to Arquillian ○ MSS Arquillian container ○ Examples
CDI Telco FrameworkCDI JSR299, is the Java standard for dependency injection andcontextual lifecycle management. The CDI services provide:● an improved lifecycle for stateful objects, bound to well- defined contexts● a typesafe approach to dependency injection● object interaction via an event notification facility
CDI Telco FrameworkCTF brings the power and productivity benefits of CDI intothe Mobicents Sip Servlets platform providing dependencyinjection and contextual lifecycle management forconverged HTTP/SIP applications.Mission Statement ● Simplify SipServlets development by introducing a clean programming model ● Extensibility is a major concern ● The framework will stand as an extension to the CDI core, thus making integration with other Java EE 6 technologies a breezeProjects home: CDI Telco Framework
CDI Telco Framework
CDI Telco FrameworkBenefits● Loose coupling with strong typing● Portable extensions● Reusable components● Enhanced event notifications mechanism● Out of the box integration with the rest of the Java EE ecosystem
CDI Telco FrameworkCurrent State and future plansCurrenlty CTF Core in Alpha version providing● Injection of Sip Servlet tools● Sip Event notification mechanismWhats coming next● Provide extensions with high level abstraction components● Integration with Media Server
CDI Telco FrameworkResources● CDI-Telco-Framework web site - http://www.mobicents.org/mss/ctf/mss-ctf.html● CDI-Telco-Framework introduction & Click2Call Example- http://blog.devrealm. org/2011/04/19/cdi-telco-framework/● CDI-Telco-Framework documentation - http://docs.jboss. org/mobicents/frameworks/ctf/1.0.0.ALPHA1/user_guide/en-US/html_single/
CDI Telco FrameworkSip Servlets 2.0The new JSR proposal for Sip Servlets 2.0 aims forenhancements and simplifications over the existing API.CDI Telco Framework could be a candidate technology tobe adopted in the new specification since the simplifiedprogramming model and the extensibility of the frameworkwill foster innovation and bring new ideas to thetechnology.
MSS Arquillian containerArquillian testing framework, seeks to minimize the burdenon the developer to author integration tests by handling allaspects of test execution, including:● managing the lifecycle of the container (start/stop),● bundling the test class with dependent classes and resources into a deployable archive,● enhancing the test class (e.g., resolving @Inject, @EJB and @Resource injections),● deploying the archive to test (deploy/undeploy) and capturing results and failures.
MSS Arquillian containerMobicents brings the Sip Servlets Arquilliancontainer for testing converged applications.● Container is based on Tomcat 6.x● Using SipUnit as SIP client ○ We are collaborating with CafeSip developers on the SipUnit project in order to provide new features, fix bugs etc.
MSS Arquillian containerExtras● Annotations ○ @ContextParam ○ @ContextParamMap ○ @ConcurrencyControlMode● Helper classes ○ ContextParamTool ○ SipStackTool● Lifecycle extension to provide finer grained control over containers and tests lifecycle
MSS Arquillian container● Finer grained control over the tests lifecycle and the containers lifecycle● Override container configuration as needed● The integration is completely transparent, which means you can launch the tests and get the test results using existing IDE, Ant and Maven test plugins without any add-ons.
MSS Arquillian container● CTF can be optionally enabled in order to enrich the test or the test archive.● On the same test we can have ○ Multiple test archives ○ Multiple container configuration
MSS Arquillian containerWhat comes next:● Will be released soon in order to get community feedback for missing features or bugs● Work on a Tomcat 7.x based container● Mobicents Sip Servlets testsuite will migrate to the new container