Database

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Configuration]] [[Category:Database]]
+
{{Cleanup}} [[Category:Configuration]] [[Category:Database]]
  
== Tags ==
+
== Directives  ==
  
{| class="tags"
+
{| class="directives"
!tag||description||default
+
!directive||description||default
 
|-
 
|-
 
||backup-driver||a database backend to use if the primary is not accepting connections
 
||backup-driver||a database backend to use if the primary is not accepting connections
Line 47: Line 47:
 
|-
 
|-
 
||user||the connection's user
 
||user||the connection's user
 +
|-
 +
||wrap-statements||if true, Resin will wrap the underlying driver's statements|true
 
|-
 
|-
 
||xa||true if the connection will be used in [[Distributed Transactions]]
 
||xa||true if the connection will be used in [[Distributed Transactions]]
Line 53: Line 55:
 
== driver and backup-driver ==
 
== driver and backup-driver ==
  
{| class="tags"
+
{| class="directives"
!tag||description
+
!directive||description
 
|-
 
|-
 
||type||the classname of the driver
 
||type||the classname of the driver
Line 74: Line 76:
  
 
{|
 
{|
!tag||description
+
!directive||description
 
|-
 
|-
 
||catalog||the connection's default catalog
 
||catalog||the connection's default catalog

Latest revision as of 13: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