You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Fairouz Fakhfakh <fa...@hotmail.com> on 2012/02/26 10:54:35 UTC
inject instance iPOJO
Hello,
I'm using iPOJO in my application
and I would like to inject a service
instance in another class. How can
I do that?
Do you have an example, please?
Thank you for answering me.
Best regards,
--
Fairouz FAKHFAKH
Master student
Research
group ReDCAD
National School of Engineers of Sfax , Tunisia
Re: inject instance iPOJO
Posted by Clement Escoffier <cl...@gmail.com>.
Hi,
By default iPOJO (1.8.0+) is using proxies, so you can give the service object to any other objects:
@Requires
private LogService m_log;
//...
public Helper createHelper() {
return new Helper(m_log);
}
Regards,
Clement
On 26.02.2012, at 10:54, Fairouz Fakhfakh wrote:
>
> Hello,
>
> I'm using iPOJO in my application
> and I would like to inject a service
>
> instance in another class. How can
> I do that?
>
> Do you have an example, please?
>
> Thank you for answering me.
>
> Best regards,
>
>
>
>
>
> --
>
> Fairouz FAKHFAKH
>
> Master student
>
> Research
> group ReDCAD
>
> National School of Engineers of Sfax , Tunisia
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org