JSF 2.3 project with delay in initial connection

Asked

Viewed 23 times

0

I am making a system using Java1.8, JSF 2.3, Hibernate 5.4.x and Tomcat 9, with standard MVC and entitymanager.

The problem is that to save the first object in a form, it takes about 3 to 5 seconds. Then, everything is normal. I believe it is the initial start of Entity. This is normal?

Thanks in advance for the help of friends.

  • 1

    Without seeing your source code or at least the application logs, you can’t know for sure. However, I’ve seen several cases where Hibernate only does object-relational mapping in the first attempt to access the bank, causing behavior exactly like the one you described, so it’s very likely to be that. In fact, I’d say the normal thing is for him to do just that.

  • I did some tests and this is exactly what I found out. I realized this by chance. As my system boots into persistence.xml with a "create-and-drop", it recreates all entitys in each reboot. I tested taking this parameter and everything returned to normal. But anyway, thank you so much for the answer.

No answers

Browser other questions tagged

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