Tommaso De Sica Messages: 110 Registered: March 2012 Location: Italy
Senior Member
Goodmorning all,
I'm going to realize something like a Singleton object in Eclipse 4.
I've got a class (MyLogger) and other classes should share an istance of it.
This idea can be realized through injection? I tried to use @Singleton annotation, but I did not understand how it works.
Well I'm not sure about the @Singleton contract either, the easiest way
although to inject the same instance into all your POJOs is to put the
MyLogger-Instance in the IEclipseContext of the MApplication.
Tom
Am 01.08.12 15:48, schrieb Tommaso De Sica:
> Goodmorning all,
>
> I'm going to realize something like a Singleton object in Eclipse 4.
> I've got a class (MyLogger) and other classes should share an istance of
> it.
> This idea can be realized through injection? I tried to use @Singleton
> annotation, but I did not understand how it works.
>
> Very thank you.