Hi to all, i have a big issue with my application. I'm working with Hibernate 3 and JPA with Struts 2 application using Glassfish for debug the application (in Netbeans 6.7). I have a problem because my application sometimes freezes and i don't know why, but when i see in toad looking for open connections or something like that and i see that some queries hangs into the connection, queries that are generated by hibernate from hql query.
I don't understand why happens that, the queries doesn't look complex or something like that, for example this is one of the queries:
Code:
entityMngr.createQuery("FROM WbkParametrosGenerales " +
" WHERE codParametro ='WBK_WS_SERVER_PATH' and codEmpresa = 1 AND codAplicacion = 'WBK' ");
And in each request, thanks to struts 2 interceptor, when the request goes to server, i initialize an entitymanager and transaction, and when i finished to do all my stuff, i close the entitymanager, os i just can't find what's the problem. On the configuration side, i don's see anything special, take a look:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="MyPU" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source/>
<properties>
<property name="hibernate.connection.username" value="usr"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
<property name="hibernate.connection.password" value="pass"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@192.100.100.100:1521:MYSID"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<property name="hibernate.c3p0.min_size" value="1" />
<property name="hibernate.c3p0.max_size" value="60" />
<property name="hibernate.c3p0.timeout" value="1000" />
</properties>
</persistence-unit>
</persistence>
So, first of all i want to ask you if you know a possible cause of my problem, and/or if you know a way to monitor in detail my application operation and find the specific cause of my problem, i don't know, some software tool to monitor that.
Thanks in advance.