|
| Re: 'Connection has already been closed'. Random error connecting with |
 |
Wed, 30 Apr 2008 10:00:16 -070 |
Fabio Eusebi wrote:
> Seems a good code, many thanks.
> Now, the fact is that I'm using the DBDAO class as an abstract class in the
new architecture, and every table in the db has the corrisponding DAO that
extends it with many methods for the CRUD. The methods get the conn calling
getConnection(). They don't close the connection as they may need to continue
the transaction.
> So, in the new DAO classes the conn is treated like this.
>
> But the problem happens in the old code, that doesn't make use of these
methods, it only retrieves the conn from the Connessione class. It's used in a
method for the items in a combo box, and that method finds it closed. I don't
understand who can close it.
What version of WLS are you using? Who is managing the transaction?
You can close the connection all you want if WLS is managing the tx.
WLS will manage connections and the tx. Show me your full exception
|
| Post Reply
|
|
|
|
|
|
|
|
|
|