File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Spring and DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring and DAO " Watch "Spring and DAO " New topic

Spring and DAO

Krishna Kumar P

Joined: Aug 10, 2006
Posts: 4
i am developing a web application with Struts + Spring
i am inserting my dao(using IOC) into my delegate class, it works fine initially without any problem, but when the application is not used for couple of days(but left running in UAT) and then when i do something i get an "Connection you are trying to use is already been closed" exception, i am using ms-sql server
cn someone please help me on why this is happening.
Wirianto Djunaidi
Ranch Hand

Joined: Mar 20, 2001
Posts: 210

As the message said, your connection has already been closed.

How do you use your connection? How do you get them? How do you close them?
Do you use connection pooling? Do you get them from DataSource?

Can't help you without knowing more details on how your application is implemented.
Krishna Kumar P

Joined: Aug 10, 2006
Posts: 4
i use connection pooling
i am loading it from context file....
i have a basedao class.... which has the connection.... all my dao's extend this basedao....
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276


Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names.



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Spring and DAO
It's not a secret anymore!