Unespected message solved, it was due to the fact that I
forgot to remove the property element named loadTimeWaver
from within the entityManagerFactory bean declaration
element.
After removing it no more messages and everithing goes fine.
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="estePU3"
/>
<!-- only when classes are not enhanced -->
<!-- <property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.SimpleLoadTimeWeaver"
/>
</property> -->
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
<property name="databasePlatform"
value="org.apache.openjpa.jdbc.sql.PostgresDictionary" />
</bean>
</property>
</bean>
> The thing I can't understand is that una app (just
> servlet/dirct + use of EntityManager) is fine, JPA doesn't
> print any unespected message and performance increase is
> huge. The second app is a Spring/JPA web app that uses
> JpaTemplate
> prints the following line:
>
> 163398 estePU3 INFO [http-10080-1] openjpa.Enhance -
> Creating subclass for "[class
> it.lhtc.este.domain.Request]". This means that your
> application will be less efficient and will consume more
> memory than it would if you ran the OpenJPA enhancer.
> Additionally, lazy loading will not be available for
> one-to-one and many-to-one persistent attributes in types
> using field access; they will be loaded eagerly instead.
Andrea Martano
--------------
LiteHouse srl
Milano - Italy