Developing Sailfin CAFE Applications using Netbeans

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 22, 2009 at 07:39 PM PST #

    Post a Comment:
    • HTML Syntax: NOT allowed
    About

    Mohit Gupta

    Search

    Categories
    Archives
    « July 2014
    SunMonTueWedThuFriSat
      
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
      
           
    Today