Some thoughts on practicing Java JDCB with Apache Dbutils

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.