Database

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
[[Category:Configuration]] [[Category:Database]]
+
{{Cleanup}} [[Category:Configuration]] [[Category:Database]]
  
 
== Directives  ==
 
== Directives  ==

Latest revision as of 21:16, 1 December 2011

40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

Contents

Directives

directive description default
backup-driver a database backend to use if the primary is not accepting connections
connection connection-specific configuration, e.g. transaction isolation
connection-wait-time how long to wait for a connection to be freed in a free pool
driver configures the driver
jndi-name the JNDI name to store the configured database as
max-active-time the maximum time a connection can be active before timing out
max-connections the maximum number of connections in the pool
max-create-connections ???
max-idle-time the maximum time a connection can be idle in the pool
max-overflow-connection maximum number of connections allocated after the pool is full
max-pool-time the maximum time the connection can be in the pool
password the password for the connection
ping flag to enable checking for live connections
ping-table the table to query to check for a live connection
ping-query the query to use for a ping
ping-interval how often an idle connection should ping
prepared-statement-cache-size how many PreparedStatements should be saved
save-allocation-stack-trace if true, save the location of all allocated connections (for debugging)
spy if true, log the SQL calls for debugging
transaction-timeout default value of transaction timeouts
user the connection's user
wrap-statements true
xa true if the connection will be used in Distributed Transactions

driver and backup-driver

directive description
type the classname of the driver
xxx a bean style-initialization parameter, like <url>

resin.conf

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

<connection>

directive description
catalog the connection's default catalog
read-only true if the connection is read-only
transaction-isolation the connection's transaction isolation
Personal tools