Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop JPA Facet on Eclipse from updating all the time?

Tags:

I have a EJB2/EJB3 Java project in Eclipse. I recently enabled JPA Facet and now installed Dali and configured access to the MySQL DB containing the actual tables and data.

The problem is, editing entity beans in IDE Java editor became 100-1000 times slower. Write one word, see "Update JPA Project" appear on status bar, wait 30 seconds CPU under high load, Eclipse totally unresponsive, then continue and write next word..

The project that makes JPA slow is medium-sized, not just a simple webstore, but not enterprise-class either. I count 42 Stateless Session Beans and 49 Entity Beans. We actually have more entity beans, but many of them have not yet been converted to EJB 3, but are mapped only with EJB 2.1 instead.

The longest of the session beans spans 20616 lines, longest methods being a hair below 2k lines.

The slowness of JPA is so severe, it makes also typing code slow. After every 5-10 characters the Eclipse goes into complete halt for several seconds and content-assist is almost unusable, because it keeps triggering Eclipse's internal time-outs.

So, the question is: How do I keep the JPA Facet enabled for the project and still make it not lag all the real work? Some simple toggle switch that would just disable the JPA part and then later re-enable would be lovely.

like image 492
Zds Avatar asked Sep 09 '11 09:09

Zds


1 Answers

A friend of mine has recently shown me a way to disable the constant "JPA Facet" updates after "Maven update" operations.

Please try this: on menu Window >> Preferences >> Maven >> Java EE Integration

  • disable the "JPA Configurator" option.

enter image description here

like image 176
Jose Tepedino Avatar answered Oct 07 '22 01:10

Jose Tepedino