Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (25 sloc) 1.62 KB
<?xml version="1.0" ?>
<layer-spec xmlns="urn:jboss:galleon:layer-spec:1.0" name="postgresql-datasource">
<dependencies>
<layer name="postgresql-driver"/>
</dependencies>
<feature spec="subsystem.datasources.data-source">
<param name="use-ccm" value="true"/>
<!-- we can't use expression for pool-name (data-source name) hard coding should be fine, the import thing is JNDI -->
<param name="data-source" value="PostgreSQLDS"/>
<param name="enabled" value="true"/>
<param name="use-java-context" value="true"/>
<param name="jndi-name" value="java:jboss/datasources/${env.POSTGRESQL_DATASOURCE,env.OPENSHIFT_POSTGRESQL_DATASOURCE:PostgreSQLDS}"/>
<param name="connection-url" value="jdbc:postgresql://${env.POSTGRESQL_SERVICE_HOST,\
env.OPENSHIFT_POSTGRESQL_DB_HOST}:${env.POSTGRESQL_SERVICE_PORT,\
env.OPENSHIFT_POSTGRESQL_DB_PORT}/${env.POSTGRESQL_DATABASE, env.OPENSHIFT_POSTGRESQL_DB_NAME}"/>
<param name="driver-name" value="postgresql"/>
<param name="user-name" value="${env.POSTGRESQL_USER, env.OPENSHIFT_POSTGRESQL_DB_USERNAME}"/>
<param name="password" value="${env.POSTGRESQL_PASSWORD, env.OPENSHIFT_POSTGRESQL_DB_PASSWORD}"/>
<param name="check-valid-connection-sql" value="SELECT 1"/>
<param name="background-validation" value="true"/>
<param name="background-validation-millis" value="60000"/>
<param name="flush-strategy" value="IdleConnections"/>
<param name="statistics-enabled" value="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}" />
</feature>
</layer-spec>
You can’t perform that action at this time.