Subject | Re: [Firebird-Java] JNDI Resource URL again |
---|---|
Author | Rick Fincher |
Post date | 2002-12-19T19:42:58Z |
Hi Andrew,
One possibility is to set up firebirdsql as a named data source independent
of your web app and put the data source info in your WEB-INF/web.xml for
your app to use.
This also has the advantage that you can move, rename, or otherwise change
your database and you don't have to change your web app. You just update
Tomcat's server.xml file and restart the app.
If you do it that way, you can also use the DBCP pooling mechanism to pool
your connections and improve performance.
The parameters to your data sources don't change very often but applications
usually change quite frequently, so separating data sources and apps makes
sense.
Rick
One possibility is to set up firebirdsql as a named data source independent
of your web app and put the data source info in your WEB-INF/web.xml for
your app to use.
This also has the advantage that you can move, rename, or otherwise change
your database and you don't have to change your web app. You just update
Tomcat's server.xml file and restart the app.
If you do it that way, you can also use the DBCP pooling mechanism to pool
your connections and improve performance.
The parameters to your data sources don't change very often but applications
usually change quite frequently, so separating data sources and apps makes
sense.
Rick
----- Original Message -----
> Hi all,
>
> As I know FB database connection parameters accepted only if specified
> right in resource URL. The parameters must be separated by '&'
> symbol. That symbol causes xml parser error and should be replaced by
> '&', like below:
>
> <parameter>
> <name>url</name>
>
>
<value>jdbc:firebirdsql:127.0.0.1/3050:/data/db?lc_ctype=WIN1251&sql_rol
e_name=robot</value>
> </parameter>
>
> It works fine till I want deploy my application using Tomcat manager.
> The deployment works fine, but when Tomcat manager inserts context of
> the application into server.xml, it translates '&' to '&' again.
> That is why Tomcat fails at next start.
>
> How to work it around? I'd like to provide parameters as a normal
> <parameter></parameter>, but it does not work.
>
> Thanks ahead.
>
> Andrew