Hi,
We're using Hibernate (without JPA) to manage data persistence towards Google Cloud SQL and we're experiencing serious performance issues when Hibernate initialises. This seems to occur in Configuration.buildSessionFactory(). I found some information on the Internet indicating that the problem might be caused by Hibernate scanning the class path for annotated entities. The question is how we can disable that feature so I can verify that this is indeed the problem. However, I can't find a property setting for hibernate.cfg.xml to do this. I found that JPA's persistence.xml has a boolean property <exclude-unlisted-resources> that might help but we're not using JPA...
Does anybody have experience with these startup problems? If so, is it caused by the class path scanning? Google assures us that the delay is not in setting up a connection with Google Cloud SQL. Indeed, when debugging I do not see any serious delays in the SessionFactory.openSession() which sets up the connection. The delay is purely in Configuration.buildSessionFactory().
Thanks!
Ralph
|