Just curious... What is the standard procedure for closing database connections? Does system.exit(0) automatically do this? And if it does, is just calling this method the proper way to shut down a connection, or should I do a con.close() and then a System.exit(0)? What's the difference? Thanks in advance!
System.exit(0) is a method that kills the main() thread in an application. It has nothing to do with your database Connection. The proper way is to use the close() method in the Connection API. That will close the connection to your Database cleanly.
As a general rule, any time you use non-java resources you are going to be responsible for disposing of them. That includes all JNI libraries, as well as things like database connections and file descriptors. If the driver is 100% java, it may be smart enough to dispose of itself correctly when exit the JVM, but I wouldn't count on that behavior.
Joined: Feb 28, 2001
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com