[
http://issues.apache.org/jira/browse/HIVEMIND-72?page=comments#action_54827 ]
Istvan Orban commented on HIVEMIND-72:
--------------------------------------
I'm not sure I'm right as I'm totally new to Hivemind,
but after having look at the hivemodule.xml in the library.jar I think it lacks
all the fancy stuff from BuilderFactory.
(also having taken a look of the source code, it's not calling the
BuilderFactoryLogic functions either)
Istvano
<service-point id="ServicePropertyFactory"
interface="org.apache.hivemind.ServiceImplementationFactory">
Creates a service that dynamically (i.e., on each service method
invocation) obtains a property
from another service and forwards the invocation to the property. The
property must be
the same type (or assignable to) the constructed service's interface.
Typically,
the targeted service uses a threaded (or similar) service model, thus
requiring dynamic,
rather than static, access.
<invoke-factory>
<construct class="org.apache.hivemind.lib.impl.ServicePropertyFactory">
<set-service property="classFactory" service-id="hivemind.ClassFactory"/>
</construct>
</invoke-factory>
<parameters-schema>
<element name="construct">
<attribute name="service-id" required="true" translator="service">
The service which contains the property.
</attribute>
<attribute name="property" required="true">
The name of the property of the target service to expose.
</attribute>
<conversion
class="org.apache.hivemind.lib.impl.ServicePropertyFactoryParameter">
<map attribute="service-id" property="service"/>
<map attribute="property" property="propertyName"/>
</conversion>
</element>
</parameters-schema>
</service-point>
> BuilderFactory extension
> ------------------------
>
> Key: HIVEMIND-72
> URL: http://issues.apache.org/jira/browse/HIVEMIND-72
> Project: HiveMind
> Type: Improvement
> Components: framework
> Reporter: Istvan Orban
> Priority: Minor
>
> Hi,
> I asked about this thing on the mailing list, since it was not a bad idea I
> though it's best to create here.
> If you have a service (B) which can only be instanciated by an other
> factory service (A). you have to write your own factory class which
> implements the
> ServiceImplementationFactory. I have seen some example of doing it.
> I think this is a general problem that. the BuilderFactory should not
> instance the class by calling it's contructor but to call an other
> service's method.
> would extending the BuilderFactory be a good idea on the following way.
> <invoke-factory service-id="hiveMind:BuilderFactory">
> <construct class="MyServiceB"
> contructor-service-id="MySerciceA" constructor-method="createServiceB">
> .....
> <event-listener
> service-id="hivemind.ShutdownCoordinator"/>
> </construct>
> </invoke-factory>
> with these extra tags one could specify which method of the MyServiceA
> returns an instance of the MyServiceB
> so I can use all the power of the Configuration and Autowite provided
> already by the the BuilderFactory etc.
> I'm asking this because I have seen examples (providing hivernate
> session and transaction stuff) where they just implemented the
> 'ServiceImplementationFactory' but then you have to write again all the
> cool function which does the autowite and all other cool stuff for you....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]