Database

From CauchoWiki

Jump to: navigation, search


Contents

[edit] Directives

directivedescriptiondefault
backup-drivera database backend to use if the primary is not accepting connections
connectionconnection-specific configuration, e.g. transaction isolation
connection-wait-timehow long to wait for a connection to be freed in a free pool
driverconfigures the driver
jndi-namethe JNDI name to store the configured database as
max-active-timethe maximum time a connection can be active before timing out
max-connectionsthe maximum number of connections in the pool
max-create-connections???
max-idle-timethe maximum time a connection can be idle in the pool
max-overflow-connectionmaximum number of connections allocated after the pool is full
max-pool-timethe maximum time the connection can be in the pool
passwordthe password for the connection
pingflag to enable checking for live connections
ping-tablethe table to query to check for a live connection
ping-querythe query to use for a ping
ping-intervalhow often an idle connection should ping
prepared-statement-cache-sizehow many PreparedStatements should be saved
save-allocation-stack-traceif true, save the location of all allocated connections (for debugging)
spyif true, log the SQL calls for debugging
transaction-timeoutdefault value of transaction timeouts
userthe connection's user
wrap-statementstrue
xatrue if the connection will be used in Distributed Transactions

[edit] driver and backup-driver

directivedescription
typethe classname of the driver
xxxa bean style-initialization parameter, like <url>

[edit] resin.conf

...
<database jndi-name="jdbc/test">
  <driver type="org.postgresql.Driver">
    <url>jdbc:postgresql://localhost/test</url>
  </driver>
  ...
</database>
...

[edit] <connection>

directivedescription
catalogthe connection's default catalog
read-onlytrue if the connection is read-only
transaction-isolationthe connection's transaction isolation
Personal tools