hlship 2003/09/24 09:07:53
Modified: hivemind/xdocs index.xml ioc.xml services.xml
interceptors.xml
hivemind/library/xdocs navigation.xml
hivemind/framework/src/descriptor/META-INF hivemodule.xml
hivemind/library/src/java/org/apache/commons/hivemind/lib/impl
RemoteExceptionCoordinatorImpl.java
NameLookupImpl.java
hivemind/framework/src/java/org/apache/commons/hivemind/impl
RegistryBuilder.java
AbstractServiceExtensionPoint.java
ThreadedServiceExtensionPointImpl.java
hivemind/common links.xml
hivemind/framework/src/test/hivemind/test/services
ComplexModule.xml BuilderAccessFailure.xml
BuilderAccess.xml
hivemind/framework/xdocs navigation.xml
hivemind/framework/src/java/org/apache/commons/hivemind
Registry.java Configuration.java
hivemind/framework/src/java/org/apache/commons/hivemind/service/impl
AbstractServiceInterceptorFactory.java
BuilderFactory.java BuilderParameter.java
hivemind/library/src/descriptor/META-INF hivemodule.xml
Added: hivemind/framework/xdocs BuilderFactory.xml
LoggingInterceptor.xml
Log:
Minor tweaks to BuilderFactory.
Add and integrated documentation about BuilderFactory, LoggingInterceptor.
Fixed some broken Javadoc.
Revision Changes Path
1.15 +39 -22 jakarta-commons-sandbox/hivemind/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/index.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- index.xml 23 Sep 2003 22:23:51 -0000 1.14
+++ index.xml 24 Sep 2003 16:07:52 -0000 1.15
@@ -20,13 +20,31 @@
from standalone applications all the way to enterprise applications deployed
as EARs
inside an application server.
</p>
+
+ <p>
+ HiveMind allows you to create a data-driven, service-oriented architecture. A
HiveMind
+ application is broken up into small, individually testable services (which are
primarily
+ stateless singleton objects). The HiveMind framework is responsible for
+ creating each service just as it is needed. You get the benefits of a service
oriented architecture
+ without the complexity of J2EE stateless session beans.
+ HiveMind allows you to break apart your application into tiny,
+ easily tested (and easily reused)
+ services, and create the full application simply by combining and configuring
+ the services.
+ </p>
+
+ <p>
+ The service architecture is complemented by a configuration framework which
allow many
+ independent modules to work together to define the configuration data used by
services.
+ </p>
<p>
Using HiveMind means writing less code; code that you would ordinarily write
for reading configuration files ... gone. Code for managing singleton service
objects ... gone.
The use of <em>interceptors</em> means that much repetetive coding
also dissappears.
- For example, you can have a service automatically log method entry and exit
using
- an interceptor rather than in your own code.
+ For example, you can have a service automatically
+ log method entry and exit using
+ an <a href="commons-hivemind/LoggingInterceptor.html">interceptor</a> rather
than in your own code.
</p>
<p>
@@ -54,28 +72,23 @@
one that supports very aggresive refactoring and a very fine granulatity to
your solution.
</p>
- <p>
- Too much software is still architected with big, monolithic blocks of code
that are hard to
- maintain and hard to test. HiveMind allows you to break apart your
application into tiny,
- easily tested (and easily reused)
- services, and create the full application simply by combining and configuring
- the services.
- </p>
</section>
<section name="Status">
<p>
- HiveMind is nearly ready to go into 1.0 beta. It's more than time to start
building a community ...
- contact <a href="mailto:[EMAIL PROTECTED]">Howard M. Lewis Ship</a> if you
would like
- to get involved!
+ HiveMind is nearly ready to go into 1.0 beta.
+ To participate, subscribe to
+ the <code>[EMAIL PROTECTED]</code> mailing list,
+ a prefix your subject line with <code>[HiveMind]</code>.
</p>
<p>
- The project is being reorganized as a Maven multiproject; expect a few
teething pains -- especially
- in terms of pre-packaged distributions. Just download Maven 1.0-rc-1 and
build it yourself! Ultimately,
- there will be sub-projects for a standard HiveMind library and a home for
contributed HiveMind services.
+ The project has been reorganized as a Maven multiproject; expect a few
teething pains -- especially
+ in terms of pre-packaged distributions. Just download Maven 1.0-rc-1 and
build it yourself!
+ Currently there are two sub-projects; for the framework proper, and for the
standard library.
+ A third sub-project, for contributed code and services, will be created soon.
</p>
</section>
@@ -96,7 +109,7 @@
</p>
<p>
- Extension points are used for configuration information. Each configuration
point is a list of elements,
+ Configuration points are used for configuration information. Each
configuration point is a list of elements,
also accessible
using a unique id. The elements of an configuration point
are provided by configurations
@@ -106,8 +119,8 @@
</p>
<p>
- Frequently, services and configuration points are used together; modules
contribute to an configuration
- point and a related services makes use of the combined data.
+ Frequently, services and configuration points are used together; modules
contribute to a configuration
+ point and a related services makes use of the data contributed from many
modules.
</p>
</section>
@@ -155,6 +168,10 @@
module descriptors are located and parsed, and the overall registry is
constructed
from the contents. The registry is validated and any errors are logged.
</p>
+
+ <p>
+ Once constructed, it is simple to gain access to services or configuration
data.
+ </p>
</section>
@@ -285,7 +302,7 @@
</td>
<td>
Let HiveMind add a
-<a href="&hivemind-registry;#service:hivemind.LoggingInterceptor">logging
interceptor</a>
+<a href="commons-hivemind/LoggingInterceptor.html">logging interceptor</a>
to your service.
</td>
</tr>
@@ -342,7 +359,7 @@
<p>
HiveMind uses a system of proxies to defer creation of services until actually
-needed; HiveMind is also completely threadsafe.
+needed; HiveMind is also completely thread-safe.
</p>
</td>
@@ -383,7 +400,7 @@
<a href="configurations.html">configuration point</a> you specify.
The objects in the list are constructed from extension point
contributions and converted, by HiveMind, into objects. As with
-services, a thread safe, just-in-time conversion takes place.
+services, a thread-safe, just-in-time conversion takes place.
</p>
1.12 +2 -57 jakarta-commons-sandbox/hivemind/xdocs/ioc.xml
Index: ioc.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/ioc.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ioc.xml 23 Sep 2003 22:23:51 -0000 1.11
+++ ioc.xml 24 Sep 2003 16:07:52 -0000 1.12
@@ -35,7 +35,7 @@
all the modules it can find at runtime. HiveMind is responsible for creating
services (including core implementations
and interceptors). It is quite possible to create service factories that do very
container-like things,
including connecting services together.
-<a
href="&hivemind-registry;#service:hivemind.BuilderFactory">hivemind.BuilderFactory</a>
+<a href="common-hivemind/BuilderFactory.html">BuilderFactory</a>
does just that, instantiating an object to act as the core service implementation,
then setting
properties of the object, some of which are references to services and
configuration point element data.
</p>
@@ -55,62 +55,7 @@
</section>
-
-<section name="Using BuilderFactory">
-
-<p>
-The BuilderFactory service is a very generic approach for creating core service
implementations. It's
-responsible for both instantiating the core service implementation and configuring
it, including
-connecting it to configuration point data and other services.
-</p>
-
-<source><![CDATA[
-<invoke-factory service-id="hivemind.BuilderFactory">
- <construct class=". . ."
- log-property=". . ."
- messages-property=". . ."
- point-id-property=". . .">
-
- <set property=". . ." value=". . ."/>
- <set-int property=". . ." value=". . ."/>
- <set-service property=". . ." service-id=". . ."/>
- <set-configuration property=". . ." configuration-id=". . ."/>
-
-
- </construct>
-
-</invoke-factory>]]></source>
-
-
-
-<p>
-The <construct> element identifies the class to create and has three
additional, optional attributes.
-The <code>log-property</code> attribute identifies the property, of type
<code>Log</code>, to be
-set. HiveMind uses Jakarta
-<a href="http://jakarta.apache.org/commons/logging.html">commons-logging</a> to
interface to the underlying
-logging system. The logger used is constructed from the service extension point id
(not the class name or
-interface name).
-</p>
-
-<p>
-The <code>message-property</code> attribute identifies a property of type
-<a href="&apiroot;/Messages.html">Messages</a>,
-the localized messages from the invoking module.
-</p>
-
-<p>
-The <code>point-id-property</code> attribute identifies a String property that will
-be set to the service's extension point id.
-</p>
-
-<p>
-In addition, the various <set...> elements contained by the
<construct> element
-are used to set additional properties of the service implementation to different
values ... including
-other services (there's that IoC!). <set-configuration> sets a property of
the service
-implementation to the list of configuration point elements (not the configuration
point itself).
-</p>
-</section>
</body>
</document>
1.25 +3 -3 jakarta-commons-sandbox/hivemind/xdocs/services.xml
Index: services.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/services.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- services.xml 23 Sep 2003 22:23:51 -0000 1.24
+++ services.xml 24 Sep 2003 16:07:52 -0000 1.25
@@ -94,7 +94,7 @@
interface).
The most common example is the
- <a
href="&hivemind-registry;#service:hivemind.BuilderFactory">hivemind.BuilderFactory</a>
+ <a
href="commons-hivemind/BuilderFactory.html">hivemind.BuilderFactory</a>
service.
</p>
@@ -145,7 +145,7 @@
service extension point), adding the
functionality of that interface.
For example, the
-<a
href="&hivemind-registry;#service:hivemind.LoggingInterceptor">hivemind.LoggingInterceptor</a>
+<a href="commons-hivemind/LoggingInterceptor.html">hivemind.LoggingInterceptor</a>
factory creates an
instance that logs entry and exit to each
method.
</p>
1.7 +3 -3 jakarta-commons-sandbox/hivemind/xdocs/interceptors.xml
Index: interceptors.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/interceptors.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- interceptors.xml 23 Sep 2003 22:23:51 -0000 1.6
+++ interceptors.xml 24 Sep 2003 16:07:52 -0000 1.7
@@ -168,14 +168,14 @@
<p>
To use a service, it is necessary to declare the service in a module deployment
descriptor. The
AbstractServiceInterceptorFactory base class expects two properties to be set when
the service is constructed,
-<code>extensionId</code> and <code>factory</code>:
+<code>serviceId</code> and <code>factory</code>:
<source><![CDATA[
<service-point id="NullInterceptor"
interface="org.apache.commons.hivemind.ServiceInterceptorFactory">
<invoke-factory service-id="hivemind.BuilderFactory">
<construct class="com.example.impl.NullInterceptor"
- point-id-property="extensionId">
+ service-id-property="serviceId">
<set-service property="factory"
service-id="hivemind.ClassFactory"/>
</construct>
</invoke-factory>
1.2 +2 -1 jakarta-commons-sandbox/hivemind/library/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/library/xdocs/navigation.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- navigation.xml 19 Sep 2003 22:11:00 -0000 1.1
+++ navigation.xml 24 Sep 2003 16:07:52 -0000 1.2
@@ -6,6 +6,7 @@
<links>
<item name="HiveMind" href="../index.html"/>
+ <item name="HiveMind:Framework" href="../commons-hivemind/index.html"/>
</links>
</body>
1.2 +46 -4
jakarta-commons-sandbox/hivemind/framework/src/descriptor/META-INF/hivemodule.xml
Index: hivemodule.xml
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/descriptor/META-INF/hivemodule.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hivemodule.xml 20 Sep 2003 12:48:20 -0000 1.1
+++ hivemodule.xml 24 Sep 2003 16:07:52 -0000 1.2
@@ -139,7 +139,7 @@
<invoke-factory service-id="BuilderFactory">
<construct
class="org.apache.commons.hivemind.service.impl.LoggingInterceptorFactory"
- point-id-property="extensionId">
+ service-id-property="serviceId">
<set-service property="factory"
service-id="ClassFactory"/>
</construct>
</invoke-factory>
@@ -174,7 +174,7 @@
</description>
</attribute>
- <attribute name="point-id-property">
+ <attribute name="service-id-property">
<description>
The name of a property to assign the configuration
point id of the service to.
</description>
@@ -185,7 +185,7 @@
<read-attribute property="className"
attribute="class"/>
<read-attribute attribute="messages-property"
property="messagesPropertyName"/>
<read-attribute attribute="log-property"
property="logPropertyName"/>
- <read-attribute attribute="point-id-property"
property="extensionPointIdPropertyName"/>
+ <read-attribute attribute="service-id-property"
property="serviceIdPropertyName"/>
<invoke-parent method="addElement"/>
</rules>
@@ -228,6 +228,48 @@
</rules>
</element>
+ <element name="set-long">
+ <description>
+ Configures a property of the service instance to a long (64
bit) integer value.
+ </description>
+
+ <attribute name="property" required="true">
+ <description>The name of the property of the service
instance to configure.</description>
+ </attribute>
+
+ <attribute name="value" required="true">
+ <description>A long value to set the property
to.</description>
+ </attribute>
+
+ <rules>
+ <create-object
class="org.apache.commons.hivemind.service.impl.SetPropertyValue"/>
+ <read-attribute property="propertyName"
attribute="property"/>
+ <read-attribute property="value" attribute="value"
translator="long"/>
+ <invoke-parent method="addProperty"/>
+ </rules>
+ </element>
+
+ <element name="set-boolean">
+ <description>
+ Configures a property of the service instance to a boolean
value.
+ </description>
+
+ <attribute name="property" required="true">
+ <description>The name of the property of the service
instance to configure.</description>
+ </attribute>
+
+ <attribute name="value" required="true">
+ <description>A boolean value to set the property to.
Should be "true" or "false".</description>
+ </attribute>
+
+ <rules>
+ <create-object
class="org.apache.commons.hivemind.service.impl.SetPropertyValue"/>
+ <read-attribute property="propertyName"
attribute="property"/>
+ <read-attribute property="value" attribute="value"
translator="enumeration,java.lang.Boolean,true=TRUE,false=FALSE"/>
+ <invoke-parent method="addProperty"/>
+ </rules>
+ </element>
+
<element name="set-service">
<description>
Configures a property of the service instance to
another service.
1.2 +2 -2
jakarta-commons-sandbox/hivemind/library/src/java/org/apache/commons/hivemind/lib/impl/RemoteExceptionCoordinatorImpl.java
Index: RemoteExceptionCoordinatorImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/library/src/java/org/apache/commons/hivemind/lib/impl/RemoteExceptionCoordinatorImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RemoteExceptionCoordinatorImpl.java 19 Sep 2003 22:10:58 -0000 1.1
+++ RemoteExceptionCoordinatorImpl.java 24 Sep 2003 16:07:52 -0000 1.2
@@ -67,7 +67,7 @@
import org.apache.commons.hivemind.lib.RemoteExceptionListener;
/**
- * Core implementation of [EMAIL PROTECTED]
org.apache.commons.hivemind.service.RemoteExceptionCoordinator}.
+ * Core implementation of [EMAIL PROTECTED]
org.apache.commons.hivemind.lib.RemoteExceptionCoordinator}.
*
* @author Howard Lewis Ship
* @version $Id$
1.2 +2 -2
jakarta-commons-sandbox/hivemind/library/src/java/org/apache/commons/hivemind/lib/impl/NameLookupImpl.java
Index: NameLookupImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/library/src/java/org/apache/commons/hivemind/lib/impl/NameLookupImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NameLookupImpl.java 19 Sep 2003 22:10:58 -0000 1.1
+++ NameLookupImpl.java 24 Sep 2003 16:07:52 -0000 1.2
@@ -73,7 +73,7 @@
import org.apache.commons.lang.StringUtils;
/**
- * Standard implementation of the [EMAIL PROTECTED]
org.apache.commons.hivemind.service.NameLookup}
+ * Standard implementation of the [EMAIL PROTECTED]
org.apache.commons.hivemind.lib.NameLookup}
* service interface.
*
* @author Howard Lewis Ship
1.5 +3 -3
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java
Index: RegistryBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/RegistryBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RegistryBuilder.java 22 Sep 2003 20:05:59 -0000 1.4
+++ RegistryBuilder.java 24 Sep 2003 16:07:52 -0000 1.5
@@ -99,8 +99,8 @@
* here and in many of the related classes is divided into construction-time logic
* and runtime logic. Runtime logic is synchronized and threadsafe.
Construction-time logic
* is not threadsafe. Methods such as [EMAIL PROTECTED]
org.apache.commons.hivemind.impl.RegistryImpl#addModule(Module)},
- * [EMAIL PROTECTED]
org.apache.commons.hivemind.impl.ModuleImpl#addExtensionPoint(ConfigurationPoint)},
- * [EMAIL PROTECTED]
org.apache.commons.hivemind.impl.ConfigurationPointImpl#addExtension(Configuration)}
+ * [EMAIL PROTECTED]
org.apache.commons.hivemind.impl.ModuleImpl#addConfigurationPoint(ConfigurationPoint)},
+ * [EMAIL PROTECTED]
org.apache.commons.hivemind.impl.ConfigurationPointImpl#addConfiguration(Configuration)}
* and the like are construction-time. Once the registry is fully constructed, it
is not
* allowed to invoke those methods (though, at this time, no checks occur).
*
1.2 +4 -4
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/AbstractServiceExtensionPoint.java
Index: AbstractServiceExtensionPoint.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/AbstractServiceExtensionPoint.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractServiceExtensionPoint.java 22 Sep 2003 20:06:00 -0000 1.1
+++ AbstractServiceExtensionPoint.java 24 Sep 2003 16:07:52 -0000 1.2
@@ -73,8 +73,8 @@
import org.apache.commons.logging.LogFactory;
/**
- * Abstract implementation of [EMAIL PROTECTED]
org.apache.commons.hivemind.ServiceExtensionPoint}
- * that provides most of the machinery for creating new services ... subclasses
+ * Abstract implementation of [EMAIL PROTECTED]
org.apache.commons.hivemind.ServiceExtensionPoint}.
+ * Provides most of the machinery for creating new services ... subclasses
* implement different service models; the service models determine when the
* service is actually constructed.
*
@@ -220,7 +220,7 @@
}
/**
- * Checks the [EMAIL PROTECTED] #isBuilding() building flag}, throwing an
exception
+ * Checks the building flag, throwing an exception
* if true; this is used to detect unresolvable build cycles (which are
* now very rare, since most services use deferred service model).
*/
1.3 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ThreadedServiceExtensionPointImpl.java
Index: ThreadedServiceExtensionPointImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/impl/ThreadedServiceExtensionPointImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ThreadedServiceExtensionPointImpl.java 22 Sep 2003 20:06:00 -0000 1.2
+++ ThreadedServiceExtensionPointImpl.java 24 Sep 2003 16:07:52 -0000 1.3
@@ -195,7 +195,7 @@
* deferred one. The [EMAIL PROTECTED] DeferredServiceExtensionPointImpl}
implementation
* gets the actual service implementation in the generated method. Here we
* construct a method that always goes through the service extension point's
- * [EMAIL PROTECTED] #obtainServiceImplementation()}.
+ * [EMAIL PROTECTED] #getServiceImplementation()}.
*/
protected void addServiceAccessor(ClassFab classFab)
{
1.16 +26 -24 jakarta-commons-sandbox/hivemind/common/links.xml
Index: links.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/common/links.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- links.xml 23 Sep 2003 22:23:52 -0000 1.15
+++ links.xml 24 Sep 2003 16:07:52 -0000 1.16
@@ -1,74 +1,76 @@
<!-- $Id$ -->
-<!ENTITY apiroot 'commons-hivemind/apidocs/org/apache/commons/hivemind'>
-<!ENTITY base-registry 'commons-hivemind/base-registry'>
+<!ENTITY projectroot ''>
+
+<!ENTITY apiroot
'&projectroot;commons-hivemind/apidocs/org/apache/commons/hivemind'>
+<!ENTITY base-registry '&projectroot;commons-hivemind/base-registry'>
<!ENTITY hivemind-registry '&base-registry;/hivemind.html'>
<!ENTITY hivemind-lib-registry '&base-registry;/hivemind.lib.html'>
<!ENTITY _module '<code><module></code>'>
-<!ENTITY module '<a href="descriptor.html#module">&_module;</a>'>
+<!ENTITY module '<a href="&projectroot;descriptor.html#module">&_module;</a>'>
<!ENTITY _implementation '<code><implementation></code>'>
-<!ENTITY implementation '<a
href="descriptor.html#implementation">&_implementation;</a>'>
+<!ENTITY implementation '<a
href="&projectroot;descriptor.html#implementation">&_implementation;</a>'>
<!ENTITY _configuration-point '<code><configuration-point></code>'>
-<!ENTITY configuration-point '<a
href="descriptor.html#configuration-point">&_configuration-point;</a>'>
+<!ENTITY configuration-point '<a
href="&projectroot;descriptor.html#configuration-point">&_configuration-point;</a>'>
<!ENTITY _create-instance '<code><create-instance></code>'>
-<!ENTITY create-instance '<a
href="descriptor.html#create-instance">&_create-instance;</a>'>
+<!ENTITY create-instance '<a
href="&projectroot;descriptor.html#create-instance">&_create-instance;</a>'>
<!ENTITY _invoke-factory '<code><invoke-factory></code>'>
-<!ENTITY invoke-factory '<a
href="descriptor.html#invoke-factory">&_invoke-factory;</a>'>
+<!ENTITY invoke-factory '<a
href="&projectroot;descriptor.html#invoke-factory">&_invoke-factory;</a>'>
<!ENTITY _interceptor '<code><interceptor></code>'>
-<!ENTITY interceptor '<a href="descriptor.html#interceptor">&_interceptor;</a>'>
+<!ENTITY interceptor '<a
href="&projectroot;descriptor.html#interceptor">&_interceptor;</a>'>
<!ENTITY _description '<code><description></code>'>
-<!ENTITY description '<a href="descriptor.html#description">&_description;</a>'>
+<!ENTITY description '<a
href="&projectroot;descriptor.html#description">&_description;</a>'>
<!ENTITY _contribution '<code><contribution></code>'>
-<!ENTITY contribution '<a href="descriptor.html#contribution">&_contribution;</a>'>
+<!ENTITY contribution '<a
href="&projectroot;descriptor.html#contribution">&_contribution;</a>'>
<!ENTITY _service-point '<code><service-point></code>'>
-<!ENTITY service-point '<a
href="descriptor.html#service-point">&_service-point;</a>'>
+<!ENTITY service-point '<a
href="&projectroot;descriptor.html#service-point">&_service-point;</a>'>
<!ENTITY _schema '<code><schema></code>'>
-<!ENTITY schema '<a href="descriptor.html#schema">&_schema;</a>'>
+<!ENTITY schema '<a href="&projectroot;descriptor.html#schema">&_schema;</a>'>
<!ENTITY _parameters-schema '<code><parameters-schema></code>'>
-<!ENTITY parameters-schema '<a
href="descriptor.html#schema">&_parameters-schema;</a>'>
+<!ENTITY parameters-schema '<a
href="&projectroot;descriptor.html#schema">&_parameters-schema;</a>'>
<!ENTITY _element '<code><element></code>'>
-<!ENTITY element '<a href="descriptor.html#element">&_element;</a>'>
+<!ENTITY element '<a href="&projectroot;descriptor.html#element">&_element;</a>'>
<!ENTITY _attribute '<code><attribute></code>'>
-<!ENTITY attribute '<a href="descriptor.html#attribute">&_attribute;</a>'>
+<!ENTITY attribute '<a
href="&projectroot;descriptor.html#attribute">&_attribute;</a>'>
<!ENTITY _rules '<code><rules></code>'>
-<!ENTITY rules '<a href="descriptor.html#rules">&_rules;</a>'>
+<!ENTITY rules '<a href="&projectroot;descriptor.html#rules">&_rules;</a>'>
<!-- XML entities for the XML processing rules (documented seperately from the
rest). -->
<!ENTITY _create-object '<code><create-object></code>'>
-<!ENTITY create-object '<a href="rules.html#create-object">&_create-object;</a>'>
+<!ENTITY create-object '<a
href="&projectroot;rules.html#create-object">&_create-object;</a>'>
<!ENTITY _invoke-parent '<code><invoke-parent></code>'>
-<!ENTITY invoke-parent '<a href="rules.html#invoke-parent">&_invoke-parent;</a>'>
+<!ENTITY invoke-parent '<a
href="&projectroot;rules.html#invoke-parent">&_invoke-parent;</a>'>
<!ENTITY _read-attribute '<code><read-attribute></code>'>
-<!ENTITY read-attribute '<a href="rules.html#read-attribute">&_read-attribute;</a>'>
+<!ENTITY read-attribute '<a
href="&projectroot;rules.html#read-attribute">&_read-attribute;</a>'>
<!ENTITY _read-content '<code><read-content></code>'>
-<!ENTITY read-content '<a href="rules.html#read-content">&_read-content;</a>'>
+<!ENTITY read-content '<a
href="&projectroot;rules.html#read-content">&_read-content;</a>'>
<!ENTITY _set-module '<code><set-module></code>'>
-<!ENTITY set-module '<a href="rules.html#set-module">&_set-module;</a>'>
+<!ENTITY set-module '<a
href="&projectroot;rules.html#set-module">&_set-module;</a>'>
<!ENTITY _set-parent '<code><set-parent></code>'>
-<!ENTITY set-parent '<a href="rules.html#set-parent">&_set-parent;</a>'>
+<!ENTITY set-parent '<a
href="&projectroot;rules.html#set-parent">&_set-parent;</a>'>
<!ENTITY _custom '<code><custom></code>'>
-<!ENTITY custom '<a href="rules.html#custom">&_custom;</a>'>
+<!ENTITY custom '<a href="&projectroot;rules.html#custom">&_custom;</a>'>
1.3 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/ComplexModule.xml
Index: ComplexModule.xml
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/ComplexModule.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ComplexModule.xml 18 Sep 2003 19:00:59 -0000 1.2
+++ ComplexModule.xml 24 Sep 2003 16:07:52 -0000 1.3
@@ -12,7 +12,7 @@
<invoke-factory service-id="hivemind.BuilderFactory">
<construct
class="hivemind.test.services.impl.CountFactory"
- point-id-property="extensionId">
+ service-id-property="serviceId">
<set-service property="factory"
service-id="hivemind.ClassFactory"/>
</construct>
</invoke-factory>
1.3 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/BuilderAccessFailure.xml
Index: BuilderAccessFailure.xml
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/BuilderAccessFailure.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BuilderAccessFailure.xml 18 Sep 2003 19:00:59 -0000 1.2
+++ BuilderAccessFailure.xml 24 Sep 2003 16:07:52 -0000 1.3
@@ -7,7 +7,7 @@
<construct class="hivemind.test.services.impl.BuilderAccessImpl"
log-property="log"
messages-property="messages"
- point-id-property="EVIL"/>
+ service-id-property="EVIL"/>
</invoke-factory>
</service-point>
1.3 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/BuilderAccess.xml
Index: BuilderAccess.xml
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/services/BuilderAccess.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BuilderAccess.xml 18 Sep 2003 19:00:59 -0000 1.2
+++ BuilderAccess.xml 24 Sep 2003 16:07:52 -0000 1.3
@@ -7,7 +7,7 @@
<construct class="hivemind.test.services.impl.BuilderAccessImpl"
log-property="log"
messages-property="messages"
- point-id-property="extensionPointId"/>
+ service-id-property="extensionPointId"/>
</invoke-factory>
</service-point>
1.2 +9 -2 jakarta-commons-sandbox/hivemind/framework/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/xdocs/navigation.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- navigation.xml 16 Sep 2003 18:51:30 -0000 1.1
+++ navigation.xml 24 Sep 2003 16:07:52 -0000 1.2
@@ -6,9 +6,16 @@
<links>
<item name="HiveMind" href="../index.html"/>
+ <item name="HiveMind:Library" href="../commons-hivemind-lib/index.html"/>
</links>
-
+
+ <menu name="Services">
+ <item name="BuilderFactory" href="/BuilderFactory.html"/>
+ <item name="LoggingInterceptor" href="/LoggingInterceptor.html"/>
+ </menu>
+
<menu name="Reference">
+
<item name="HiveMind Registry Documentation"
href="/registry.html"/>
1.1
jakarta-commons-sandbox/hivemind/framework/xdocs/BuilderFactory.xml
Index: BuilderFactory.xml
===================================================================
<?xml version="1.0"?>
<!-- $Id: BuilderFactory.xml,v 1.1 2003/09/24 16:07:52 hlship Exp $ -->
<!DOCTYPE document [
<!ENTITY projectroot '../'>
<!ENTITY % common-links SYSTEM "common/links.xml">
%common-links;
]>
<document>
<properties>
<title>hivemind.BuilderFactory Service</title>
<author email="[EMAIL PROTECTED]">Howard M. Lewis Ship</author>
</properties>
<body>
<section name="hivemind.BuilderFactory">
<p>
The <a href="&hivemind-registry;#service:hivemind.BuilderFactory">BuilderFactory</a>
service is a
service implementation factory ... a service that is used to construct other
services.
</p>
<p>
The general usage of the BuilderFactory is:
<source><![CDATA[
<invoke-factory service-id="hivemind.BuilderFactory">
<construct class=". . ."
log-property=". . ."
messages-property=". . ."
service-id-property=". . .">
<set property=". . ." value=". . ."/>
<set-int property=". . ." value=". . ."/>
<set-long property=". . ." value=". . ."/>
<set-boolean property=". . ." value=". . ."/>
<set-service property=". . ." service-id=". . ."/>
<set-configuration property=". . ." configuration-id=". . ."/>
</construct>
</invoke-factory>]]></source>
</p>
<p>
The attributes of the <construct> element are used to instantiate the class
and set basic
properties. Additional <set-...> elements configure specific properties of
the implementation.
</p>
</section>
<section name="construct">
<table>
<tr>
<th>Element</th> <th>Required ?</th> <th>Description</th>
</tr>
<tr>
<td>class</td> <td>yes</td> <td>The complete name of the class to
instantiate, which must
have a public, no-arguments constructor.</td>
</tr>
<tr>
<td>log-property</td>
<td>no</td>
<td>The name of a property which will be assigned a
<code>org.apache.commons.logging.Log</code> instance for the
service. The Log is created from the complete service id (not
the name of the class). If
ommitted, no Log will be assigned.</td>
</tr>
<tr>
<td>messages-property</td>
<td>no</td>
<td>
Allows the
<a href="&apiroot;/Messages.html">Messages</a>
for the module to be assigned to a property of the instance.
</td>
</tr>
<tr>
<td>service-id-property</td>
<td>no</td>
<td>Allows the service id of the <i>constructed</i> service to be
assigned to a property of
the service implementation.</td>
</tr>
</table>
<p>
The remaining elements are enclosed by the <construct> element, and are used to
configure properties of the constructed service implementation.
</p>
</section>
<section name="set">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>value</td> <td>A string value to assigned to the property.</td>
</tr>
</table>
</section>
<section name="set-boolean">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>value</td> <td>A boolean value, either "true" or "false".</td>
</tr>
</table>
</section>
<section name="set-configuration">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>configuration-id</td> <td>The id of a configuration, either
a simple id for a
configuration within the same module as the constructed
service, or a complete id.
The property will be assigned a <code>List</code> of the
elements of the
configuration.</td>
</tr>
</table>
</section>
<section name="set-int">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>value</td> <td>An integer value.</td>
</tr>
</table>
</section>
<section name="set-long">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>value</td> <td>A long value.</td>
</tr>
</table>
</section>
<section name="set-service">
<table>
<tr>
<th>Attribute</th> <th>Description</th>
</tr>
<tr>
<td>property</td> <td>The name of the property to set.</td>
</tr>
<tr>
<td>service-id</td> <td>The id of a service,
either a simple id for a
service within the same module as the constructed service, or
a complete id.
The property will be assigned the service.</td>
</tr>
</table>
</section>
</body>
</document>
1.1
jakarta-commons-sandbox/hivemind/framework/xdocs/LoggingInterceptor.xml
Index: LoggingInterceptor.xml
===================================================================
<?xml version="1.0"?>
<!-- $Id: LoggingInterceptor.xml,v 1.1 2003/09/24 16:07:52 hlship Exp $ -->
<!DOCTYPE document [
<!ENTITY projectroot '../'>
<!ENTITY % common-links SYSTEM "common/links.xml">
%common-links;
]>
<document>
<properties>
<title>hivemind.LoggingInterceptor Service</title>
<author email="[EMAIL PROTECTED]">Howard M. Lewis Ship</author>
</properties>
<body>
<section name="hivemind.LoggingInterceptor">
<p>
The
<a
href="&hivemind-registry;#service:hivemind.LoggingInterceptor">LoggingInterceptor</a>
service is used to add logging capability to a service, i.e.:
<source><![CDATA[
<interceptor service-id="hivemind.LoggingInterceptor"/> ]]>
</source>
</p>
<p>
The service takes no parameters.
</p>
<p>
The logging interceptor uses a <code>Log</code> derived from the service id
(of
the service to which logging is being added).
</p>
<p>
The service logs, at debug level, the following events:
<ul>
<li>Method entry (with parameters)</li>
<li>Method exit (with return value, if applicable)</li>
<li>Thrown exceptions (checked and runtime)</li>
</ul>
</p>
</section>
</body>
</document>
1.3 +2 -3
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/Registry.java
Index: Registry.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/Registry.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Registry.java 18 Sep 2003 19:00:59 -0000 1.2
+++ Registry.java 24 Sep 2003 16:07:52 -0000 1.3
@@ -68,8 +68,7 @@
* and contains shortcuts for getting
* [EMAIL PROTECTED] org.apache.commons.hivemind.Module#getService(String, Class)
services}
* and
- * [EMAIL PROTECTED]
org.apache.commons.hivemind.Module#getExtensionPointElements(String)
- * extension point elements}.
+ * [EMAIL PROTECTED] org.apache.commons.hivemind.Module#getConfiguration(String)
configuration elements}.
*
* <p>
* A secondary function for the registry is to convert symbols
1.2 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/Configuration.java
Index: Configuration.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/Configuration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Configuration.java 18 Sep 2003 19:00:59 -0000 1.1
+++ Configuration.java 24 Sep 2003 16:07:53 -0000 1.2
@@ -73,7 +73,7 @@
public Module getContributingModule();
/**
- * Returns a List of [EMAIL PROTECTED] Element}, the representation of
+ * Returns a List of [EMAIL PROTECTED] org.apache.commons.hivemind.Element},
the representation of
* the XML elements in the extension. The ConfigurationPoint
* will use its [EMAIL PROTECTED] org.apache.commons.hivemind.schema.Schema}
(if present)
* to convert this XML representation into the object representation
1.2 +7 -7
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java
Index: AbstractServiceInterceptorFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractServiceInterceptorFactory.java 16 Sep 2003 18:51:10 -0000 1.1
+++ AbstractServiceInterceptorFactory.java 24 Sep 2003 16:07:53 -0000 1.2
@@ -82,7 +82,7 @@
* <p>
* Implementations of this service must be configured with:
* <ul>
- * <li>The extension point id assigned to the <code>extensionId</code> property
+ * <li>The service point id assigned to the <code>serviceId</code> property
* <li>The <code>hivemind.ClassFactory</code> service assigned to the
<code>factory</code> property
* </ul>
*
@@ -92,7 +92,7 @@
public abstract class AbstractServiceInterceptorFactory implements
ServiceInterceptorFactory
{
private ClassFactory _factory;
- private String _extensionId;
+ private String _serviceId;
private Map _cachedClasses;
{
@@ -126,7 +126,7 @@
HiveMind.format(
"AbstractServiceExtensionPoint.error-instantiating-interceptor",
new Object[] {
- _extensionId,
+ _serviceId,
serviceInterfaceClass.getName(),
stack.getServiceExtensionPointId(),
interceptorClass.getName(),
@@ -261,7 +261,7 @@
ClassFabUtils.addToStringMethod(
fab,
"<Interceptor: "
- + _extensionId
+ + _serviceId
+ " for "
+ stack.getServiceExtensionPointId()
+ "("
@@ -270,9 +270,9 @@
}
- public void setExtensionId(String string)
+ public void setServiceId(String string)
{
- _extensionId = string;
+ _serviceId = string;
}
public void setFactory(ClassFactory factory)
1.2 +2 -2
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/BuilderFactory.java
Index: BuilderFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/BuilderFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BuilderFactory.java 16 Sep 2003 18:51:09 -0000 1.1
+++ BuilderFactory.java 24 Sep 2003 16:07:53 -0000 1.2
@@ -126,7 +126,7 @@
ex);
}
- String name = parameter.getExtensionPointIdPropertyName();
+ String name = parameter.getServiceIdPropertyName();
if (name != null)
set(result, name, point.getExtensionPointId());
1.2 +6 -6
jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/BuilderParameter.java
Index: BuilderParameter.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/framework/src/java/org/apache/commons/hivemind/service/impl/BuilderParameter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BuilderParameter.java 16 Sep 2003 18:51:10 -0000 1.1
+++ BuilderParameter.java 24 Sep 2003 16:07:53 -0000 1.2
@@ -72,7 +72,7 @@
private String _className;
private List _properties = new ArrayList();
private String _messagesPropertyName;
- private String _extensionPointIdPropertyName;
+ private String _serviceIdPropertyName;
private String _logPropertyName;
public void addProperty(SetPropertyValue property)
@@ -95,9 +95,9 @@
_className = string;
}
- public String getExtensionPointIdPropertyName()
+ public String getServiceIdPropertyName()
{
- return _extensionPointIdPropertyName;
+ return _serviceIdPropertyName;
}
public String getLogPropertyName()
@@ -114,9 +114,9 @@
* Sets the name of a property to which the services' extension point id
* will be set.
*/
- public void setExtensionPointIdPropertyName(String string)
+ public void setServiceIdPropertyName(String string)
{
- _extensionPointIdPropertyName = string;
+ _serviceIdPropertyName = string;
}
/**
1.2 +2 -2
jakarta-commons-sandbox/hivemind/library/src/descriptor/META-INF/hivemodule.xml
Index: hivemodule.xml
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/hivemind/library/src/descriptor/META-INF/hivemodule.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hivemodule.xml 19 Sep 2003 22:11:00 -0000 1.1
+++ hivemodule.xml 24 Sep 2003 16:07:53 -0000 1.2
@@ -82,7 +82,7 @@
<invoke-factory service-id="hivemind.BuilderFactory">
<construct
class="org.apache.commons.hivemind.lib.impl.EJBProxyFactory"
- point-id-property="pointId">
+ service-id-property="pointId">
<set-service property="nameLookup" service-id="NameLookup"/>
<set-service property="classFactory"
service-id="hivemind.ClassFactory"/>
<set-service property="coordinator"
service-id="RemoteExceptionCoordinator"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]