property « JDBC « JPA Q&A





1. Mixing and matching JDBC properties    forum.hibernate.org

When letting Hibernate manage my connections, I tried to put some of the connection properties in the hibernate.properties, and then override one of them (the URL in particular) subsequently by doing a Configuration.addProperties(). Things are acting as if somehow this confused hibernate into not providing the other connection properties (I am getting an error message "unknown user") The db is HSQL. ...

2. JDBC: Multiple Hibernate properties    forum.hibernate.org

I use hibernate.properties file to connect to the database. Everything works fine. I have two projects, and each project, talks to different database and each has it own hibernate.properties file. The two projects work fine individually. But, my project 2 should reference project1. This is where I am having problem. Project 1 connects to database1 and works fine. But when I ...

3. absolute jdbc path in hibernate.properties necessary?    forum.hibernate.org

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 ...

4. how to specify jdbc path in hibernate properties    forum.hibernate.org

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 ...

5. Possible to configure ONLY jdbc parms from properties file?    forum.hibernate.org

I just needed to take out the connection properties in hibernate.cfg.xml, and then keep hibernate.properties in my classpath. This configuration picks up the connection parms from .properties file, and then pulls the rest of the information from the XML file. I wonder if there is a way to rename hibernate.properties and then still be able to reference the values in the ...

6. Added Property JDBC statement    forum.hibernate.org

Not exactly what I had in mind but set this to true: Code: testConnectionOnCheckout Default: false Use only if necessary. Expensive. If true, an operation will be performed at every connection checkout to verify that the connection is valid. Better choice: verify connections periodically using idleConnectionTestPeriod. Also, setting an automaticTestTable or preferredTestQuery will ...