Do you want to turn of the logging of sql?
You'll need to set on of the log properties [1] but I'm not sure which
one relates to the sql being logged, sorry.
You can do this as show below..
<!-- JPA EntityManagerFactory -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
<property name="database" value="POSTGRESQL"/>
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="openjpa.jdbc.SynchronizeMappings"
>buildSchema(ForeignKeys=true)</prop>
<prop key="openjpa.Log">DefaultLevel=TRACE, Tool=TRACE</prop>
</props>
</property>
</bean>
[1]
http://openjpa.apache.org/builds/1.0.0/apache-openjpa-1.0.0/docs/manual/ref_guide_conf_openjpa.html#openjpa.Log
On 9/20/07, Evgeny Shepelyuk <[EMAIL PROTECTED]> wrote:
> Hello!
>
> Im using OpenJPA with Spring transactional management and EntityManager
> injection to DAO under Postgresql 8.2.1
>
> Seems when new EntityManager is created those queries are executing to
> database
>
> SELECT t.typlen FROM pg_catalog.pg_type t, pg_catalog.pg_namespace n WHERE
> t.typnamespace=n.oid AND t.typname='name' AND n.nspname='pg_catalog'
> SELECT setting FROM pg_catalog.pg_settings WHERE name='max_index_keys'
>
>
> Can anyone help with this issue ?
> My question is can those queries be removed by adjusting some settings in
> JPA configuration ?
>
> --
> Best Regards
> Evgeny K. Shepelyuk
>