db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiller, Frank RD-AS2" <Frank.Hil...@heidelberg.com>
Subject AW: AW: Location of repository.xml
Date Tue, 14 Jun 2005 07:44:34 GMT
Hi Danilo,

you're right, but I can not put the config files into WEB-INF/classes. 
The installer has to enter the path to the database (server name, port) into repository_database.xml
during the installation. It should not unpack the WAR file, enter the path and pack the WAR
file before deploying.

The "dirty way" of defining an absolute path would work for me.

Thank you...............Frank


-----Urspr√ľngliche Nachricht-----
Von: Danilo Tommasina [mailto:dtommasina@risksys.com] 
Gesendet: Dienstag, 14. Juni 2005 09:27
An: OJB Users List
Betreff: Re: AW: Location of repository.xml

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 <Frank.Hiller@heidelberg.com> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message