Edward,
I really appreciate your comments. However, I tried to start my example with exactly what I think the problem is in the code. You posted: "Where's the code... let's see it." Then I go and post all the code and you point me to a discussion on best practices in forum posting. Thanks. I did not want to post all that code in the first place.
And, as the subject of my
thread suggests, I already know you can't pass a Connection, have no intention of passing a Connection and as far as I can tell I have dereferenced all instances of Connection before any object that uses one is passed to a Client.
I understand how memory works - just a little work with JNI will teach you all you need to know about addresses in memory.
The problem has to be occurring within these data objects because there is no other place in the code that I used a Connection (which is why I did not post all the RMI code in the first post since I presume everyone here already knows what RMI looks like).
All my data objects work similarly. The Connection has been closed and set to null before any caller can ask for any object that takes one of these data objects in the constructor. Yet, somehow I'm holding reference to a Connection and RMI is trying to pass that reference down. I'm trying to figure out how I'm holding reference, not if I should be holding reference to a Connection.
Best,
Al