मैं इस जेपीएकॉन्टेनर + हाइबरनेट को काम कर रहा हूं और इसे लोड करने में काफी समय लगता है। उदाहरण के लिए SQLContainer लोडिंग 60ms और जेपीए कंटेनर लोडिंग 1.30 के साथ एक ही पृष्ठ के साथ पृष्ठ।वाडिन जेपीए कॉन्टैनेर
कंसोल में जेपीएकॉन्टेनर के साथ मैं कई SQL क्वेरी देखता हूं - प्रत्येक इकाई - क्वेरी के लिए; इकाई व्यक्ति के पास अन्य तालिकाओं के लिंक नहीं होते हैं; jpacontainer साथ
कोड:
SQLContainer साथJPAContainer<Person> container = JPAContainerFactory.make(Person.class,
"persistence-unit");
table.setContainerDataSource(container);
कोड:
JDBCConnectionPool pool = null;
try {
pool = new SimpleJDBCConnectionPool("org.postgresql.Driver",
"jdbc:postgresql://127.0.0.1:5432/postgres", "postgres",
"pwd");
} catch (SQLException e) {
e.printStackTrace();
}
TableQuery tq = new TableQuery("Person", pool);
SQLContainer sqlContainer = null;
try {
sqlContainer = new SQLContainer(tq);
} catch (SQLException e) {
e.printStackTrace();
}
table.setContainerDataSource(sqlContainer);
मेरे persistence.xml फ़ाइल:
<persistence-unit name="persistence-unit" transaction-type="RESOURCE_LOCAL">
<jta-data-source>java:jboss/datasources/mfc-frontendDS</jta-data-source>
<properties>
<!-- Properties for Hibernate -->
<property name="hibernate.archive.autodetection" value="class"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
</properties>
क्या मैं गलत कर रहा हूँ?
ध्यान दें कि वाडिन के जेपीए कंटेनर में वर्तमान में एक * मुफ्त लाइसेंस * है। –