You've got the right idea, you code just needs some refactoring. You don't need to store server dns, port, and path to database in your "argument" hashmap: you can safely assume that there will be only one server running at any time. Consequently, all you need to keep in your map is the database name and its instance of data, along with its lockmanager. So the structure of your map may look like this:
[databasename --> (instance of Data, instance of lockmanager)]
That is, database name (without the path) is the key, and the pair (instance of Data, instance of lockmanager) is the value. My RemoteDataFactoryImpl class is very similar, but it's just 20 lines long. Talking about the class name, I would avoid "ConnectionFactoryTry": first, your class name should be a noun (or a combination of nouns/adjectives), and second, the postfix "try" in the class name may scare the users to instantiate/use the class
Eugene.
[ January 27, 2003: Message edited by: Eugene Kononov ]