java - Mixture of Hibernate and Raw JDBC app is locking up -


i took on company's java web application stands @ 30k lines of code. there 20 users on system. application did raw jdbc sql queries. have converted of sql hibernate, because of time , budget constraints have not converted of it. thinking mixture of 2 db interaction methods (hibernate , raw jdbc), while incrementally migrate app hibernate. it's using c3p0 connection pooling. uses 2 pools; 1 hibernate , 1 raw jdbc queries. there raw jdbc update , insert queries, using hibernate's session.dowork(work work) hook. db microsoft sql server '08 r2.

the problems experience approach seem manifest app locking up. past month, have been able reduce frequency of lock-ups fixing obvious problems. @ point now, cause not obvious, , boss , suspect there fundamentally wrong in our approach or configuration solve problem entirely.

one thing confusing me if these lock-ups db deadlocks, thread dumps seem indicate write blocking read. however, transaction isolation level read-committed, why write block read?

are there suggestions can give? suggestions better debugging analyis?

here properties persistence.xml file

<property name="hibernate.dialect" value="org.hibernate.dialect.sqlserverdialect"/> <property name="hibernate.archive.autodetection" value="class, hbm"/> <property name="hibernate.c3p0.min_size" value="20" /> <property name="hibernate.c3p0.max_size" value="300" /> <property name="hibernate.c3p0.timeout" value="300" /> <property name="hibernate.c3p0.max_statements" value="50" /> <property name="hibernate.c3p0.idle_test_period" value="3000" /> 

i'm using default c3p0 configuration raw jdbc select queries

i presume have solved issue if not check link out http://docs.jboss.org/hibernate/orm/3.6/reference/en-us/html/transactions.html

you can start checking application doesn't have long open transactions.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -