You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2011/06/14 00:19:43 UTC

svn commit: r1135323 - /incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml

Author: danhaywood
Date: Mon Jun 13 22:19:43 2011
New Revision: 1135323

URL: http://svn.apache.org/viewvc?rev=1135323&view=rev
Log:
updates to default runtime docbkx guide

Modified:
    incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml

Modified: incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml?rev=1135323&r1=1135322&r2=1135323&view=diff
==============================================================================
--- incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml (original)
+++ incubator/isis/trunk/runtimes/dflt/src/docbkx/guide/isis-default-runtime.xml Mon Jun 13 22:19:43 2011
@@ -95,17 +95,16 @@
           <listitem>
             <para>Runtime Modules</para>
 
-            <para>This part of the guide *** has chapters for each of the
-            modules that make up the <emphasis>default
-            runtime</emphasis>.</para>
+            <para>This part of the guide has chapters for each of the modules
+            that make up the <emphasis>default runtime</emphasis>.</para>
           </listitem>
 
           <listitem>
             <para>Deployment</para>
 
-            <para>The chapters in this part of the guide *** describe
-            different ways to deploy an Isis application using the
-            <emphasis>default runtime</emphasis>.</para>
+            <para>The chapters in this part of the guide describe different
+            ways to deploy an Isis application using the <emphasis>default
+            runtime</emphasis>.</para>
           </listitem>
         </itemizedlist></para>
     </sect1>
@@ -544,7 +543,7 @@
               object as it is instantiated.</para>
 
               <para>Services are discussed further in <xref
-              linkend="sec.RegisteringServices" />.</para>
+              linkend="sec.DomainServices" />.</para>
             </listitem>
 
             <listitem>
@@ -606,6 +605,22 @@
               meanst that the value of the <classname>Oid</classname> can
               change at this point. <emphasis>Isis</emphasis> automatically
               manages this transition.</para>
+
+              <para><classname>OidGenerator</classname>s are also required to
+              return an <classname>OidStringifier</classname>, which is
+              capable of returning a string representation of the
+              <classname>Oid</classname>. This capability is exploited by some
+              viewers, such as the Restful viewer
+              <package>[oai.viewer:restful]</package>, where string
+              representations of <classname>Oid</classname>s are required.
+              Some <classname>Oid</classname> implementations can choose to
+              implement the <classname>DirectlyStringableOid</classname>
+              sub-interface, so can be serialized and deserialized into
+              strings very directly. Other implementations may rely on the
+              fact that all <classname>Oid</classname>s are also
+              <classname>oai.core.commons.encoding.Encodable</classname>. The
+              string representation for such Oids will however be rather long
+              and opaque.</para>
             </listitem>
 
             <listitem>
@@ -881,34 +896,61 @@
           to simply persist every entity in its own table (meaning that the
           distinction between aggregate root entities vs aggregated entities
           is less obvious).</para>
-        </sect2>
-
-        <sect2 id="sec.RegisteringServices">
-          <title>Services</title>
-
-          <para>***</para>
-
-          <para>During startup the persistor is given a set of service
-          objects. During intialisation the persistor must determine the OIDs
-          for these service objects. If the persistor does not know about a
-          service (by its ID) from a previous run then it must generate an OID
-          for the service and persist that with the ID of the service. This
-          allows references to be held persistently to service objects despite
-          the fact that they are singletons.</para>
-
-          <para></para>
 
-          <para></para>
+          <para>For aggregate root entities, the actual
+          <classname>Oid</classname> implementation depends upon the
+          configured persistence mechanism. For example, if using the XML
+          object store then the <classname>SerialOid</classname>
+          implementation is used, with the
+          <classname>TimeBasedOidGenerator</classname> being used as the
+          <classname>OidGenerator</classname> (in other words, creating unique
+          instances based on the current time). On the other hand the SQL
+          object store happens to have its own <classname>SqlOid</classname>
+          implementation, which captures the value generated by the underlying
+          relational database.</para>
+        </sect2>
+
+        <sect2 id="sec.DomainServices">
+          <title>Domain Services</title>
+
+          <para>One of the responsibilities of the
+          <classname>IsisSystem</classname> is to obtain the list of domain
+          services that will be made available to the end-user and which are
+          automatically injected into the domain objects.</para>
+
+          <para>The default implementation is to load from the
+          <filename>isis.properties</filename> file, under the
+          <varname>isis.services.prefix</varname> and
+          <varname>isis.services</varname> keys:</para>
+
+          <programlisting>isis.services.prefix = org.apache.isis.example.claims.objstore.dflt
+isis.services = employee.EmployeeRepositoryDefault, claim.ClaimRepositoryDefault</programlisting>
+
+          <para>For each domain service class, a corresponding domain object
+          is instantiated, and then these are held as a simple list within
+          IsisSystem.</para>
+
+          <para>When a <classname>PersistenceSession</classname> is created,
+          all domain objects must be mapped with
+          <classname>ObjectAdapter</classname>s. Because domain services are
+          injected into domain objects, this applies to the domain objects too
+          (otherwise the domain objects would appear to hold an unknown
+          object).</para>
+
+          <para>Moreover, it is not valid for persisted domain objects to hold
+          references to non-persisted domain objects. We therefore "fool" the
+          rest of the framework by automatically creating and mapping
+          <classname>ObjectAdapter</classname>s for all the domain services
+          objects, with each set to being already persistent. The scope of
+          these <classname>ObjectAdapter</classname>s is the same as for any
+          other adapter within the <classname>PersistenceSession</classname>;
+          only as long as the <classname>PersistenceSession</classname> is
+          still open. When the subsequent
+          <classname>PersistenceSession</classname> is created,
+          <classname>ObjectAdapter</classname>s are created a-new for each
+          domain service.</para>
         </sect2>
       </sect1>
-
-      <sect1>
-        <title>Profile Stores</title>
-
-        <para></para>
-
-        <para></para>
-      </sect1>
     </chapter>
   </part>