| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<component name="org.nuxeo.ecm.platform.api.PlatformService" version="1.0"> |
|---|
| 4 |
<documentation> |
|---|
| 5 |
A service defining the platform services and repositories to be exposed to |
|---|
| 6 |
the client |
|---|
| 7 |
|
|---|
| 8 |
@author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> |
|---|
| 9 |
</documentation> |
|---|
| 10 |
|
|---|
| 11 |
<implementation class="org.nuxeo.ecm.platform.api.PlatformService" /> |
|---|
| 12 |
|
|---|
| 13 |
<extension-point name="servers"> |
|---|
| 14 |
<documentation> |
|---|
| 15 |
Define an extension point to register new platform servers. Platform |
|---|
| 16 |
servers are parts of the same application that are deployed on different |
|---|
| 17 |
JVMs |
|---|
| 18 |
<p /> |
|---|
| 19 |
Each server may expose a set of services and repositories. |
|---|
| 20 |
<p /> |
|---|
| 21 |
Exposed services are defined as bindings between the service class and a |
|---|
| 22 |
JNDI name where the service (bean service) can be located remotely. If the |
|---|
| 23 |
client try to get a service not defined by any server the platform will |
|---|
| 24 |
try to lookup it using the local NXRuntime. |
|---|
| 25 |
<p /> |
|---|
| 26 |
The extension should use the format: |
|---|
| 27 |
<code> |
|---|
| 28 |
<server name="core" host="localhost" port="1099" jndiPrefix="nuxeo/" |
|---|
| 29 |
jndiSuffix="/remote" |
|---|
| 30 |
jndiContextFactory="org.nuxeo.ecm.platform.api.DefaultJndiContextFactory" |
|---|
| 31 |
serviceConnector="org.nuxeo.ecm.platform.api.DefaultServiceConnector" |
|---|
| 32 |
repositoryConnector="org.nuxeo.ecm.platform.api.DefaultRepositoryConnector"> |
|---|
| 33 |
|
|---|
| 34 |
<service class="org.nuxeo.ecm.platform.type.TypeManager" |
|---|
| 35 |
jndiName="%TypeManager" private="false" /> |
|---|
| 36 |
... |
|---|
| 37 |
<repository name="demo" connector="connectorClass" |
|---|
| 38 |
description="A description" /> |
|---|
| 39 |
... |
|---|
| 40 |
</server> |
|---|
| 41 |
</code> |
|---|
| 42 |
All attributes other than name are optional and have as default values the |
|---|
| 43 |
values in the example above. The host attribute is optional only if you |
|---|
| 44 |
are contributing new service and repository bindings to a server delcared |
|---|
| 45 |
by other bundle. |
|---|
| 46 |
<p /> |
|---|
| 47 |
<li> |
|---|
| 48 |
The jndiSuffix and jndiPrefix are used to generate the final JNDI name |
|---|
| 49 |
if the specified jndiName begins with a %. In this case the final JNDI |
|---|
| 50 |
name will be computed as follow: jndiPrefix+jndiName+jndiSuffix where |
|---|
| 51 |
jndiname is the specified name without the % character. |
|---|
| 52 |
</li> |
|---|
| 53 |
<li> |
|---|
| 54 |
The jndiContextFactory is used to create the JNDI InitialContext. By |
|---|
| 55 |
default a JNP INitialContext is created |
|---|
| 56 |
</li> |
|---|
| 57 |
<li>host and port represents the JNDI server host and port</li> |
|---|
| 58 |
<li> |
|---|
| 59 |
The connector classes are used to lookup and connect to services and/or |
|---|
| 60 |
repositories exposed by the server |
|---|
| 61 |
</li> |
|---|
| 62 |
<p /> |
|---|
| 63 |
A repository is defined by an unique name in the system, a connector class |
|---|
| 64 |
and a description suitable to be displayed in an UI. The connector is |
|---|
| 65 |
optional and the default one is |
|---|
| 66 |
org.nuxeo.ecm.platform.api.DefaultRepositoryConnector |
|---|
| 67 |
<p /> |
|---|
| 68 |
The private attribute of a service means that rthe service is intentended |
|---|
| 69 |
to be of internal use for the container server. Such services are not |
|---|
| 70 |
exposed by the platform to the client. So ECM.getPlatform().getService(..) |
|---|
| 71 |
for such a service will return null. |
|---|
| 72 |
<p /> |
|---|
| 73 |
For example private services can be used to access repositories |
|---|
| 74 |
(SoreSession services). CoreServices are never used directly - buit only |
|---|
| 75 |
in a repository session conetxt. So it is used internally by the server to |
|---|
| 76 |
create repository sessions and it is not exposed to the outside. This is |
|---|
| 77 |
also may avoid conflicts when several servers expose the same service. You |
|---|
| 78 |
can make all services private and only the needed one public. |
|---|
| 79 |
</documentation> |
|---|
| 80 |
|
|---|
| 81 |
<object class="org.nuxeo.ecm.platform.api.ServerDescriptor" /> |
|---|
| 82 |
</extension-point> |
|---|
| 83 |
|
|---|
| 84 |
</component> |
|---|