Skip to content

Spring configuration

Mark Rotteveel edited this page Jul 19, 2015 · 1 revision

This information is outdated

Firebird pooled datasource configuration. Datasource bean definition:

<bean id="dataSource" class="org.firebirdsql.pool.FBWrappingDataSource">
    <property name="database">
      <value>${firebird.database}</value>
    </property>
    <property name="userName">
      <value>${jdbc.username}</value>
    </property>
    <property name="password">
      <value>${jdbc.password}</value>
    </property>
    <property name="maxPoolSize">
      <value>${jdbc.maxPoolSize}</value>
    </property>
    <property name="minPoolSize">
      <value>${jdbc.minPoolSize}</value>
    </property>
    <property name="maxStatements">
      <value>${jdbc.maxStatements}</value>
    </property>
    <property name="type">
      <value>${firebird.connection.type}</value>
    </property>
  </bean>

Properties definition:

# JDBC properties
# aplicados por PropertyPlaceholderConfigurer.
 
jdbc.driverClassName=org.firebirdsql.jdbc.FBDriver
jdbc.url= "JDBC URL"
jdbc.username= "user name"
jdbc.password= "password"
jdbc.minPoolSize=5
jdbc.maxPoolSize=10
jdbc.maxStatements=50
firebird.database= " database - firebird format"
firebird.connection.type=TYPE4

Obs: Using PropertyPlaceholderConfigurer bean for automatic properties configuration.