src/com/vehiclerental/MpiNodeManager.java
/**
     * Load available branches from the database and define the current branch based on the current node cluster ID
     * @param rank current node cluster ID
     * @throws DatabaseAccessFailedException if the database can't be used
     */
Load available branches from the database and define the current branch based on the current node cluster ID
@param rank current node cluster ID
@throws DatabaseAccessFailedException if the database can't be used
Load available branches from the database and define the current branch based on the current node cluster ID @param rank current node cluster ID @throws DatabaseAccessFailedException if the database can ' t be used
private void loadBranchesFromDatabase(int rank) throws DatabaseAccessFailedException {
        BranchService branchService = ServiceFactory.getBranchService();
        for (Branch branch: branchService.getAllBranches()) {
            NodeConfiguration.Current.branches.put(branch.getId(), branch);
            if (rank == branch.getClusterId()) {
                NodeConfiguration.Current.nodeBranch = branch;
            }
        }
    }
private void loadBranchesFromDatabase ( int rank ) throws DatabaseAccessFailedException { BranchService branchService = ServiceFactory . getBranchService ( ) ; for ( Branch branch : branchService . getAllBranches ( ) ) { NodeConfiguration . Current . branches . put ( branch . getId ( ) , branch ) ; if ( rank == branch . getClusterId ( ) ) { NodeConfiguration . Current . nodeBranch = branch ; } } }
Load available branches from the database and define the current branch based on the current node cluster ID
 @param rank current node cluster ID
 @throws DatabaseAccessFailedException if the database can't be used
Load available branches from the database and define the current branch based on the current node cluster ID @param rank current node cluster ID @throws DatabaseAccessFailedException if the database can ' t be used