I'm new to using Hibernate. And my problem is: I'm developing a desktop application. This application is used in different computers. When a computer adds a new user to my database, the other computer can't see the new user until he does not close and open the application again.
I undestand that is because the sessionFactory is different.
I use Hibernate to read users.
session = Settings.sessionFactory.openSession();
String selectSql = "select c.idClient, c.name FROM Clients c WHERE c.active=1 ORDER BY c.name";
Query query = session.createQuery(selectSql);
List<Object[]> listUsers = query.list();
for (Object[] data : listUsers)
{
cmbClient.addItem(new ItemCombobox(data[0].toString(), data[1].toString()));
}