hlship 2004/10/27 05:21:30
Modified: src/documentation/content/xdocs services.xml
Log:
Improve description of singleton and primitive service models.
Revision Changes Path
1.9 +13 -10
jakarta-hivemind/src/documentation/content/xdocs/services.xml
Index: services.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/services.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- services.xml 21 Oct 2004 12:35:56 -0000 1.8
+++ services.xml 27 Oct 2004 12:21:30 -0000 1.9
@@ -259,14 +259,6 @@
knows nor cares about this.</p>
</section>
<section>
- <title>Primitive Service Model</title>
- <p>The simplest service model is the
<strong>primitive</strong> service
- model; in this model the service is constructed
on first reference. This
- is appropriate for services such as service
factories and interceptor
- factories, and for several of the basic
services provided in the <link
- href="&hivedoc;/module/hivemind.html">hivemind
module</link>.</p>
- </section>
- <section>
<title>Singleton Service Model</title>
<p>Constructing a service can be somewhat expensive; it
involves
instantiating a core service implementation,
configuring its properties
@@ -276,8 +268,9 @@
services, it is also desirable to avoid a
cascade of unneccesary object
creation due to the dependencies between
services.</p>
<p>To resolve this, HiveMind defers the actual creation
of services by
- default. This is controled by the
<code>model</code> attribute of the &service-point;
- element; the default model is
<strong>singleton</strong>.</p>
+ default. This is controled by the
<code>model</code> attribute of the
+ &create-instance; or &invoke-factory;
+ elements; the default model is
<strong>singleton</strong>.</p>
<p>When a service is first requested a <em>proxy</em>
for the service is
created. This proxy implements the same service
interface as the actual
service and, the first time a method of the
service interface is
@@ -290,6 +283,16 @@
rarely a need to defer service implementation
or service interceptor
factory services.</p>
</section>
+ <section>
+ <title>Primitive Service Model</title>
+ <p>The simplest service model is the <strong>primitive</strong>
service model; in this model the service is
+ constructed on first reference. This is appropriate for services
such as service factories and interceptor
+ factories, and for several of the basic services provided in the
<link
+ href="&hivedoc;/module/hivemind.html">hivemind module</link>.</p>
+ <p> There is no rarely a need use this service model in your own code.
It exists primarily to support the
+ services in the hivemind module itself (the implementation of the
singleton service model is dependent on
+ several services that use the primitive service model). </p>
+ </section>
<section>
<title>Threaded Service Model</title>
<p>In general, singleton services (using the singleton
or primitive
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]