You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Hart, Justin" <JH...@sfa.com> on 2003/12/16 20:11:37 UTC
JDBC from TagSupport
Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about the same as I would from any other java application.
What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm?
Justin
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: JDBC from TagSupport
Posted by Philipp Taprogge <Ph...@gmx.net>.
Hi!
Hart, Justin wrote:
> Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file.
> What does this get you? Every example that I have read tells me
that I need to open a JDBC connection just about
> the same as I would from any other java application.
>
> What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm?
The main advantage is that you can use a connection pool like
jakarta-commons-dbcp which saves you a lot of runtime. The second
advantage is that you can configure the connection parameters like db
URL, username, password and the like on the fly without editing java
sources or redeploying your application.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org