Servlet applications may also use any library components deployed in the SLEE.

Like RA type bindings, library bindings are declared using annotations on a package within the application:

@SleeLibraries({
        @LibraryReference(library = @ComponentId(name = "guava", vendor = "com.google.guava", version = "17.0")),
        @LibraryReference(library = @ComponentId(name = "protobuf-java", vendor = "com.google.protobuf", version = "2.5.0")),
})
package com.example.app;

import com.opencloud.sipservlet.slee.annotation.*;
import javax.slee.annotation.*;

Here the application has declared a dependency on two other libraries. These libraries must be deployed in the SLEE before the servlet application can deploy.

Note Use of SLEE libraries is purely optional; servlet applications can also just put their dependencies in
WEB-INF/lib in their SAR file. SLEE libraries may be useful if they are shared by many applications on the same SLEE platform.
Previous page Next page