Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 83647 invoked from network); 10 Jan 2006 10:10:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jan 2006 10:10:57 -0000 Received: (qmail 37570 invoked by uid 500); 10 Jan 2006 10:10:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37540 invoked by uid 500); 10 Jan 2006 10:10:42 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37529 invoked by uid 99); 10 Jan 2006 10:10:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 02:10:42 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.15.11.7] (HELO msgfront.mogul.com) (193.15.11.7) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 02:10:41 -0800 Received: from msgint01.mogul.com ([172.17.1.7]) by msgfront.mogul.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 10 Jan 2006 11:12:32 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [SPAM] - Re: Avoid duplication of database settings - Number of numbers in MIME From exceeds maximum threshold Date: Tue, 10 Jan 2006 11:12:36 +0100 Message-ID: <9D1353FB3C471E4F8A402F53B19627FA9EB3D8@webmail.mogul.se> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SPAM] - Re: Avoid duplication of database settings - Number of numbers in MIME From exceeds maximum threshold Thread-Index: AcYVGFr6yA0/Ax6MRUm7zp0zgMMRJAABqn7QACrRI9AAANNbMA== From: "Fredrik Rubensson" To: "Tomcat Users List" X-OriginalArrivalTime: 10 Jan 2006 10:12:32.0756 (UTC) FILETIME=[5EFA8340:01C615CE] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >>> I have an application consisting of a web application and some stand >>> alone java clients. Both the web application and the java clients use=20 >>> 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