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.