@Version(value="3.1.0")
See: Description
Interface | Description |
---|---|
RemoteAdapterFactory | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
Class | Description |
---|---|
ServerAdapterFactory | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerEventCollection | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerEventCollection.ServerEvent |
Server side implementation of the
RemoteEvent interface. |
ServerItem | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerItemDefinition | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerLock | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerLockManager | Deprecated |
ServerNamespaceRegistry | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerNode | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerNodeDefinition | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerNodeType | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerNodeTypeManager | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerObject | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerObservationManager | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerProperty | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerPropertyDefinition | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerQuery | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerQueryManager | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerQueryResult | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerRepository | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerRow | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerSession | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerVersion | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerVersionHistory | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerVersionManager | Deprecated |
ServerWorkspace | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
ServerXASession | Deprecated
RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.
|
This package contains the default server implementation of the transparent JCR-RMI layer. The classes in this package can be used to make a local JCR repository available as an RMI service. In addition, this package offers a straightforward mechanism for extending or modifying the behaviour of the server layer.
The contents of this package is designed using two design patterns, Factory and Adapter. All the remotely accessible ServerObject subclasses implement the Adapter pattern to adapt a local JCR interface to the corresponding remote JCR-RMI interface. The Factory pattern is used to centralize the creation and configuration of all adapter instances.
Setting up the server part of the JCR-RMI layer is quite straightforward. After instantiating a local JCR repository you need to wrap it into a remote adapter and create an RMI binding for the repository. A variation of the following code is usually all that is needed in addition to the standard RMI setup (starting rmiregistry, etc.):
Repository repository = ...; // The local repository String name = ...; // The RMI URL for the repository RemoteAdapterFactory factory = new ServerAdapterFactory(); RemoteRepository remote = factory.getRemoteRepository(repository); Naming.bind(name, remote); // Make the RMI binding using java.rmi.Naming
The Factory pattern used by this package makes it easy to extend the behaviour of the JCR-RMI server. Such changes in behaviour or policy can be implemented by modifying or replacing the default ServerAdapterFactory used in the example above.
The following example code adds transparent logging of all session logins and logouts:
Repository repository = ...; // The local repository String name = ...; // The RMI URL for the repository RemoteAdapterFactory factory = new ServerAdapterFactory() { public RemoteSession getRemoteSession(Session session) throws RemoteException { System.out.println("LOGIN: " + session.getUserId()); return new ServerSession(session, this) { public void logout() { System.out.println("LOGOUT: " + session.getUserId()); super.logout(); } }; } }; RemoteRepository remote = factory.getRemoteRepository(repository); Naming.bind(name, remote); // Make the RMI binding using java.rmi.Naming
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.