The main is to read the study summary (41)--apache's dbutils framework to learn this article. So I want to test this DB class. (Although the current development status is a fool-type use of the frame to copy)
The process of using some of the thoughts recorded.
Class of: http://commons.apache.org/proper/commons-dbutils/download_dbutils.cgi
I mainly do the Java Web. But in order to test a class to run all kinds of things a little row. Recall a previous project. Change directly in that project. (The Hibernate travel source code uses AWT swing, not the Web) to be intuitive. Take the first chapter of the source code change.
One, make a joke. I use ant to compile the project times Lib package no (the code package under the net is not very normal) in the thought of AWT Swing also want to package? Baidu did not have a bit. Think about it and know it's built-in. The original is the JDBC driver package did not, Dizzy dead. Copy any other items. Ok
Two, the layout headache. There's no time to practice. Saying. It's all code generation controls, all right? About this build. In fact, there are a number of extension issues to discuss. Temporarily stranded
Three. Apache Dbutils This class requires a data source. DataSource I really don't know what it is. But also give him a data connection dataconnection. This I know. is the user name password after the creation of the Conn ....
It's not successful at first. Originally I was in the original preservation method and then get a dbutils save. The original hard code was found and the connection was closed after saving. So I had to be in my new class. Create a connection again. Whether the connection can be made into a static singleton mode. It should be ok. Didn't get it. Next time you need to fill it up. The other business is also very fun.
Four. Already practiced in the same situation. Honestly continue with hibernate. The company project matters. Hey. Remember to clarify the DataSource and the Singleton.
Some thoughts on practicing Java JDCB with Apache Dbutils