Subject | Re: [Firebird-Java] How to get connections count? |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-08-26T17:08:15Z |
> I use Firebird with Tomcat 5 and get connections byI will assume that you use our connection pool in Tomcat. If you use a
> DataSource.getConnection()
different one, you have to post question in the corresponding list.
> I have a serious problem, that after some steps getConnection()You can enable logging and check the log files. For more details see
> hangs in one point in my app. I know that it can behave like that
> when I forget closing connections so I close them every time.
> But the problem exist and is repeatable. I can log in my app exactly
> 5 times, on the sixth try it hangs. Maybe I forgot to close
> connection somewhere, how can I check it?
http://jaybirdwiki.firebirdsql.org/FAQ/JayBirdLogging
> Is it possible to see how many connections are in the memory, evenSee release notes. Pool classes have runtime properties that tell how many
> by debugging into Jaybird sources?
connections are in the pool and how many are in the application: freeSize,
workingSize and totalSize.
> Or maybe there can be other reasons my getConnection() hangs?You have to close statements all the time because when you write your code
> Especially: should I close Statement after every createStatement()?
you cannot be sure whether pool with do this for you when you return your
connection back to the pool. Our pool closes all Statement on close() and
pools PreparedStatements.
Roman