The sample SIP Registrar, Proxy, and Presence services require a location service, as defined by RFC3261 section 10. The location service stores SIP registrations, mapping a user’s public SIP address to actual contact addresses.

Tip If you don’t care how this is done, you can skip this step and use the default location service.

Below are instructions for selecting a location service, specifying an external database for the JDBC location service, and deploying the selected location service,

Selecting Activity Context Naming, JDBC, or Profile location services

The SIP examples include three implementations of the location-service interface, which demonstrate different SLEE features:

  • Activity Context Naming (Default) — stores registration information in memory using null activities, looked up using the SLEE Activity Context Naming Facility. This is deployed by default.

  • JDBC — stores registrations in an external database.

  • Profile — stores registrations in a writeable SLEE 1.1 profile table.

Many other implementations are possible, such as LDAP.

The file specifies the type of location service that build.xml deploys. To select one of the three available implementations, edit, changing the locationservice property:

# The locationservice property should be set to one of "ac", "profile" or "jdbc".
# If undefined or a different value, defaults to "profile".

Using an external database for JDBC

If you select the JDBC location service, you’ll need to select a database other than the default, which uses Rhino’s embedded database (Apache Derby in the SDK and PostgreSQLin the production versions of Rhino).

To select an external database, you need to:


Create a table with the correct schema for the SIP Registrar

The SQL script fragment below demonstrates how to create the table. This works on PostgreSQL and may need to be adjusted to suit your particular database server.

create table registrations (
    sipaddress varchar(80) not null,
    contactaddress varchar(80) not null,
    expiry bigint,
    qvalue integer,
    cseq integer,
    callid varchar(80),
    flowid varchar(80),
    primary key (sipaddress, contactaddress)
COMMENT ON TABLE registrations IS 'SIP Location Service registrations';


Configure the JDBC data source in Rhino

Please see External Databases in the Rhino Administration and Deployment Guide for instructions on setting up an external data source.


Edit the JDBC location service’s deployment descriptor to refer to the new data source

Edit the extension deployment descriptor src/com/opencloud/slee/services/sip/location/jdbc/META-INF/oc-sbb-jar.xml. The data source is specified in the resource-ref element:

Note The res-jndi-name element must refer to a configured data source. See Persistence Instances) for details on configuring persistence resources in Rhino.

Deploy the location service

Warning Normally you do not need to deploy the location service explicitly, since deploying the Registrar, Proxy, or Presence services will automatically deploy the location service as a dependency.

If necessary you can deploy a location service separately using the Ant target deploylocationservice. For example:

$ ant deploylocationservice

This will automatically deploy the location service that you specified in

Undeploy the location service

To undeploy the location service, use the Ant target undeploylocationservice. For example:

$ ant undeploylocationservice
Previous page Next page