문제

In my J2EE application I have the classe Reservation. To add a new Reservation I do:

public boolean addReservation(Reservation r) {
    try{
    reservationFacade.create(r);
    }catch(Exception e){return false;};
    return true;
}

This add immediately a new record in my db, but if I do a findAll() in my application, I can't see my new Reservation!!

I have this reservationFacadeLocal:

@Local
public interface ReservationFacadeLocal {

void create(Reservation r);

void edit(Reservation r);

void remove(Reservation r);

Reservation find(Object id);

List<Reservation> findAll();

List<Reservation> findRange(int[] range);

int count();

}
도움이 되었습니까?

해결책

I resolved the problem with em.refresh(entity);

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top