をリークしmemorryそれだけで100を持っている場合は、あまりにも多くのエンティティ(約2000エンティティ)
を持っていますオブジェクトエンティティ、それはスタートアップの正常です。
しかし、私はすべてのビジネスエンティティクラス(2000)を追加しましたが、パージェムスペースエラーが発生しました。
マイプロジェクト休止状態-jpa2.1を<br> 、私はJavaEE7を使用していますGlassFishの起動が非常に遅く、休止状態JPAにあまりにも多くのエンティティをスキャンするか
2016-12-29T11:40:36.903+0700|Severe: Exception in thread "DynamicReloader"
2016-12-29T11:40:36.904+0700|Severe: java.lang.OutOfMemoryError: GC overhead limit exceeded
2016-12-29T11:40:37.899+0700|Severe: Exception in thread "AutoDeployer"
2016-12-29T11:40:37.900+0700|Severe: java.lang.OutOfMemoryError: GC overhead limit exceeded
私は、JVMメモリパラメータを改善しましたが、今、私のアプリケーションは、起動時に非常に遅いです。
このエンティティを高速に読み込むオプションがあるかどうかはわかりますか?事前に 感謝は
これは、例えばエンティティである
@Entity
@Table(name = "TBL_USER")
@NamedQueries({
@NamedQuery(name = "TblUserO.findAll", query = "SELECT t FROM TblUserO t")
})
public class TblUserO implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "USER_ID", unique = true, nullable = false, precision = 11)
private Long userId;
あなたは、あなたのアプリが今始めることができるように、十分な(permgenない)ヒープメモリを増加したが、としている
<persistence-unit name="c1spostgre1" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/__PSG1</jta-data-source>
<!-- Named JPQL queries per entity, but any other organization is possible -->
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
<!-- <property name="hibernate.archive.autodetection" value="class" /> -->
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL92Dialect" />
<property name="hibernate.jdbc.batch_size" value="20" />
<property name="hibernate.order_updates" value="true"/>
<property name="hibernate.order_inserts" value="true"/>
</properties>
</persistence-unit>
<persistence-unit name="c1spostgre2" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>jdbc/__PSG2</jta-data-source>
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
<!-- <property name="hibernate.archive.autodetection" value="class" /> -->
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL92Dialect" />
<property name="hibernate.jdbc.batch_size" value="20" />
<property name="hibernate.order_updates" value="true"/>
<property name="hibernate.order_inserts" value="true"/>
</properties>
</persistence-unit>