You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by ni...@apache.org on 2008/12/10 06:11:41 UTC
svn commit: r724975 [6/7] - in
/incubator/river/jtsk/skunk/niclas1/services/norm: ./ src/ src/main/
src/main/java/ src/main/java/com/ src/main/java/com/sun/
src/main/java/com/sun/jini/ src/main/java/com/sun/jini/norm/
src/main/java/com/sun/jini/norm/ev...
Added: incubator/river/jtsk/skunk/niclas1/services/norm/src/main/java/com/sun/jini/norm/package.html
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/norm/src/main/java/com/sun/jini/norm/package.html?rev=724975&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/norm/src/main/java/com/sun/jini/norm/package.html (added)
+++ incubator/river/jtsk/skunk/niclas1/services/norm/src/main/java/com/sun/jini/norm/package.html Tue Dec 9 21:11:39 2008
@@ -0,0 +1,1725 @@
+<!--
+ ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements. See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership. The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License. You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+
+
+</head>
+<body bgcolor="white">
+
+Provides implementations of {@link net.jini.lease.LeaseRenewalService}.
+Three implementations are available for use with the {@link
+com.sun.jini.start} package:
+
+<ul>
+
+ <li><code>com.sun.jini.norm.ActivatableNormServerImpl</code> - an
+ activatable, persistent implementation, suitable for use with
+ {@link com.sun.jini.start.SharedActivatableServiceDescriptor}
+
+ <li><code>com.sun.jini.norm.PersistentNormServerImpl</code> - a
+ non-activatable, persistent implementation, suitable for use with
+ {@link com.sun.jini.start.NonActivatableServiceDescriptor}
+
+ <li><code>com.sun.jini.norm.TransientNormServerImpl</code> - a
+ transient implementation, also suitable for use with
+ <code>NonActivatableServiceDescriptor</code>
+
+</ul>
+<p>
+
+ The JAR file <code>norm.jar</code>, included in the <code>lib</code>
+ subdirectory of the Apache River release installation,
+ contains the classes for the three Norm service implementations. The
+ <code>norm-dl.jar</code> and <code>jsk-dl.jar</code> files in the
+ <code>lib-dl</code> subdirectory contain the classes needed in the codebase for
+ its downloaded proxies. None of these JAR files include classes from
+ <code>jsk-platform.jar</code>, which are included by the service starter's
+ <code>start.jar</code> JAR file, and need to be included in the codebase of
+ clients.
+
+<p>
+
+ The object returned by the {@link net.jini.admin.Administrable#getAdmin
+ Administrable.getAdmin} method on a Norm service proxy implements {@link
+ net.jini.admin.JoinAdmin} and {@link com.sun.jini.admin.DestroyAdmin}.
+
+<p>
+
+ This document provides the following information about Norm:
+<ul>
+
+ <li><a href="#configuration">Configuring Norm</a>
+ <li><a href="#access_control">Access Control Permission Targets</a>
+ <li><a href="#logging">Logging</a>
+ <li><a href="#examples">Examples for Running Norm</a>
+
+</ul>
+<p>
+
+ <a name="configuration">
+ <h2>Configuring Norm</h2>
+ </a>
+
+ The Norm service implementation obtains its configuration by calling
+ {@link net.jini.config.ConfigurationProvider#getInstance(String[],
+ ClassLoader) ConfigurationProvider.getInstance} with the specified
+ <i>configOptions</i> and the class loader for the implementation
+ class.
+<p>
+
+ The implementation supports the following configuration entries, with
+ component <code>com.sun.jini.norm</code>:
+
+<p>
+
+<table summary="Describes the activationIdPreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ activationIdPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The proxy preparer for the service's activation
+ ID. The value should not be <code>null</code>. This entry is
+ obtained at service start and restart. This entry is only used by
+ the activatable implementation. <p>
+
+ Clients call the {@link java.rmi.activation.ActivationID#activate
+ activate} method on instances of {@link
+ java.rmi.activation.ActivationID} when they need to reactivate the
+ service.
+</table>
+
+<table summary="Describes the activationSystemPreparer configuration
+ entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ activationSystemPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The proxy preparer for the proxy for the
+ activation system. The value should not be <code>null</code>. This
+ entry is obtained at service start and restart. This entry is only
+ used by the activatable implementation. <p>
+
+ The service calls the {@link
+ java.rmi.activation.ActivationSystem#unregisterObject
+ unregisterObject} method on the {@link
+ java.rmi.activation.ActivationSystem} when the service is
+ destroyed.
+</table>
+
+<a name="discoveryManager"></a>
+<table summary="Describes the discoveryManager configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ discoveryManager</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.discovery.DiscoveryManagement}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td>
+<pre>
+new {@link net.jini.discovery.LookupDiscoveryManager}(
+ {@link net.jini.discovery.DiscoveryGroupManagement#NO_GROUPS},
+ null, // locators
+ null, // listener
+ this) // config
+</pre>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Supplies an object used to discover the lookup
+ services with which this service should register. The value should
+ not be <code>null</code>. The object returned must also implement
+ {@link net.jini.discovery.DiscoveryGroupManagement} and {@link
+ net.jini.discovery.DiscoveryLocatorManagement}, and should be
+ configured initially to discover no groups or specific lookup
+ services. This entry is obtained at service start and restart.
+</table>
+
+<table summary="Describes the initialLookupAttributes configuration
+ entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ initialLookupAttributes</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>{@link net.jini.core.entry.Entry}[]</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>null</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Entries to include in the set of attributes the
+ service supplies when registering with lookup services, in
+ addition to {@link net.jini.lookup.entry.ServiceInfo} and {@link
+ com.sun.jini.lookup.entry.BasicServiceType} instances provided by
+ the service. An empty array or <code>null</code> specifies that
+ only the service-provided attributes should be added. The array
+ must not contain <code>null</code> elements. This entry is
+ obtained and used when the service is first started. Following
+ initial startup, the set of attributes is controlled though the
+ service's {@link net.jini.admin.JoinAdmin} administrable
+ interface.
+</table>
+
+<table summary="Describes the initialLookupGroups configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ initialLookupGroups</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>String[]</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>new String[] { "" } /* public group */</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The names of the lookup groups that the service
+ should discover and join. An empty array specifies that no groups
+ should be joined. A <code>null</code> value specifies that all
+ groups should be joined. Otherwise, the value specifies the names
+ of the groups to join. The array must not contain
+ <code>null</code> elements. This entry is obtained and used when
+ the service is first started. Following initial startup, the set
+ of lookup groups is controlled through the service's {@link
+ net.jini.admin.JoinAdmin} administrable interface.
+</table>
+
+<table summary="Describes the initialLookupLocators configuration
+ entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ initialLookupLocators</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>{@link net.jini.core.discovery.LookupLocator}[]</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>null /* no locators */</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The locations of specific lookup services that
+ the service should discover and join. An empty array or
+ <code>null</code> specifies that no specific lookup services
+ should be joined. The array must not contain <code>null</code>
+ elements. This entry is obtained and used when the service is
+ first started. Following initial startup, the set of specific
+ lookup services is controlled through the service's {@link
+ net.jini.admin.JoinAdmin} administrable interface. <p>
+
+ The <code>LookupLocator</code> instances specified in this entry
+ will not be prepared by the proxy preparer specified in the
+ <code>locatorPreparer</code> entry, and will only be prepared by
+ the preparer in the <code>recoveredLocatorPreparer</code> entry
+ when they are being recovered.
+</table>
+
+<table summary="Describes the isolateSets configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ isolateSets</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>boolean</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>false</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Whether to isolate leases in their own renewal
+ sets rather than batching leases in different sets. This entry is
+ obtained at service start and restart. <p>
+
+ Setting this entry to <code>false</code> (the default) makes it
+ more likely that the service can achieve better performance by
+ batching leases, because it permits leases in different lease sets
+ to be batched together. Note that batching leases across sets
+ introduces the risk that mutually mistrustful leases in different
+ sets will "capture" each other when they are batched, allowing an
+ untrustworthy lease to gain access to leases in other sets.
+</table>
+
+<a name="leaseManager"></a>
+<table summary="Describes the leaseManager configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ leaseManager</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.lease.LeaseRenewalManager}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>new LeaseRenewalManager(this /* config */)</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Supplies the lease renewal manager that Norm
+ both uses to renew client leases and passes to the constructor
+ when creating its {@link net.jini.lookup.JoinManager}. The value
+ should not be <code>null</code>. This entry is obtained at service
+ start and restart.
+</table>
+
+<table summary="Describes the leasePolicy configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ leasePolicy</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link com.sun.jini.landlord.LeasePeriodPolicy}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td>
+<pre>
+new {@link com.sun.jini.landlord.FixedLeasePeriodPolicy}(
+ 2 * 60 * 60 * 1000L, // max = 2 hours
+ 60 * 60 * 1000L) // default = 1 hour
+</pre>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The policy for calculating lease grants and
+ renewals. The value should not be <code>null</code>. The default
+ grants leases with a maximum duration of 2 hours and a default
+ duration of 1 hour. This entry is obtained at service start and
+ restart.
+</table>
+
+<table summary="Describes the leasePreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ leasePreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares client leases for use when they are
+ supplied in calls to {@link
+ net.jini.lease.LeaseRenewalSet#renewFor LeaseRenewalSet.renewFor}
+ or {@link net.jini.lease.LeaseRenewalSet#remove
+ LeaseRenewalSet.remove}. The value should not be
+ <code>null</code>. The preparer must return a lease which is equal
+ to the original lease as determined by {@link
+ java.lang.Object#equals Object.equals}. This entry is obtained at
+ service start and restart. <p>
+
+ This preparer needs to perform all operations needed to use a
+ newly received lease, typically including verifying trust in the
+ lease proxy, granting permissions, and setting constraints. The
+ prepared lease will be retained by the service in its persistent
+ store.
+
+ <p>
+
+ The service calls the {@link net.jini.core.lease.Lease#renew
+ renew} method on {@link net.jini.core.lease.Lease} instances, and
+ the {@link net.jini.core.lease.LeaseMap#renewAll renewAll} method
+ on lease maps it creates (via the {@link
+ net.jini.lease.LeaseRenewalManager}) from the leases.
+</table>
+
+<table summary="Describes the listenerPreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ listenerPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares expiration warning and renewal failure
+ listeners for use when they are supplied in calls to {@link
+ net.jini.lease.LeaseRenewalSet#setExpirationWarningListener
+ LeaseRenewalSet.setExpirationWarningListener} and {@link
+ net.jini.lease.LeaseRenewalSet#setRenewalFailureListener
+ LeaseRenewalSet.setRenewalFailureListener}. The value should not
+ be <code>null</code>. The preparer must return a listener which is
+ equal to the original listener as determined by {@link
+ java.lang.Object#equals Object.equals}. This entry is obtained at
+ service start and restart. <p>
+
+ This preparer needs to perform all operations needed to use a
+ newly received listener, typically including verifying trust in
+ the listener proxy, granting permissions, and setting
+ constraints. The prepared listener will be retained by the service
+ in its persistent store.
+
+ <p>
+
+ The service calls the {@link
+ net.jini.core.event.RemoteEventListener#notify notify} method on
+ {@link net.jini.core.event.RemoteEventListener} objects.
+</table>
+
+<table summary="Describes the locatorPreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ locatorPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares {@link
+ net.jini.core.discovery.LookupLocator} instances for use that are
+ passed to {@link net.jini.admin.JoinAdmin} methods. The value
+ should not be <code>null</code>. When registering with lookup
+ services, this service may call or use the constraints assigned to
+ the {@link net.jini.core.discovery.LookupLocator#getRegistrar
+ getRegistrar} methods of <code>LookupLocator</code> instances
+ returned from this preparer. This entry is obtained at service
+ start and restart. <p>
+
+ This preparer needs to perform all operations needed to use a
+ newly received lookup locator, typically including verifying trust
+ in the lookup locator and setting constraints. The prepared lookup
+ locator will be retained by the service in its persistent
+ store.
+
+ <p>
+
+ The <code>LookupLocator</code> instances obtained from the
+ <code>initialLookupLocators</code> configuration entry will not be
+ prepared by this preparer.
+</table>
+
+<table summary="Describes the loginContext configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ loginContext</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link javax.security.auth.login.LoginContext}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>null</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> If not <code>null</code>, specifies the JAAS
+ login context to use for performing a JAAS login and supplying the
+ {@link javax.security.auth.Subject} to use when running the
+ service. If <code>null</code>, no JAAS login is performed. This
+ entry is obtained at service start and restart.
+</table>
+
+<table summary="Describes the persistenceDirectory configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ persistenceDirectory</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>String</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><em>Required for persistent implementations: no
+ default</em>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The directory where the service's persistent
+ state is recorded. The value should not be <code>null</code>. This
+ entry is obtained at service start and restart. This entry is
+ required for persistent implementations and is otherwise not used.
+</table>
+
+<table summary="Describes the persistenceSnapshotThreshold
+ configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ persistenceSnapshotThreshold</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>int</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>200</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The threshold used to determine whether or not
+ to take a snapshot of the server's state. The value should not be
+ negative. The service will delay making new snapshots until the
+ number of log updates is greater than this value. This entry is
+ obtained at service start and restart. This entry is only used by
+ persistent implementations.
+</table>
+
+<table summary="Describes the persistenceSnapshotWeight configuration
+ entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ persistenceSnapshotWeight</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td><code>float</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>10.0f</code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The weight factor used to determine whether or
+ not to take a snapshot of the server's state. The value should not
+ be negative. The value represents the ratio of the size of an item
+ in a snapshot versus the size of a log update. This entry is
+ obtained at service start and restart. This entry is only used by
+ persistent implementations.
+</table>
+
+<table summary="Describes the recoveredLeasePreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ recoveredLeasePreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares client leases for use when they are
+ recovered from persistent storage. The value should not be
+ <code>null</code>. The preparer must return a lease which is equal
+ to the original lease as determined by {@link
+ java.lang.Object#equals Object.equals}. This entry is obtained at
+ service start and restart. This entry is only used by persistent
+ implementations. <p>
+
+ This preparer needs to perform only those operations whose results
+ are not retained in the lease proxy itself, but need to be
+ performed in the environment in which the proxy is unmarshalled,
+ typically just granting permissions.
+
+ <p>
+
+ The service calls the {@link net.jini.core.lease.Lease#renew
+ renew} method on {@link net.jini.core.lease.Lease} instances, and
+ the {@link net.jini.core.lease.LeaseMap#renewAll renewAll} method
+ on lease maps it creates (via the {@link
+ net.jini.lease.LeaseRenewalManager}) from the leases.
+</table>
+
+<table summary="Describes the recoveredListenerPreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ recoveredListenerPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares expiration warning and renewal failure
+ listeners for use when they are recovered from persistent
+ storage. The value should not be <code>null</code>. The preparer
+ must return a listener which is equal to the original listener as
+ determined by {@link java.lang.Object#equals Object.equals}. This
+ entry is obtained at service start and restart. This entry is only
+ used by persistent implementations. <p>
+
+ This preparer needs to perform only those operations whose results
+ are not retained in the listener proxy itself, but need to be
+ performed in the environment in which the proxy is unmarshalled,
+ typically just granting permissions.
+
+ <p>
+
+ The service calls the {@link
+ net.jini.core.event.RemoteEventListener#notify notify} method on
+ {@link net.jini.core.event.RemoteEventListener} objects.
+</table>
+
+<table summary="Describes the recoveredLocatorPreparer configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ recoveredLocatorPreparer</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.security.ProxyPreparer}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td><code>
+ new {@link net.jini.security.BasicProxyPreparer}()
+ </code>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> Prepares {@link
+ net.jini.core.discovery.LookupLocator} instances for use when they
+ are recovered from persistent storage. The value should not be
+ <code>null</code>. When registering with lookup services, this
+ service may call or use the constraints assigned to the {@link
+ net.jini.core.discovery.LookupLocator#getRegistrar getRegistrar}
+ methods of <code>LookupLocator</code> instances returned from this
+ preparer. This entry is obtained at service start and
+ restart. This entry is only used by persistent
+ implementations. <p>
+
+ This preparer needs to perform only those operations whose results
+ are not retained in the lookup locator itself, but need to be
+ performed in the environment in which the lookup locator is
+ unmarshalled. Typically no operations are needed.
+
+ <p>
+
+ The <code>LookupLocator</code> instances obtained from the
+ <code>initialLookupLocators</code> configuration entry will not be
+ prepared by this preparer until they are being recovered.
+</table>
+
+<table summary="Describes the serverExporter configuration entry"
+ border="0" cellpadding="2">
+ <tr valign="top">
+ <th scope="col" summary="layout"><font size="+1">•</font>
+ <th scope="col" align="left" colspan="2"><font size="+1"><code>
+ serverExporter</code></font>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Type:
+ <td> {@link net.jini.export.Exporter}
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Default:
+ <td>
+<pre>
+// Activatable implementation
+new {@link net.jini.activation.ActivationExporter}(
+ <i>activationID</i>,
+ new {@link net.jini.jeri.BasicJeriExporter}(
+ {@link net.jini.jeri.tcp.TcpServerEndpoint#getInstance TcpServerEndpoint.getInstance}(0),
+ new {@link net.jini.jeri.BasicILFactory}()))
+// Non-activatable implementations
+new {@link net.jini.jeri.BasicJeriExporter}(
+ {@link net.jini.jeri.tcp.TcpServerEndpoint#getInstance TcpServerEndpoint.getInstance}(0),
+ new {@link net.jini.jeri.BasicILFactory}())
+</pre>
+ <tr valign="top">
+ <td>  
+ <th scope="row" align="right">
+ Description:
+ <td> The object to use for exporting the service. The
+ value should not be <code>null</code>. In the activatable case,
+ the call to <code>getEntry</code> will supply the activation ID in
+ the <code>data</code> argument. This entry is obtained at service
+ start and restart.
+</table>
+<p>
+
+ Norm passes its configuration when creating instances of the following
+ configurable classes, which may support additional configuration
+ entries:
+
+<p>
+
+<ul>
+ <li> {@link net.jini.lease.LeaseRenewalManager}, used to renew leases,
+ as specified by the <a href="#leaseManager">
+ <code>leaseManager</code></a> configuration entry
+ <li> {@link net.jini.discovery.LookupDiscoveryManager}, used to discover
+ lookup services, as specified by the <a href="#discoveryManager">
+ <code>discoveryManager</code></a> configuration entry
+ <li> {@link net.jini.lookup.JoinManager}, used to manage lookup service
+ registrations
+</ul>
+<p>
+
+ <a name="access_control">
+ <h2>Access Control Permission Targets</h2>
+ </a>
+
+ The following table lists the remote methods on Norm's proxy objects and
+ the associated target names for enforcing access control using {@link
+ com.sun.jini.norm.NormPermission}:
+<p>
+
+<table border="1" cellpadding="5"
+ summary="The proxy methods and associated target names for
+ NormPermission.">
+
+ <tr>
+ <th> Proxy Method
+ <th> Target Name
+
+ <!-- LeaseRenewalService -->
+
+ <tr>
+ <td> {@link net.jini.lease.LeaseRenewalService#createLeaseRenewalSet
+ LeaseRenewalService.createLeaseRenewalSet}
+ <td> createLeaseRenewalSet
+
+ <!-- LeaseRenewalSet -->
+
+ <tr>
+ <td> {@link net.jini.lease.LeaseRenewalSet#renewFor(Lease,long)
+ LeaseRenewalSet.renewFor(Lease, long)},
+ {@link net.jini.lease.LeaseRenewalSet#renewFor(Lease,long,long)
+ LeaseRenewalSet.renewFor(Lease, long, long)}
+ <td> renewFor
+ <tr>
+ <td> {@link net.jini.lease.LeaseRenewalSet#remove LeaseRenewalSet.remove}
+ <td> remove
+ <tr>
+ <td> {@link net.jini.lease.LeaseRenewalSet#getLeases
+ LeaseRenewalSet.getLeases}
+ <td> getLeases
+ <tr>
+ <td> {@link net.jini.lease.LeaseRenewalSet#setExpirationWarningListener
+ LeaseRenewalSet.setExpirationWarningListener},
+ {@link net.jini.lease.LeaseRenewalSet#clearExpirationWarningListener
+ LeaseRenewalSet.clearExpirationWarningListener}
+ <td> setExpirationWarningListener
+ <tr>
+ <td> {@link
+ net.jini.lease.LeaseRenewalSet#setRenewalFailureListener
+ LeaseRenewalSet.setRenewalFailureListener},
+ {@link
+ net.jini.lease.LeaseRenewalSet#clearRenewalFailureListener
+ LeaseRenewalSet.clearRenewalFailureListener}
+ <td> setRenewalFailureListener
+
+ <!-- Lease and LeaseMap -->
+
+ <tr>
+ <td> {@link net.jini.core.lease.Lease#renew Lease.renew}
+ <td> renew
+ <tr>
+ <td> {@link net.jini.core.lease.Lease#cancel
+ Lease.cancel}
+ <td> cancel
+ <tr>
+ <td> {@link
+ net.jini.core.lease.LeaseMap#renewAll
+ LeaseMap.renewAll}
+ <td> renewAll
+ <tr>
+ <td> {@link
+ net.jini.core.lease.LeaseMap#cancelAll
+ LeaseMap.cancelAll}
+ <td> cancelAll
+
+ <!-- Administrable -->
+
+ <tr>
+ <td> {@link
+ net.jini.admin.Administrable#getAdmin
+ Administrable.getAdmin}
+ <td> getAdmin
+
+ <!-- JoinAdmin -->
+
+ <tr>
+ <td> {@link
+ net.jini.admin.JoinAdmin#getLookupAttributes
+ JoinAdmin.getLookupAttributes}
+ <td>
+ getLookupAttributes
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#addLookupAttributes
+ JoinAdmin.addLookupAttributes}
+ <td>
+ addLookupAttributes
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#modifyLookupAttributes
+ JoinAdmin.modifyLookupAttributes}
+ <td>
+ modifyLookupAttributes
+
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#getLookupGroups
+ JoinAdmin.getLookupGroups}
+ <td>
+ getLookupGroups
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#addLookupGroups
+ JoinAdmin.addLookupGroups}
+ <td>
+ addLookupGroups
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#removeLookupGroups
+ JoinAdmin.removeLookupGroups}
+ <td>
+ removeLookupGroups
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#setLookupGroups
+ JoinAdmin.setLookupGroups}
+ <td>
+ setLookupGroups
+
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#getLookupLocators
+ JoinAdmin.getLookupLocators}
+ <td>
+ getLookupLocators
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#addLookupLocators
+ JoinAdmin.addLookupLocators}
+ <td>
+ addLookupLocators
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#removeLookupLocators
+ JoinAdmin.removeLookupLocators}
+ <td>
+ removeLookupLocators
+ <tr>
+ <td>
+ {@link
+ net.jini.admin.JoinAdmin#setLookupLocators
+ JoinAdmin.setLookupLocators}
+ <td>
+ setLookupLocators
+
+ <!-- DestroyAdmin -->
+
+ <tr>
+ <td>
+ {@link
+ com.sun.jini.admin.DestroyAdmin#destroy
+ DestroyAdmin.destroy}
+ <td>
+ destroy
+
+ <!-- ProxyTrust -->
+
+ <tr>
+ <td>
+ {@link
+ net.jini.export.proxytrust.ProxyTrust#getProxyVerifier
+ ProxyTrust.getProxyVerifier}
+ <td>
+ getProxyVerifier
+
+ <!-- ServiceProxyAccessor -->
+
+ <tr>
+ <td> {@link com.sun.jini.start.ServiceProxyAccessor#getServiceProxy
+ ServiceProxyAccessor.getServiceProxy}
+ <td> getServiceProxy
+
+</table>
+<p>
+
+ <a name="logging">
+ <h2>Loggers and Logging Levels</h2>
+ </a>
+
+ The Norm service implementation uses the {@link
+ java.util.logging.Logger} named <code>com.sun.jini.norm</code> to log
+ information at the following logging levels:
+<p>
+
+<table border="1" cellpadding="5"
+ summary="Describes logging performed by Norm at different
+ logging levels">
+
+ <caption halign="center" valign="top"><b><code>
+ com.sun.jini.norm</code></b></caption>
+
+ <tr>
+ <th scope="col"> Level
+ <th scope="col"> Description
+
+ <tr>
+ <td> {@link java.util.logging.Level#SEVERE SEVERE}
+ <td>
+ Problems that prevent service startup
+
+ <tr>
+ <td> {@link java.util.logging.Level#WARNING WARNING}
+ <td>
+ Problems making modifications to persistent storage, unexpected
+ internal errors
+
+ <tr>
+ <td> {@link java.util.logging.Level#INFO INFO}
+ <td> Service
+ start, restart, or destruction; problems recovering lookup locators or
+ lookup attributes; thread problems; leases or event listeners dropped
+ because of definite exceptions; or problems when destroying the
+ service, or in cleaning up after start up fails
+
+ <tr>
+ <td> {@link java.util.logging.Level#CONFIG CONFIG}
+ <td> Changes
+ made to the service through administrative interfaces
+
+ <tr>
+ <td> {@link com.sun.jini.logging.Levels#HANDLED HANDLED}
+ <td>
+ Indefinite exceptions renewing leases or delivering events, when
+ preparing or unmarshalling leases or events, or for exceptions
+ handled
+ when destroying the service
+
+ <tr>
+ <td> {@link java.util.logging.Level#FINE FINE}
+ <td> Adding or
+ removing leases, leases reaching desired expiration,
+ creating lease
+ renewal sets
+
+ <tr>
+ <td> {@link java.util.logging.Level#FINER FINER}
+ <td> Attempting
+ to renew leases, taking persistence snapshots,
+ persistence recovery
+
+ <tr>
+ <td> {@link java.util.logging.Level#FINEST FINEST}
+ <td> Low level
+ operation tracing
+
+</table>
+<p>
+
+ See the {@link com.sun.jini.logging.LogManager} class for one way to use
+ the <code>HANDLED</code> logging level in standard logging configuration
+ files.
+
+<p>
+
+ <a name="examples">
+ <h2>Examples for Running Norm</h2>
+ </a>
+
+ This section provides examples of running Norm in various configurations.
+
+<ul>
+ <li><a href="#assumptions">Assumptions for running the examples</a>
+ <li> JRMP configurations
+ <ul>
+ <li><a href="#transient_jrmp">Transient</a>
+ <li><a href="#persistent_jrmp">Persistent</a>
+ <li><a href="#activatable_jrmp">Activatable</a>
+ </ul>
+ <li> Jini extensible remote invocation (Jini ERI) configurations
+ <ul>
+ <li><a href="#transient">Transient</a>
+ <li><a href="#persistent">Persistent</a>
+ <li><a href="#activatable">Activatable</a>
+ </ul>
+ <li><a href="#stop_activatable">Stopping activatable configurations</a>
+</ul>
+<p>
+
+ <a name="assumptions">
+ <h3>Assumptions for Running the Examples</h3>
+ </a>
+
+ The examples below make the following assumptions:
+<p>
+
+<ul>
+ <li> The Java(TM) 2 Platform, Standard Edition, (J2SE(TM)) has been
+ installed, and its commands are available in the current path
+ <li> The Apache River release has been installed in the
+ <var><b>install_dir</b></var> directory
+ <li> The example configuration and policy files described below are
+ available in the <var><b>config_dir</b></var> directory
+ <li> The local host name is <var><b>your_host</b></var>
+ <li> The local lookup group name is <var><b>your.group</b></var>
+ <li> The HTTP server for download JAR files is running on
+ <var><b>your_host</b></var> and is available on port
+ <var><b>http_port</b></var>. This HTTP server is serving files located
+ in the <var><b>install_dir</b></var>/lib-dl directory. You can use the
+ {@link com.sun.jini.tool.ClassServer} class for this purpose.
+ <li> The examples are being run on UNIX platforms
+ <li> The examples are being run on a secure network where access control
+ and authentication are not needed. See the <a
+ href="../../../../../../source/src/com/sun/jini/example/hello/index.html">hello example</a> for some
+ same
+ client and service configurations that enforce security.
+ <li> For activatable services, an activation system is running on
+ <var><b>your_host</b></var>. You can use the {@link
+ com.sun.jini.phoenix} implementation for this purpose.
+</ul>
+<p>
+
+ Throughout the example, items in <var><b>bold</b></var> need to be
+ customized for your local environment.
+
+ <a name="transient_jrmp">
+ <h3>Starting Transient Norm using JRMP</h3>
+ </a>
+
+ To run a transient Norm, which does not store any information
+ persistently or use the activation system to restart itself, using JRMP
+ for remote communication, run the following command.
+<p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_transient_jrmp_config"><var><b>config_dir</b></var>/start-transient-jrmp-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ This configuration uses the following files.
+
+ <a name="jsk_all_policy">
+ <h4>File <var><b>config_dir</b></var>/jsk-all.policy</h4>
+ </a>
+
+ Use this security policy file for starting and running all Norm
+ configurations. This file grants all permissions to local code included
+ in the <code>lib</code> subdirectory of the Apache River release installation.
+<p>
+
+<blockquote>
+<pre>
+grant codebase "file:<var><b>install_dir</b></var>/lib/*" {
+ permission java.security.AllPermission;
+};
+</pre>
+</blockquote>
+
+<a name="start_transient_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/start-transient-jrmp-norm.config</h4>
+</a>
+
+Use this configuration source file to start transient Norm using
+JRMP. <p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+com.sun.jini.start {
+ private static codebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static policy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static classpath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static config = "<a
+ href="#transient_jrmp_config"><var><b>config_dir</b></var>/transient-jrmp-norm.config</a>";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new NonActivatableServiceDescriptor(
+ codebase, policy, classpath,
+ "com.sun.jini.norm.TransientNormServerImpl",
+ new String[] { config })
+ };
+}
+</pre>
+</blockquote>
+
+<a name="transient_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/transient-jrmp-norm.config</h4>
+</a>
+
+Use this configuration source file to run transient Norm using JRMP. <p>
+
+<blockquote>
+<pre>
+import net.jini.jrmp.JrmpExporter;
+
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+ serverExporter = new JrmpExporter();
+}
+</pre>
+</blockquote>
+
+<a name="persistent_jrmp">
+ <h3>Starting Persistent Norm using JRMP</h3>
+</a>
+
+To run a persistent Norm, which stores information persistently but does
+not use the activation system to restart itself, using JRMP for remote
+communication, run the following command. <p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_persistent_jrmp_config"><var><b>config_dir</b></var>/start-persistent-jrmp-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ <b>Note:</b> Because JRMP does not provide a convenient way to specify
+ the same object ID each time a given object is exported, this
+ configuration is only useful for debugging -- an existing service proxy
+ cannot be used after the service is restarted.
+
+<p>
+
+ This configuration uses the following additional files.
+
+ <a name="start_persistent_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/start-persistent-jrmp-norm.config</h4>
+ </a>
+
+ Use this configuration source file to start persistent Norm using
+ JRMP.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+com.sun.jini.start {
+ private static codebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static policy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static classpath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static config = "<a href="#persistent_jrmp_config"><var><b>config_dir</b></var>/persistent-jrmp-norm.config</a>";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new NonActivatableServiceDescriptor(
+ codebase, policy, classpath,
+ "com.sun.jini.norm.PersistentNormServerImpl",
+ new String[] { config })
+ };
+}
+</pre>
+</blockquote>
+
+<a name="persistent_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/persistent-jrmp-norm.config</h4>
+</a>
+
+Use this configuration source file to run persistent Norm using
+JRMP. <p>
+
+<blockquote>
+<pre>
+import net.jini.jrmp.JrmpExporter;
+
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+ persistenceDirectory = "<var><b>config_dir</b></var>/norm.log";
+ serverExporter = new JrmpExporter();
+}
+</pre>
+</blockquote>
+
+<a name="activatable_jrmp">
+ <h3>Starting Activatable Norm using JRMP</h3>
+</a>
+
+To run an activatable Norm, which stores information persistently and
+uses the activation system to restart itself, using JRMP for remote
+communication, run the following command. <p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_activatable_jrmp_config"><var><b>config_dir</b></var>/start-activatable-jrmp-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ You should remove the <var><b>config_dir</b></var>/group.log directory
+ before running this command. Note that the activation system will
+ restart the activatable Norm service as needed until Norm is
+ shutdown.
+
+<p>
+
+ Remember to remove the <var><b>config_dir</b></var>/norm.log directory
+ before running this command if you want Norm to forget registrations and
+ settings made in previous invocations.
+
+<p>
+
+ This configuration uses the following additional files.
+
+ <a name="start_activatable_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/start-activatable-jrmp-norm.config</h4>
+ </a>
+
+ Use this configuration source file to start activatable Norm using
+ JRMP.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.ServiceDescriptor;
+import com.sun.jini.start.SharedActivatableServiceDescriptor;
+import com.sun.jini.start.SharedActivationGroupDescriptor;
+
+com.sun.jini.start {
+ private static normCodebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static normPolicy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static normClasspath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static normConfig = "<a href="#activatable_jrmp_config"><var><b>config_dir</b></var>/activatable-jrmp-norm.config</a>";
+
+ private static groupCodebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/group-dl.jar";
+ private static groupPolicy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static groupClasspath = "<var><b>install_dir</b></var>/lib/sharedvm.jar";
+ private static groupPersistenceDirectory = "<var><b>config_dir</b></var>/group.log";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new SharedActivationGroupDescriptor(
+ groupPolicy, groupClasspath, groupPersistenceDirectory,
+ null /* serverCommand */,
+ null /* serverOptions */,
+ null /* serverProperties */),
+ new SharedActivatableServiceDescriptor(
+ normCodebase, normPolicy, normClasspath,
+ "com.sun.jini.norm.ActivatableNormServerImpl",
+ groupPersistenceDirectory,
+ new String[] { normConfig },
+ true /* restart */)
+ };
+}
+</pre>
+</blockquote>
+
+<a name="activatable_jrmp_config">
+ <h4>File <var><b>config_dir</b></var>/activatable-jrmp-norm.config</h4>
+</a>
+
+Use this configuration source file to run activatable Norm using
+JRMP. <p>
+
+<blockquote>
+<pre>
+import java.rmi.activation.ActivationID;
+import net.jini.jrmp.JrmpExporter;
+
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+ persistenceDirectory = "<var><b>config_dir</b></var>/norm.log";
+ serverExporter = new JrmpExporter((ActivationID) $data, 0);
+}
+</pre>
+</blockquote>
+
+<a name="stop_activatable">
+ <h3>Stopping Activatable Norm</h3>
+</a>
+
+To destroy the activation group running an activatable Norm, run
+using either JRMP or Jini ERI, run the following command. <p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/destroy.jar \
+ <a href="#stop_activatable_config"><var><b>config_dir</b></var>/stop-activatable-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ Running this command will remove the
+ <var><b>config_dir</b></var>/group.log directory.
+
+<p>
+
+ Note that this command does not actually destroy the service itself, but
+ just destroys the activation group the service is running in. You may
+ want to first destroy the service using Norm's administrable interface,
+ or to remove the <var><b>config_dir</b></var>/norm.log directory after
+ destroying the activation group.
+
+<p>
+
+ This command uses the following additional file.
+
+ <a name="stop_activatable_config">
+ <h4>File <var><b>config_dir</b></var>/stop-activatable-norm.config</h4>
+ </a>
+
+ Use this configuration source file to destroy the activation group for
+ an activatable Norm.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.ServiceDescriptor;
+import com.sun.jini.start.SharedActivatableServiceDescriptor;
+
+com.sun.jini.start {
+ private static codebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/group-dl.jar";
+ private static policy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static classpath = "<var><b>install_dir</b></var>/lib/group.jar";
+ private static persistenceDirectory = "<var><b>config_dir</b></var>/group.log";
+
+ static serviceDestructors = new ServiceDescriptor[] {
+ new SharedActivatableServiceDescriptor(
+ codebase, policy, classpath,
+ "com.sun.jini.start.SharedGroupImpl",
+ persistenceDirectory,
+ null /* config */,
+ false /* restart */)
+ };
+}
+</pre>
+</blockquote>
+
+<a name="transient">
+ <h3>Starting Transient Norm using Jini ERI</h3>
+</a>
+
+To run a transient Norm, which does not store any information
+persistently or use the activation system to restart itself, using Jini
+ERI for remote communication, run the following command. <p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_transient_config"><var><b>config_dir</b></var>/start-transient-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ This configuration uses the following additional files.
+
+ <a name="start_transient_config">
+ <h4>File <var><b>config_dir</b></var>/start-transient-norm.config</h4>
+ </a>
+
+ Use this configuration source file to start transient Norm using
+ Jini ERI.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+com.sun.jini.start {
+ private static codebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static policy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static classpath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static config = "<a href="#transient_config"><var><b>config_dir</b></var>/transient-norm.config</a>";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new NonActivatableServiceDescriptor(
+ codebase, policy, classpath,
+ "com.sun.jini.norm.TransientNormServerImpl",
+ new String[] { config })
+ };
+}
+</pre>
+</blockquote>
+
+<a name="transient_config">
+ <h4>File <var><b>config_dir</b></var>/transient-norm.config</h4>
+</a>
+
+Use this configuration source file to run transient Norm using Jini
+ERI. <p>
+
+<blockquote>
+<pre>
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+}
+</pre>
+</blockquote>
+
+<a name="persistent">
+ <h3>Starting Persistent Norm using Jini ERI</h3>
+</a>
+
+To run a persistent Norm, which stores information persistently but does
+not use the activation system to restart itself, using Jini ERI for
+remote communication, run the following command. <p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_persistent_config"><var><b>config_dir</b></var>/start-persistent-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ This configuration uses the following additional files.
+
+ <a name="start_persistent_config">
+ <h4>File <var><b>config_dir</b></var>/start-persistent-norm.config</h4>
+ </a>
+
+ Use this configuration source file to start persistent Norm using Jini
+ ERI.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+com.sun.jini.start {
+ private static codebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static policy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static classpath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static config = "<a href="#persistent_config"><var><b>config_dir</b></var>/persistent-norm.config</a>";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new NonActivatableServiceDescriptor(
+ codebase, policy, classpath,
+ "com.sun.jini.norm.PersistentNormServerImpl",
+ new String[] { config })
+ };
+}
+</pre>
+</blockquote>
+
+<a name="persistent_config">
+ <h4>File <var><b>config_dir</b></var>/persistent-norm.config</h4>
+</a>
+
+Use this configuration source file to run persistent Norm using Jini
+ERI. <p>
+
+<blockquote>
+<pre>
+import net.jini.id.UuidFactory;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+ persistenceDirectory = "<var><b>config_dir</b></var>/norm.log";
+ serverExporter = new BasicJeriExporter(
+ TcpServerEndpoint.getInstance(<var><b>obj_port</b></var>),
+ new BasicILFactory(),
+ false,
+ true,
+ UuidFactory.create("<var><b>obj_UUID_string</b></var>"));
+}
+</pre>
+</blockquote>
+
+The <var><b>obj_port</b></var> is the fixed TCP port to use for
+listening for requests for this object. The
+<var><b>obj_UUID_string</b></var> is the {@linkplain net.jini.id.Uuid
+universally unique ID} for the exported object. These IDs have the form
+<code>"01234567-89ab-cdef-0123-456789abcdef"</code>.
+<p>
+
+ Remember to remove the <var><b>config_dir</b></var>/norm.log directory
+ before restarting persistent Norm if you want it to forget registrations
+ and settings made in previous invocations.
+
+ <a name="activatable">
+ <h3>Starting Activatable Norm using Jini ERI</h3>
+ </a>
+
+ To run an activatable Norm, which stores information persistently and
+ uses the activation system to restart itself, using Jini ERI for remote
+ communication, run the following command.
+<p>
+
+<blockquote>
+<pre>
+java -Djava.security.policy=<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a> \
+ -jar <var><b>install_dir</b></var>/lib/start.jar \
+ <a href="#start_activatable_config"><var><b>config_dir</b></var>/start-activatable-norm.config</a>
+</pre>
+</blockquote>
+<p>
+
+ You should remove the <var><b>config_dir</b></var>/group.log directory
+ before running this command. Note that the activation system will
+ restart the activatable Norm service as needed until Norm is
+ shutdown.
+
+<p>
+
+ Remember to remove the <var><b>config_dir</b></var>/norm.log directory
+ before running this command if you want Norm to forget registrations and
+ settings made in previous invocations.
+
+<p>
+
+ This configuration uses the following additional files.
+
+ <a name="start_activatable_config">
+ <h4>File <var><b>config_dir</b></var>/start-activatable-norm.config</h4>
+ </a>
+
+ Use this configuration source file to start activatable Norm using Jini
+ ERI.
+<p>
+
+<blockquote>
+<pre>
+import com.sun.jini.start.ServiceDescriptor;
+import com.sun.jini.start.SharedActivatableServiceDescriptor;
+import com.sun.jini.start.SharedActivationGroupDescriptor;
+
+com.sun.jini.start {
+ private static normCodebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/norm-dl.jar"
+ + " http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/jsk-dl.jar";
+ private static normPolicy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static normClasspath = "<var><b>install_dir</b></var>/lib/norm.jar";
+ private static normConfig = "<a href="#activatable_config"><var><b>config_dir</b></var>/activatable-norm.config</a>";
+
+ private static groupCodebase = "http://<var><b>your_host</b></var>:<var><b>http_port</b></var>/group-dl.jar";
+ private static groupPolicy = "<a href="#jsk_all_policy"><var><b>config_dir</b></var>/jsk-all.policy</a>";
+ private static groupClasspath = "<var><b>install_dir</b></var>/lib/sharedvm.jar";
+ private static groupPersistenceDirectory = "<var><b>config_dir</b></var>/group.log";
+
+ static serviceDescriptors = new ServiceDescriptor[] {
+ new SharedActivationGroupDescriptor(
+ groupPolicy, groupClasspath, groupPersistenceDirectory,
+ null /* serverCommand */,
+ null /* serverOptions */,
+ null /* serverProperties */),
+ new SharedActivatableServiceDescriptor(
+ normCodebase, normPolicy, normClasspath,
+ "com.sun.jini.norm.ActivatableNormServerImpl",
+ groupPersistenceDirectory,
+ new String[] { normConfig },
+ true /* restart */)
+ };
+}
+</pre>
+</blockquote>
+
+<a name="activatable_config">
+ <h4>File <var><b>config_dir</b></var>/activatable-norm.config</h4>
+</a>
+
+Use this configuration source file to run activatable Norm using Jini
+ERI. <p>
+
+<blockquote>
+<pre>
+com.sun.jini.norm {
+ initialLookupGroups = new String[] { "<var><b>your.group</b></var>" };
+ persistenceDirectory = "<var><b>config_dir</b></var>/norm.log";
+}
+</pre>
+</blockquote>
+
+@see net.jini.lease.LeaseRenewalService
+
+</body>
+</html>
Added: incubator/river/jtsk/skunk/niclas1/services/norm/src/main/resources/configentry/norm-activatable
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/norm/src/main/resources/configentry/norm-activatable?rev=724975&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/norm/src/main/resources/configentry/norm-activatable (added)
+++ incubator/river/jtsk/skunk/niclas1/services/norm/src/main/resources/configentry/norm-activatable Tue Dec 9 21:11:39 2008
@@ -0,0 +1,21 @@
+#/*
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#*/
+
+# activatable persistent norm configuration entries
+com.sun.jini.norm.activationIdPreparer: net.jini.security.ProxyPreparer
+com.sun.jini.norm.activationSystemPreparer: net.jini.security.ProxyPreparer