Yes, basically it'd be a service that's dependent upon itself...

public class MyService implements MyServiceI
{
  private MyServiceI self;

  public void setSelf( MyServiceI self )
  {
    this.self = self;
  }

  public Foo findObject()
  {
    return new Foo( self );
  }
}

-----Original Message-----
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 09, 2005 7:00 PM
To: [email protected]; Viktor Szathmary
Subject: Re: referencing "self" in a service


BTW ... you can have HiveMind inject the service proxy into the service
implementation, just like any other collaborating service.

On 5/9/05, Viktor Szathmary <[EMAIL PROTECTED]> wrote:
> On 5/9/05, Pablo Lalloni <[EMAIL PROTECTED]> wrote:
> >
> > Or better:
> >
> >  <service-point id="MyService" interface="com.example.MyServiceI">
> >         <invoke-factory>
> >                 <construct class="com.example.MyService"
service-id-property="aProperty"/>
> >         </invoke-factory>
> >  </service-point>
> >
> 
> thanks, injecting the service-id works well for me. (and it is cool :)
> 
> > Now we have support natively in HiveMind 1.1 for serialization with 
> > a similar approach but you have to call registry.setupThread() 
> > before the functionality can be used on a given thread.
> 
> seems like it worked fine without setupThread in alpha-2 (but not in 
> beta-1)... but I suspect the reason for this change was this: "Allow 
> for running with multiple Registries. (HLS) Fixes HIVEMIND-83"
> 
> thanks,
>  viktor
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to