Bu JPAContainer + Hazırda Bekletme çalışıyorum ve yüklenmesi uzun zaman alıyor. Örneğin SQLContainer 60ms yükleme ve JPA Konteynır yükleme 1.30 ile aynı sayfa.Vaadin JpaContainer
Konsolda JPAContainer ile her bir varlık için birçok SQL sorgusu görüyorum - sorgu; Varlık Kişisinin diğer tablolara bağlantıları yoktur; jpacontainer ile
Kodu: SQLContainer ile
JPAContainer<Person> container = JPAContainerFactory.make(Person.class,
"persistence-unit");
table.setContainerDataSource(container);
Kodu:
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);
Benim persistence.xml dosyası: Neyi yanlış yapıyorum
<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>
?
Vaadin'in JPA konteynerinin * ücretsiz bir lisans * olduğunu unutmayın. –