//JbsUsersLocal userManagement = (JbsUsersLocal) context.lookup("JbsUsersBean/local");
JbsUser rootUser = userManagement.findUser("root");
while (it.hasNext()) {
Customer customer = it.next();
Customer exCustomer = this.findDataset(customer.getId());
if (exCustomer!=null) {
logger.debug("Changing customer "+customer.getId());
customer.setOwner(exCustomer.getOwner());
customer.setGroup(exCustomer.getGroup());
customer.setWriteGroup(exCustomer.isWriteGroup());
customer.setWriteUser(exCustomer.isWriteUser());
customer.setWriteOther(exCustomer.isWriteOther());
customer.setReadGroup(exCustomer.isReadGroup());
customer.setReadUser(exCustomer.isReadUser());
customer.setReadOther(exCustomer.isReadOther());
this.updateDataset(customer, rootUser);
} else {
logger.debug("Adding new customer "+customer.getId());
this.createDataset(customer, rootUser, company);
}