These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: newbie: too many connections using netbeans and hibernate
PostPosted: Thu Oct 08, 2009 10:31 am 
Newbie

Joined: Thu Oct 08, 2009 9:59 am
Posts: 1
Hello.

I am very new to all this so dont slap me please and i realy need some help.
Basically my Problem is about too many connections using hibernate with netbeans IDE. They cant help me on netbeans forums so i hope to find advise here.

I guess ill have to tell the entire story.
I am working on a java database application. To be honest my application is not very complex and id rather be happy to not use any persistence because i am not familiar with hibernate and dont have that much time until deadline to dig it all out. Netbeans IDE however offers hibernate support and you dont have to set it all up yourself and take all the advantages of hibernate without knowing much about it.

Netbeans IDE does a good job and i am happy with the results. Everything is clicked together in few minutes and actualy it works. But there is one problem that bothers me. When my application starts to interact with the database it creates new jdbc connections but it doesnt close them when its done. After a while the server refuses any more connections due to too many of them. I could go and kill the connections manually from mysql prompt but i am not happy with that for obvious reasons. It seems not to be my newbieness because even examples that come with netbeans act the same way. If i wasnt using any persistence i could open and close connections from within the application when ever i needed. But if i understood it right hibernate does manage the connections itself. I couldnt find anything about how i could force hibernate to close connections at a certain point within application.

So what can i do about it?

thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.