private String getID() {
        String returnID;
        FileInputStream fstream = null;
        try {
            String filePath = getClass().getProtectionDomain().getCodeSource().getLocation().toString();

            //file path calculation when deployed in NetBeans
//            int endindex = filePath.indexOf("dist/gfdeploy");
//            filePath = filePath.substring(6, endindex);
//            filePath = filePath + ("Warehouse-ejb/src/java/topology/activeobject/warehouseID.txt");

            //file path calculation when deployed in cmd
            filePath = filePath.substring(6);
            filePath = filePath + ("topology/activeobject/warehouseID.txt");

            fstream = new FileInputStream(filePath);
            DataInputStream in = new DataInputStream(fstream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            returnID = br.readLine();
            System.out.println("..............................PROXY WAREHOUSE ID: "+returnID);
            return returnID;
        } catch (FileNotFoundException ex) {
            return "Warehouse";
        } catch (IOException ex) {
            return "Warehouse";
        } finally {
            try {
                fstream.close();
            } catch (IOException ex) {
                Logger.getLogger(SearchResult.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }