I have a problem that seemed easy to me at first, but now I cannot find a way to solve it. I have Object1 that establishes a database connection in its constructor. In one of Objects1 methods I create Object2.
I want to access a database connection (established by Object1) in Objects2 constructor. Is this possible (I have to use Objects1 variable)?? How can I solve that?