Hmmm. Well, in your case it may be better to do it that way. But, I
would have to say that, unless you are embedding the db into the
application, the customer is still going to need to set up the database
connection paramaters, correct? The concept of the container was
always to manage resources for you. So, I have always recommended that
you use this (the j2ee) strategy. The concept of just copying a war
file and having it work is not what our j2ee overloard spec makers
intended. There was always a "deployer" role that configured the
application for deployment, whether it be at deployment time or
pre-deployment (meaning creating the appropriate descriptor files for
the target app server).
But, again, you can still always do it the way you are saying. You can
have your own connection pool.
The real problem by using your own connection pool is when you have
more than one application using the same database. Now you no longer
have a central area to configure connections and such for the shared
database. You now have maintain <i>n</i> number of pools for the same
resource. This can be a real hassle. What if you were given only 10
connection to a DB? how do you divide that between 3 applications?
So, that is just a hypothetical.
> Hmmm. Well, in your case it may be better to do it that way. But, I
> would have to say that, unless you are embedding the db into the
> application, the customer is still going to need to set up the database
> connection paramaters, correct?
True, though I did explicitly say I was addressing the case of an
application contained in a war file "with its own dedicated DB".
The concept of the container was
> always to manage resources for you. So, I have always recommended that
> you use this (the j2ee) strategy. The concept of just copying a war
[quoted text clipped - 3 lines]
> pre-deployment (meaning creating the appropriate descriptor files for
> the target app server).
Good point.
> But, again, you can still always do it the way you are saying. You can
> have your own connection pool.
Right, and this is the point I was trying to make. Not that
container-managed persistence and pooling are "wrong" per se. Just that
they're not necessarily "right" either, which your previous response
seemed to imply.
HT