I just came up with another brain teaser
scenario: My data.java is a singleton..i've done because it seemed logical as 2 clients accessing the same db file must be using the same instance of data.java.
but what happens when you have 2 clients, accessing different db files? The singleton pattern no longer works as 2 distinct instances of data.java are now needed for each db file.
There is a workaround to this by modifying the singleton pattern so that data.java now has a static map of data.java instances where the key is the db filename.
This seems like overkill..ne thoughts?