Return-Path: Delivered-To: apmail-db-ojb-user-archive@www.apache.org Received: (qmail 40175 invoked from network); 14 Jun 2005 07:24:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jun 2005 07:24:45 -0000 Received: (qmail 25632 invoked by uid 500); 14 Jun 2005 07:24:43 -0000 Delivered-To: apmail-db-ojb-user-archive@db.apache.org Received: (qmail 25599 invoked by uid 500); 14 Jun 2005 07:24:43 -0000 Mailing-List: contact ojb-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "OJB Users List" Reply-To: "OJB Users List" Delivered-To: mailing list ojb-user@db.apache.org Received: (qmail 25581 invoked by uid 99); 14 Jun 2005 07:24:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from kika.risksys.ch (HELO kika.risksys.ch) (212.126.163.142) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 14 Jun 2005 00:24:37 -0700 Received: from localhost (kika [127.0.0.1]) by kika.risksys.ch (Postfix) with ESMTP id 2C19AF for ; Tue, 14 Jun 2005 09:24:22 +0200 (CEST) Received: from kika.risksys.ch ([127.0.0.1]) by localhost (kika.risksys.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01539-03 for ; Tue, 14 Jun 2005 09:24:19 +0200 (CEST) Received: from [192.168.0.32] (darl.office.risksys.ch [192.168.0.32]) by kika.risksys.ch (Postfix) with ESMTP id E8FC0DB2 for ; Tue, 14 Jun 2005 09:24:19 +0200 (CEST) Message-ID: <42AE86E1.3050901@risksys.com> Date: Tue, 14 Jun 2005 09:27:29 +0200 From: Danilo Tommasina Organization: RCS AG User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050517) X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Users List Subject: Re: AW: Location of repository.xml References: In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at risksys.com X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Frank, I do not see why it should make a difference if your app is delivered in a WAR file, if you put your OJB.properties and repository.xml in the WEB-INF/classes you will not need any extra configuration, it is up to the servlet container to load the files directly from the WAR file or from the unpacked application. You do not need to set any absolute paths. bye danilo > Thanks Thomas, that works fine. > The problem for me is my webapp is installed by an installer as a WAR file. When Tomcat starts up the WAR file is extracted and OJB has to find it's configuration. So my idea was to install the configuration files in a separate folder outside the home directory of my webapp. I added the config directory to the classpath, but this does not help. > > So I think I have two choices: > 1. Let the installer set "repositoryFile" in OJB.properties to the correct path. > 2. Put the repository.xml into WEB-INF/classes, as you suggested. > > Or is there a third one? > > Thanks................Frank > > -----Urspr�ngliche Nachricht----- > Von: Thomas Dudziak [mailto:tomdzk@gmail.com] > Gesendet: Montag, 13. Juni 2005 23:50 > An: OJB Users List > Betreff: Re: Location of repository.xml > > On 6/13/05, Hiller, Frank RD-AS2 wrote: > > >>I'm using OJB 1.0.3 with Tomcat 5.0.28. >>In my servlet I set >>System.setProperty("OJB.properties", >>"D:/jakarta-tomcat-5.0.28/webapps/MyWebAppConfig/OJB.properties"); >>Doing this loads OJB.properties without problems. >>But "repository.xml" is not found though it is located in the same >>directory. > > > I'd suggest that you honor the location that the servlet spec suggests for webapp configuration files, which is WEB-INF or - for resources loaded from the classpath as OJB does - WEB-INF/classes. If you put your files in there, OJB will find the files automatically (when using the default configuration), and it will be guaranteed to be portable across servlet containers. > > Tom > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org > For additional commands, e-mail: ojb-user-help@db.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org > For additional commands, e-mail: ojb-user-help@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org For additional commands, e-mail: ojb-user-help@db.apache.org