tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fredrik Rubensson" <fredrik.rubens...@mogul.com>
Subject Re: Avoid duplication of database settings
Date Tue, 10 Jan 2006 10:17:24 GMT

Sorry about the "antispammed" subject in my previous post.

>>> I have an application consisting of a web application and some stand
>>> alone java clients. Both the web application and the java clients
use 
>>> a database. The problem is that the database configuration is 
>>> duplicated.
>
>> If you are doing it the ant way I recommend using filtering.
>
> Thanks for the suggestion. I will have a look at it.
>
>Do you know if frameworks like Spring or Hibernate solves this kind of
problems?

I don't know about spring but in hibernate there is one configuration
file that you can share between webapp and standalone clients. (Using it
in my current project.) If you only use Hibernate to access your
database you will be fine. It is also possible to get the DataSource
from the hibernate configuration if you want to access the database
directly (for performance reasons). I have some SQL scripts that need
the database info so I use filtering anyway both as a way to have the
configuration values in one place and as a way to easily build for
different environments.

Regards,
Fredrik



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message