Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Eager loading EntityManagerFactory

    We are using EMFProviderLMT with Hibernate for Locally Managed Transactions on the server part (Tomcat). Everything works fine and the EntityManagerFactory gets built when the first client request comes in.

    However, to speed up the first request we would like to create the EntityManagerFactory instance eager when the container gets started. Is this somehow possible?

    Thanks
    Krigu

    #2
    Hi krigu,

    I never did anything in this area, but if it is working as you describe why not create an unmapped dummy servlet in web.xml with <load-on-startup>1</load-on-startup> and have this servlet issue some dummy fetch?

    Best regards
    Blama

    Comment

    Working...
    X