• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011

CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011






Total Views
Views on SlideShare
Embed Views



38 Embeds 1,384

http://ivelinivanov.blogspot.com 912
http://ivelinivanov.blogspot.fr 61
http://ivelinivanov.blogspot.in 57
http://ivelinivanov.blogspot.co.uk 53
http://ivelinivanov.blogspot.ca 37
http://ivelinivanov.blogspot.de 32
http://ivelinivanov.blogspot.ro 26
http://ivelinivanov.blogspot.com.es 24
http://ivelinivanov.blogspot.cz 20
http://ivelinivanov.blogspot.it 18
http://ivelinivanov.blogspot.ru 14
http://ivelinivanov.blogspot.com.br 10
http://ivelinivanov.blogspot.be 9
http://ivelinivanov.blogspot.gr 8
http://ivelinivanov.blogspot.com.au 8
http://ivelinivanov.blogspot.mx 8
http://ivelinivanov.blogspot.fi 8
http://ivelinivanov.blogspot.pt 7
http://translate.googleusercontent.com 7
http://ivelinivanov.blogspot.co.nz 6
http://ivelinivanov.blogspot.com.ar 6
http://ivelinivanov.blogspot.kr 5
http://ivelinivanov.blogspot.no 5
http://ivelinivanov.blogspot.ch 5
http://ivelinivanov.blogspot.co.at 5
http://ivelinivanov.blogspot.sk 5
http://ivelinivanov.blogspot.ie 4
http://ivelinivanov.blogspot.tw 4
http://ivelinivanov.blogspot.ae 4
http://ivelinivanov.blogspot.hk 3
http://ivelinivanov.blogspot.nl 3
http://ivelinivanov.blogspot.se 3
http://ivelinivanov.blogspot.co.il 2
http://ivelinivanov.blogspot.sg 1
http://ivelinivanov.blogspot.hu 1
http://ivelinivanov.blogspot.jp 1 1
http://ivelinivanov.blogspot.com.tr 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011 CDI Telco Framework & Arquillian presentation at Mobicents Summit, Sochi 2011 Presentation Transcript

    • 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 FrameworkCTF Beanpublic class SimpleSipServlet { @Inject private SipFactory sipFactory; protected void doInvite(@Observes @Invite SipServletRequest req) { ... } protected void doSuccessResponse(@Observes @SuccessResponse SipServletResponse resp){ ... }}
    • CDI Telco Frameworkpublic class SimpleSipServlet { @Inject SipRegistarComponent sipRegistar; @Inject javax.enterprise.event.Event<String> event; protected void doRegister(@Observes @Register SipServletRequest req) { sipRegistar.doRegister(req); event.fire("Received Register event"); }}
    • 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 container<container qualifier="mss-tomcat-embedded-6" default="true" mode="manual"> <configuration> <property name="tomcatHome">target/mss-tomcat-embedded-6</property> <property name="workDir">work</property> <property name="bindHttpPort">8888</property> <property name="unpackArchive">true</property> <property name="sipConnectors">:5070,:5070/TCP</property> <property name="bindAddress"></property> <property name="sipApplicationRouterProviderClassName">org.mobicents.servlet.sip.router.DefaultApplicationRouterProvider</property> </configuration> </container>
    • MSS Arquillian container@RunWith(Arquillian.class)public class ShootistSipServletTest extends SipTestCase{@Deployment(name="simpleArchive", managed=false) public static WebArchive createTestArchive(){ WebArchive webArchive = ShrinkWrap.create(WebArchive.class," shootistsipservlet.war"); webArchive.addClasses(ShootistSipServlet.class); webArchive.addAsWebInfResource("in-container-sip.xml", "sip.xml"); return webArchive; }
    • MSS Arquillian container @Test @ContextParam(name="cancel", value="true") public void testShootist() throws Exception { SipStackTool sipStackTool = new SipStackTool(); receiver = sipStackTool.initializeSipStack(SipStack.PROTOCOL_UDP,"", "5080", ""); sipPhone = receiver.createSipPhone("", SipStack.PROTOCOL_UDP, 5070, "sip:LittleGuy@there.com"); sipCall = sipPhone.createSipCall(); sipCall.listenForIncomingCall(); deployer.deploy("simpleArchive"); assertTrue(sipCall.waitForIncomingCall(timeout)); assertTrue(sipCall.sendIncomingCallResponse(Response.TRYING," Trying", timeout));
    • 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
    • ContactGeorge Vagenasgvagenas@gmail.comThank you