Before an RA can be used, the application must declare a binding to an RA type.


A resource adaptor type (RA type) is a SLEE component that specifies the interface between an RA and SLEE applications. It defines:

  • the event types that may be fired by the RA

  • the types of activities created by the RA

  • the RA interface (a Java interface) that applications may call to use the RA

  • the activity context interface factory interface (see below).

When an application declares a binding to an RA type, Rhino ensures that the RA type’s classes (and their dependencies) are available in the application’s classloader, and any interfaces provided by the RA type are bound into JNDI at locations specified by the application in the binding.

The same RA type may be implemented by more than one RA, and there may also be more than one instance of an RA (RA entity in SLEE terms) deployed at a time. For example, there may be multiple HTTP RA entities deployed, each listening on a different port. So the the application’s RA type binding can also specify which RA entity (or entities) it wants to use.

Package declaration for an application

To declare an RA type binding, a servlet application uses the @SleeRATypes annotation on a package. RA Type bindings apply to the entire application, so it makes sense to annotate the same package where @SipApplication is declared (if using SIP Servlet annotations), or the top-level package of the application. The @SleeRATypes must only be specified on one package in the application.

Here is the package declaration for an example application:
@SipApplication(name = "example", mainServlet = "main-servlet")
    @RATypeBinding(raType = @ComponentId(name = "HTTP", vendor = "OpenCloud", version = "2.2"),
        activityContentInterfaceFactoryName = "slee/resources/http/acifactory",
        resourceAdaptorEntityLink = "slee/resources/http",
        resourceAdaptorObjectName = "slee/resources/http/provider")

import com.opencloud.sipservlet.slee.annotation.SleeRATypes;
import javax.servlet.sip.annotation.SipApplication;
import javax.slee.annotation.*;

Here the application is declaring a binding to the OpenCloud HTTP 2.2 RA type. This is an actual RA type, and is included with the example application in examples/http-example/. The various elements that make up the binding are:


This annotation is the "container" for one or more @RATypeBinding elements. If an application uses several RA types, then they must all be defined inside a single @SleeRATypes element. Order is not significant.


The start of an RA type binding declaration.

raType = @ComponentId(name = "…​", vendor = "…​", version = "…​")

This attribute specifies the RA type’s component ID, a triple of name, vendor, and version strings. All SLEE components are identified in this way. At deploy time, this must match an RA type that is deployed in the SLEE.

activityContentInterfaceFactoryName = "…​"

Optional. This attribute specifies the JNDI object name for the RA type’s activity context interface factory interface. This is required if the application wants to attach to activities created by an RA, which is often the case. See [7.4 Activities and Activity Contexts].

resourceAdaptorEntityLink = "…​"

Optional. Identifies the link name of an RA entity. This is a reference to an RA entity deployed in the SLEE. The link name may be anything, but must be configured (using SLEE management commands) to point to an actual RA entity in the SLEE before the application is deployed.

resourceAdaptorObjectName = "…​"

Optional. This attribute specifies the JNDI object name for the RA interface provided by the RA entity linked to as above. This object implements the RA interface as defined by the RA type.

Previous page Next page