Results 1 to 1 of 1
Thread: To many opened threads
- 07-08-2010, 12:47 PM #1
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
To many opened threads
Jboss, Remote EJB, Swing and Mysql.
I have a EJB 3.0 of session in JBoss. This Ejb connect with Mysql with Hibernate. I consume this EJB with a Swing app.
When you run it, it make a session ejb, connect to Mysql, Extract data and disconnect. In each call to this, it keep a connection opened In Mysql (Sleep) and a thread on Jboss opened.
Mysql crash beacause it keep to many connections opened. JBoss crash beacuse it have to many threads opened.
When swing disconnect from JBoss, why it not clase Mysql connection and delete thread of JBoss?
######### HIBERNATE ########
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE hibernate-configuration ...>
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MyS QLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql .jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/test?zeroDateTimeBehavior=convertToNull</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.connection.password">pass</property>
<property name="hibernate.current_session_context_class">org .hibernate.context.ThreadLocalSessionContext</property>
<!-- <property name="hibernate.show_sql">true</property>
<property name="org.hibernate.SQL">DEBUG</property>
<property name="org.hibernate">DEBUG</property>
-->
<property name="hibernate.c3p0.timeout">100</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.maxIdleTime">120</property>
<property name="hibernate.c3p0.idle_test_period">300</property>
<mapping resource="DB/conf/Empresa.hbm.xml" />
</session-factory>
</hibernate-configuration>
Similar Threads
-
writing to an opened file..
By eponcedeleon in forum Advanced JavaReplies: 1Last Post: 02-23-2010, 09:01 PM -
how to check the window has already opened
By javastuden in forum AWT / SwingReplies: 3Last Post: 01-29-2010, 07:26 AM -
Deleting a File that is opened
By ravian in forum Advanced JavaReplies: 6Last Post: 01-30-2008, 02:05 PM -
Reading an already opened file
By Java Tip in forum Java TipReplies: 0Last Post: 01-25-2008, 06:50 PM -
How to know the ports opened by JVM
By sandeepspatil in forum Advanced JavaReplies: 1Last Post: 08-02-2007, 01:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks