I have connection leak problem in my application , i see that number of connections creep up as days pass by finally they are all consumed, we ar using oracle toplink, and orien server are there any tools available that would help me figure out the connection leaks , i did some research and found tools like JDBMonitor , but i wasnt sure if they can help me figure out connection leaks or just SQL performance monitoring
I would go ask this in the TopLink forum. I dont think watching dB connection would help, it has to be tied to the software, and I'm thinking something like this is probably possible to see with the right log level.
I haven't worked with TopLink but it seems to me that monitoring the DB connections won't help you find where the TopLink Session is not being properly closed which presumably is responsible for closeing the connection.
This is a common problem not only with TopLink, but also with Hibernate, JPA, and straight JDBC. One thing you can use to help avoid this type of problem is Spring. Spring has a variety of classes that implement the Template pattern. These Template classes, i.e. JdbcTemplate/JpaTemplate/ToplinkTemplate/HibernateTemplate relieve your code from having to deal with managing these resources.
When your code calls on ToplinkTemplate to perform an operation, it will make 1 or more callbacks into your code with a Session that it creates using a TopLink SessionFactory. You can then perform whatever Session operations are needed. After your code returns, Spring will make sure the Session and any other resources are cleaned up. This allows your code to focus on delivering business functionality and not resource management.
Say goodbye to cut-and-paste boilerplate resource management code that is so easy to screw up.
[ November 15, 2007: Message edited by: Ken Krebs ]
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
The jamon jdbc driver is proxy that can use any underlying jdbc driver including oracles. With it you can track many things about jdbc and sql including: jdbc method calls (such as close) on Connection/Statement/ResultSet, sql performance stats for each sql command, SQL exceptions. The jamon jdbc driver requires no code changes just change your connection url and driver class.
jamon also allows you to monitor web pages, log4j method calls, and ejb3 invocations all without changing any code (via a jboss/tomcat valve, log4j appender, ejb3 inerceptor). If you use spring there is also a jamon interceptor that comes as part of Spring.
JAMon is open source and available at my links below. You can also view a live demo in the links below.