View not returning updated BD data

Asked

Viewed 48 times

-1

I have a bank view that when I register a new record the same view brings the outdated values to my listing. It only brings the data up to date if I take down the server and go up again.

I am using Spring Data and below follows more details to help:

@RequestMapping("/serviceList")
public ModelAndView getMenuServiceList(Model model) {
    ModelAndView mv = new ModelAndView("service/serviceList");

    // Dados estão chegando desatualizados!!!
    List<VwOpenService> openServiceList = serviceFacade.getOpenServiceList();       

    mv.addObject("serviceListRegister", openServiceList);
    countOfBudgets(model);  
    return mv;
}

Service layer

public List<VwOpenService> getOpenServiceList() {
    return vwOpenService.findAll();
}

Repositorio (Spring Data)

@Repository
public interface OpenServiceRepository extends BaseRepository<VwOpenService, Long>{

    List<VwOpenService> findAll();

}

1 answer

1

The problem was unique and exclusively related to cache, so it was enough to add the following property to my entity @Cache(isolation=CacheIsolationType.ISOLATED) of Eclipselink that ended up getting the problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.