Berin,

two patches. The first one fixes a logic error in the sample code that would
throw an Illegal call exception if the component was successfully
initialized, the second removes a repeated occurrence of the suspend method.
(It is listed twice).

Overall, I can only agree with what others have said: You have done a great
job, Berin.

One thing I have an issue with is this, however:

(framework.xml)
"ThreadSafe

The contract with ThreadSafe Components is that both their interface and
their implementation function correctly no matter how many threads access
the Component simultaneously. While this is generally a lofty design goal,
sometimes it is simply not possible due to the technologies you are using. A
Component that implements this interface will generally only have one
instance available in the system, and other Components will use that one
instance."


(implementing.xml)

"org.apache.avalon.framework.thread.Threadsafe

Component does not maintain state between method calls,"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I do not see this as being a necessary part of the contract. This would mean
that a component that maintains state can not implements its own locking and
mark itself ThreadSafe.

" and is fully reentrant.
One instance is created and shared with all Composables that request it.
Creation and initialization is done when ComponentHolder is created."

/LS

--- implementing_orig_1.xml   Tue Jul 17 13:53:05 2001

+++ jakarta-avalon\src\xdocs\developing\implementing.xml     Tue Jul 17
13:52:52 2001
@@ -152,7 +152,7 @@
     }

     public final Document getDocument(Principal requestor, int refId) {
-        if (initialized || disposed) {
+        if (!initialized || disposed) {
             throw new IllegalStateException("Illegal call");
         }


--- framework_orig_2.xml      Tue Jul 17 13:55:05 2001

+++ jakarta-avalon\src\xdocs\developing\framework.xml        Tue Jul 17
13:51:05 2001
@@ -233,12 +233,6 @@
          </listitem>
          <listitem>
            <para>
-             <function>suspend</function>
-             [<classname>Suspendable</classname>]
-           </para>
-         </listitem>
-         <listitem>
-           <para>
              <function>recontextualize</function>
              [<classname>Recontextualizable</classname>]
            </para>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to