I have some JDBC code that is retrieving data from Oracle.

In my method I use a prepared statement, however I don't close that prepared statement.
To test it I ran this in a loop and sure enough I got an exception:

```
ORA-01000: maximum open cursors exceeded

```

My question is in case of a managed environment (code deployed on a Java EE Application Server using connection pools):

* What happens to the application?
* Will it never be able to fire any SQL query to the database unless the connection is closed / recycled? (assume that there is only 1 connection in the pool)

I'm assuming as connections in the pool are not really closed - the oracle session will be alive.