I am using hibernate in my java project but the hibernate i am using is a legacy one means the version which i am using is hibernate 3 more over i am using the hibernate of spring one that is spring dedicated hibernate ,
i was going through net and found regarding p6SPY . jar in which the queries generated by hibernate so instead of question marks the actual parmeter values are reflected which is very helpful from developer point of view , here is the link which i have gone through
http://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-solution/
now i want to have same functionality for my application also but as i have told earlier that i am using hibernate which is spring oriented moreover our hibernate configuration is done in a single xml itself as shown below but please advise how i can configure such functionality of P6SPY in my application my hibernate xml is as shown below..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-lazy-init="true" default-autowire="no">
<bean id="dataSource" class="com.persist.NullConnectionCheckerOracleDataSource" destroy-method="close">
<property name="user" value="GTO"/>
<property name="password" value=""/>
<property name="connectionCachingEnabled" value="true"/>
<!-- <property name="connectionCacheName" value="ia"/> -->
<property name="connectionCacheProperties">
<props>
<prop key="MaxLimit">20</prop>
<prop key="MinLimit">0</prop>
<prop key="InactivityTimeout">0 </prop>
<prop key="ConnectionWaitTimeout">60</prop>
<prop key="PropertyCheckInterval">60</prop>
<prop key="ValidateConnection">true</prop>
</props>
</property>
<property name="URL">
<value>jdbc:oracle:thin:@ldap://ccs.fm.ldap://ccsgcm.gcm.com:4042ldap://hkg0799xus.fm.</value>
</property>
<property name="connectionProperties">
<props>
<prop key="oracle.net.ldap_loadbalance">OFF</prop>
<prop key="v$session.osuser">@db.osuser@</prop>
<prop key="v$session.program">@db.program@</prop>
</props>
</property>
</bean>
<bean id="sessionFactoryTemplate" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configurationClass" value="org.hibernate.cfg.Configuration"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.jdbc.batch_size">30</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">false</prop>
<prop key="hibernate.max_fetch_depth">10</prop>
<prop key="hibernate.default_batch_fetch_size">150</prop>
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
<prop key="hibernate.connection.autoReconnect">true</prop>
<prop key="hibernate.connection.release_mode">on_close</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<prop key="hibernate.cache.provider_configuration_file_resour ce_path">./config/ehcache-processor1/ehcache.xml</prop>
<prop key="hibernate.cache.use_structured_entries ">true</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
</props>
</property>
</bean>
<bean id="txnManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="hibernateSession" class="com.persist.HibernateSessionImpl">
<constructor-arg><ref bean="sessionFactory"/></constructor-arg>
<property name="txnManager" ref="txnManager"/>
</bean>
<bean id="hibernateAdmin" class="com.persist.HibernateAdministrationImpl">
<constructor-arg><ref bean="sessionFactory"/></constructor-arg>
<constructor-arg><ref bean="&sessionFactory"/></constructor-arg>
</bean>
<bean id="systemProcessConfig" class="com.persist.SystemProcessConfiguration">
<constructor-arg index="0" value="gp"/>
<constructor-arg index="1" value="gp"/>
</bean>
</beans>