Difference between
version 20
and
version 19:
At line 29 changed 1 line. |
Edit your build.properties file to reflect your new database of choice. MySQL settings are the defaults specified in properties.xml. Here is a sample for DB2, followed by one for PostgreSQL: |
Edit your build.properties file to reflect your new database of choice. MySQL settings are the defaults specified in properties.xml. Here is a sample for DB2: |
At line 48 removed 18 lines. |
__PostgreSQL:__ |
{{{ |
database.jar=${postgresql.jar} |
database.type=postgresql |
database.name=appfuse |
database.host=localhost |
#database URL for creating other databases |
database.admin.url=jdbc:${database.type}://${database.host}/template1 |
database.admin.username=postgres |
database.admin.password=postgres |
|
hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect |
database.driver_class=org.postgresql.Driver |
database.url=jdbc:${database.type}://${database.host}/${database.name} |
database.username=postgres |
database.password=postgres |
}}} |
|
At line 141 removed 2 lines. |
|
|
At line 239 removed 14 lines. |
__Turn off Hibernate Batch Processing for PostgreSQL__ (2004-12-06 [NPA|NathanAnderson])\\ |
When an exception is thrown while performing batch processing in Hibernate on PostgreSQL the cause of the exception is never displayed in the stack trace. By turning off the batch processing exceptions get reported immediately and completely. This can be done by adding an entry into {{applicationContext-hibernate.xml}}. Within the element {{sessionFactory}}, locate the property {{hibernateProperties}} and make it look like this: |
{{{ |
<property name="hibernateProperties"> |
<props> |
<prop key="hibernate.dialect">@HIBERNATE-DIALECT@</prop> |
|
<!-- turn off batch updated for PostgreSQL to get nicer exception messages --> |
<prop key="hibernate.jdbc.batch_size">0</prop> |
</props> |
</property> |
}}} |
This will have an effect on the performance of the database, so consider the tradeoff of having better error messages. |
|
Back to AppFuseOnDB2,
or to the Page History.
|