0

When my application first sets up a UserTransaction for Hibernate, it takes ten minutes to do so. I have gone through the stack and it hangs on a UUID.generateRandom().

Andremoniy
  • 34,031
  • 20
  • 135
  • 241
  • can you provide some code so we can see what you are doing? – moeTi Mar 01 '13 at 12:44
  • which OS/arch are you running? – beny23 Mar 01 '13 at 12:47
  • Could it be that you face timeout issues related to TCP/IP? There are four different basic types of UUIDs: time-based, DCE security, name-based, and randomly generated UUIDs. DCE is TCP/IP related. – stacker Mar 01 '13 at 12:48
  • 2
    possibly related: http://stackoverflow.com/questions/137212/how-to-solve-performance-problem-with-java-securerandom – beny23 Mar 01 '13 at 12:49
  • `/dev/random` may be slow, but we're talking *milliseconds* slow, not *minutes*. – Marko Topolnik Mar 01 '13 at 12:51
  • It is internal Hibernate. The system is Windows and the UUID is randomly generated. The programme is running as a service. Oddly, it depends on the user that is used for running the service. The standard system user works fine, but i need to use a user from the workgroup (for sharing reasons). Then it takes 10-15 min. – Mischa Andriesse Mar 04 '13 at 10:36
  • The problem is caused when we transferred from Hibernate 3.x to 4.x. The followig code has been added `serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry()`. The system hangs on this (The slow call `UUID.randomUUID()` is called in there) – Mischa Andriesse Mar 04 '13 at 12:31

0 Answers0