Question

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();

}
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top