Developing Sailfin CAFE Application with Netbeans is easier then ever. Resolve dependencies and build the project without any hassles.

Here's a quick guide to it:

- Create a new Netbeans project : File --> New Project
- In maven category, choose Maven Web Application, you will get the following window:


click finish to create a project.
- Right click on mavenproject1 - Source Packages and select new -> Java Class, to create a new Java Class.
- Make the class as CAFE CommunicationBean, by adding the following annotation:

@CommunicationBean
public class NewClass {
}

- For resolving the missing dependency, select the tooltip next to @CommunicationBean annotation and click on Search Dependency at maven repositories.

searching maven dependency

- the following suggestion box will appear, select cafe-communication-api and select Add.

select cafe-communication-api

- Save the project, click on the tooltip next to @CommunicatioBean and select import org.glassfish.cafe.api.bean.CommunicationBean

- Build the project and your CAFE Application is ready !!

- Steps to install and run the App:

  • Download and install latest SailFin V2 promoted build.
  • Download and install latest SailFin CAFE build.
  • Start SailFin and deploy the application. (eg: asadmin deploy mavenproject1.war)
  • Register two SIP phones with the help of steps mentioned here.
  • Click on Alice's phone and type "bob@example.com". Then click on green dial button. The bob's phone is ringing !!
  • Comments:

    For compiling the project, you may need to add the following to your settings.xml or pom.xml between the tags <repositories>

    <repository>
    <id>maven2-repository.dev.java.net</id>
    <name>Java.net Repository for Maven</name>
    <url>http://download.java.net/maven/2/</url>
    <layout>default</layout>
    </repository>

    Posted by Mohit Gupta on November 23, 2009 at 03:39 AM PST #

    Post a Comment:
    • HTML Syntax: NOT allowed

    This blog copyright 2010 by Mohit Gupta