-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: how to specify jdbc path in hibernate properties
PostPosted: Tue Aug 10, 2004 6:35 am 
Beginner
Beginner

Joined: Sun May 02, 2004 8:04 am
Posts: 36
Hi,

We have some web applications that we wish to distribute as a WAR file to be easily dropped into other environments. The problem we face is that the JDBC url referenced in the properties file needs to be absolute AFAIK. Here is how it works now:

hibernate.connection.url=jdbc:hsqldb:/Users/novotny/Jakarta/jakarta-tomcat-4.1
.29/webapps/extras/WEB-INF/database/gridsphere

however, it would be great if the properties file and the database were packaged and placed in teh same directory, I would like to just use

hibernate.connection.url=jdbc:hsqldb:gridsphere

but it doesn't work that way currently....

any ideas are greatly appreciated!

Thanks, Jason


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 8:43 am 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
How about using JNDI to bind the JDBC datasource. That way you can change your JDBC url all you want and not affect your application!

Read the Tomcat docs for more information about JNDI,
http://jakarta.apache.org/tomcat/tomcat ... howto.html

_________________
Matt Veitas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 8:56 am 
Beginner
Beginner

Joined: Sun May 02, 2004 8:04 am
Posts: 36
That sounds like a good idea and initailly i was investigating-- however, then the path still needs to be present in the server.xml file no?

The other issue is that I have many webapps and I would like to be able to hot deploy them using the Tomcat manager webapp, but this is not possible if I need to put an entry for each of them in the server.xml file....

Thanks, Jason


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.