Dependency Injection

Hello guys i want to ask if someone knows to explain how DI works in SnapLogic.
For example i want to set one object in one component and after that to be able to inject and use it in other components i have tried with DependencyManager but i was not getting any success doing that way, maybe i am doing something wrong. Can you please describe to me how it works in SnapLogic?
Thanks a lot.

We use Google’s Guice library for DI. Sounds like you’re on the right path with DependencyManager interface. How/where are you implementing that interface? Are you implementing it in your snap class? What does your implementation look like? It should typically look something like this (you may or may not want to specify SINGLETON):

public Module getManagedModule() {
    return new AbstractModule() {
        protected void configure() {