avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject [Patch] New Avalon Docs
Date Tue, 17 Jul 2001 12:02:28 GMT

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:


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



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."


--- 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 @@
-             <function>suspend</function>
-             [<classname>Suspendable</classname>]
-           </para>
-         </listitem>
-         <listitem>
-           <para>

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message