Nuxeo 5

Nuxeo 5 Component
org.nuxeo.ecm.platform.api.PlatformService

Individual Documentation Coverage

done proportion
100.0 %


A service defining the platform services and repositories to be exposed to
the client




Author: Bogdan Stefanescu

Version: missing

Location: nuxeo-services/nuxeo-platform-api/src/main/resources/OSGI-INF/PlatformService.xml

Require

No requirements

Required by

Not required

Implementation


Extension Points:

servers


Define an extension point to register new platform servers. Platform
servers are parts of the same application that are deployed on different
JVMs

Each server may expose a set of services and repositories.

Exposed services are defined as bindings between the service class and a
JNDI name where the service (bean service) can be located remotely. If the
client try to get a service not defined by any server the platform will
try to lookup it using the local NXRuntime.

The extension should use the format:

        <server host="localhost" jndiContextFactory="org.nuxeo.ecm.platform.api.DefaultJndiContextFactory" jndiPrefix="nuxeo/" jndiSuffix="/remote" name="core" port="1099" repositoryConnector="org.nuxeo.ecm.platform.api.DefaultRepositoryConnector" serviceConnector="org.nuxeo.ecm.platform.api.DefaultServiceConnector">
          <service class="org.nuxeo.ecm.platform.type.TypeManager" jndiName="%TypeManager" private="false" />
          ...
          <repository connector="connectorClass" description="A description" name="demo" />
          ...
        </server>


All attributes other than name are optional and have as default values the
values in the example above. The host attribute is optional only if you
are contributing new service and repository bindings to a server delcared
by other bundle.



  • The jndiSuffix and jndiPrefix are used to generate the final JNDI name
    if the specified jndiName begins with a %. In this case the final JNDI
    name will be computed as follow: jndiPrefix+jndiName+jndiSuffix where
    jndiname is the specified name without the % character.


  • The jndiContextFactory is used to create the JNDI InitialContext. By
    default a JNP INitialContext is created

  • host and port represents the JNDI server host and port


  • The connector classes are used to lookup and connect to services and/or
    repositories exposed by the server



A repository is defined by an unique name in the system, a connector class
and a description suitable to be displayed in an UI. The connector is
optional and the default one is
org.nuxeo.ecm.platform.api.DefaultRepositoryConnector

The private attribute of a service means that rthe service is intentended
to be of internal use for the container server. Such services are not
exposed by the platform to the client. So ECM.getPlatform().getService(..)
for such a service will return null.

For example private services can be used to access repositories
(SoreSession services). CoreServices are never used directly - buit only
in a repository session conetxt. So it is used internally by the server to
create repository sessions and it is not exposed to the outside. This is
also may avoid conflicts when several servers expose the same service. You
can make all services private and only the needed one public.



Has contribution from:

Last generation: 18:21:25 CEST 11/07/2009