views:

76

answers:

1
+2  Q: 

Slow JPA startup

I created the JPA 2.0 entity classes for our whole database (~200 tables), and now each time I rebuild my application and start it for the first time I get these messages:

INFO: <entity_classname> actually got transformed
INFO: <entity_otherclassname> actually got transformed
...

And the output of these (info) messages in Glassfish is extremely slow, it now takes almost a minute (!) to start the application.

I think the messages are the problem, because sometimes the Glassfish console freezes in the Netbeans window (no messages are output) and then the whole process takes about 5 seconds.

I couldn't find a way to disable these messages, is there a way to speed things up?

+1  A: 

I think that this is due to dynamic weaving of your JPA classes. Could you try with static weaving (or no weaving at all but this will disable things like lazy-loading)?

Pascal Thivent
Or, as an alternative, try to disable weaving at all?
MRalwasser
Based on the link above, setting *eclipselink.weaving* to *false* solved my headache (and will try static weaving as well for our daily builds - now that I know about it), so from now on only those classes are transformed that are actually used. Thanks a lot!
Gabor Kulcsar
@Gabor Note that disable weaving will disable things like lazy loading. I'd suggest to weave them for production.
Pascal Thivent
Thanks... this helped me!
Garis Suero