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