In my application , i have a class named LockManager which control the lock and unlock . i think i will need a hashMap in this class. The key is the recNo and the value is the lockCookie of the correspond recNo. And the lockManager has a function named setMap(Map hashMap){ this.hashMap = hashMap; } My question is where can i put the hashMap's declaretion , in Server.java or other place?