You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by "Domsch, Christian" <Ch...@entire.de> on 2005/02/17 10:35:27 UTC

Constructing a service from a singleton

Hi,

I have a question regarding construction of services. I want to know, if it
is possible to have a singleton as a service implementation. As I see from
the docs and source, the BuilderFactory  tries to construct a new instance
from the service-implementation and the uses this. This would cleary not
function with my singleton as it has a private constructor.

And no, i cannot put the singleton under complete control of hivemind, and
get rid of the singleton behaviour of this class.

Greetings,

Christian Domsch.

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


Re: Constructing a service from a singleton

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Hi Christian,

There is currently no such functionality in hivemind - builder factory  
does require public constructors.  There is talk about adding a injector  
service so that any object could be injected with the appropriate services  
it requires - would that be of any help?

There is of course the option to create your own instance factory.

Cheers,

Johan

On Thu, 17 Feb 2005 10:35:27 +0100, Domsch, Christian  
<Ch...@entire.de> wrote:

> Hi,
>
> I have a question regarding construction of services. I want to know, if  
> it
> is possible to have a singleton as a service implementation. As I see  
> from
> the docs and source, the BuilderFactory  tries to construct a new  
> instance
> from the service-implementation and the uses this. This would cleary not
> function with my singleton as it has a private constructor.
>
> And no, i cannot put the singleton under complete control of hivemind,  
> and
> get rid of the singleton behaviour of this class.
>
> Greetings,
>
> Christian Domsch.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>



-- 
you too?

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