Problems encountered in proxool and c3p0 and Solutions

Source: Internet
Author: User

Which of the following is the high efficiency of proxool and c3p0? The benevolent sees benevolence, the wise sees wisdom, I did not dare to say, it seems that c3p0 has a higher reputation, so it adopted c3p0 ..

As a result, this guy nested the servlet in the web page and then the servlet to execute this command, why not? Finally, I wrote another class to execute it. It turned out to be OK. Later I found that, debugging in any class is OK, even if the servlet creates a new main for execution, it is OK, but it cannot be done in doget () or dopost, as long as initialization is executed, it will not work.

As for the reason, when you see the proxool configuration, it is said that the data source pool must be started first. I think I used the write class initialization method when configuring c3p0, so it is post-execution, so no.

 

So there is no way to switch to c3p0. This is why I am smart. I don't need to test it on the webpage first. Because the webpage HTML test shows no error in myeclipse, I want to execute it in the main method of the class.

I tested this method for one night. Later I went to Google and said that it could not be executed in the main class. Everything else would work. Dizzy !!

If it is changed to web page execution, it still does not work. It turns out that the proxool. xml cannot contain Chinese characters, even comments.

I deleted all the Chinese characters in XML with a skeptical attitude. It turned out OK !!

In this article, we will commemorate it.

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.