Bear Bibeault wrote:And, when I said "always", I actually meant in web apps. When you say non-JEE, do you mean Swing, or do you mean a single-threaded console application? Perhaps a connection pool may be overkill in a single-threaded console app, where you'll only need to worry about one connection at a time.
I tend to write a lot of utility programs, they will beat on the DBMS, read gigabytes of data, say for loading a complex tree of objects. If I'm going to use them, they are simple shell program driven. If I expect others, I'll use Swing and stick up a simple GUI.
But behind the startup facade, I use huge libraries of business logic that are also used in webapi with
tomcat and lots of servlet stuff. Rarely is a "simple shell program" not using multiple threads, daemons, etc.
So the answer is "yes"
I want the same code to work with ten lines of Java from a shell, and tens of thousands of lines in a JEE container.