You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eli Doran <el...@gmail.com> on 2005/08/25 01:50:39 UTC

hivemind factory service

I'm having a hard time figuring this out and am hoping you may point me 
in the right direction.

I have a class say, BigFactory, that produces an object  My problem is 
how do I make a service-point for the object produced by BigFactory 
using the threaded model? I'm thinking I use <invoke-factory 
model="threaded" service-id="BigFactoryServicePoint"> somehow. But this 
means the BigFactory must implement some interface right? which one? 
Create an implementation of the unknown interface that uses BigFactory 
internally to create its objects?
I basically need to know how to hook hivemind's creation mechanism to 
the factory's getTheObject method.

My goal is to be able to inject the result into some of my 
pages/components and have it per request and only when actually accessed.

~eli



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


Re: hivemind factory service

Posted by Eli Doran <el...@gmail.com>.
Thank you, worked wonderfully.

*John.Prince@bedag.ch* wrote:

> Hi,
>
> Just have your factory implement
> org.apache.hivemind.ServiceImplementationFactory and rename your
> getTheObject method to implement createCoreServiceImplementation.
>
> <service-point interface="com.dummy.YourObject" id="YourObject">
> <invoke-factory service-id="BigFactory"
> model="threaded"/>
> </service-point>
> <service-point
>
> interface="org.apache.hivemind.ServiceImplementationFactory"
> id="BigFactory"
> parameters-occurs="none">
> <create-instance class="com.dummy.BigFactory"/>
> </service-point>
>
> should do it
>
> Best wishes
>
> John
>
> -----Original Message-----
> From: Eli Doran [mailto:eli.doran@gmail.com]
> Sent: Thursday, August 25, 2005 1:51 AM
> To: tapestry-user@jakarta.apache.org 
> <ma...@jakarta.apache.org>
> Subject: hivemind factory service
>
>
> I'm having a hard time figuring this out and am hoping you may point me
> in the right direction.
>
> I have a class say, BigFactory, that produces an object My problem is
> how do I make a service-point for the object produced by BigFactory
> using the threaded model? I'm thinking I use <invoke-factory
> model="threaded" service-id="BigFactoryServicePoint"> somehow. But this
> means the BigFactory must implement some interface right? which one?
> Create an implementation of the unknown interface that uses BigFactory
> internally to create its objects?
> I basically need to know how to hook hivemind's creation mechanism to
> the factory's getTheObject method.
>
> My goal is to be able to inject the result into some of my
> pages/components and have it per request and only when actually
> accessed.
>
> ~eli
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 
> <ma...@jakarta.apache.org>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 
> <ma...@jakarta.apache.org>
>
>
>
> Post generated using Mail2Forum (http://www.mail2forum.com)
>
>
> Eli Doran wrote:
>
>> I'm having a hard time figuring this out and am hoping you may point 
>> me in the right direction.
>>
>> I have a class say, BigFactory, that produces an object  My problem 
>> is how do I make a service-point for the object produced by 
>> BigFactory using the threaded model? I'm thinking I use 
>> <invoke-factory model="threaded" service-id="BigFactoryServicePoint"> 
>> somehow. But this means the BigFactory must implement some interface 
>> right? which one? Create an implementation of the unknown interface 
>> that uses BigFactory internally to create its objects?
>> I basically need to know how to hook hivemind's creation mechanism to 
>> the factory's getTheObject method.
>>
>> My goal is to be able to inject the result into some of my 
>> pages/components and have it per request and only when actually 
>> accessed.
>>
>> ~eli
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>