Skip to content

Commit

Permalink
Merge pull request #142 from cleydyr/issue-140
Browse files Browse the repository at this point in the history
[140] use HikariCP como pool de conexões
  • Loading branch information
cleydyr authored Sep 13, 2019
2 parents 1b2fec6 + 5b8c920 commit 2712081
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion WebContent/META-INF/context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
<Context displayName="Biblivre 4" path="/biblivre4" crossContext="true">
<Resource auth="Container" driverClassName="org.postgresql.Driver" logAbandoned="false" removeAbandoned="true" removeAbandonedTimeout="60" maxActive="50" maxIdle="30" maxWait="-1" username="biblivre" password="abracadabra" type="javax.sql.DataSource" accessToUnderlyingConnectionAllowed="true" name="jdbc/biblivre3" url="jdbc:postgresql://127.0.0.1:5432/biblivre3"/>
<Resource auth="Container" driverClassName="org.postgresql.Driver" logAbandoned="false" removeAbandoned="true" removeAbandonedTimeout="60" maxActive="50" maxIdle="30" maxWait="-1" username="biblivre" password="abracadabra" type="javax.sql.DataSource" accessToUnderlyingConnectionAllowed="true" name="jdbc/biblivre4_b3b_restore" url="jdbc:postgresql://127.0.0.1:5432/biblivre4_b3b_restore"/>
<Resource auth="Container" driverClassName="org.postgresql.Driver" logAbandoned="false" removeAbandoned="true" removeAbandonedTimeout="60" maxActive="50" maxIdle="30" maxWait="-1" username="biblivre" password="abracadabra" type="javax.sql.DataSource" accessToUnderlyingConnectionAllowed="true" name="jdbc/biblivre4" url="jdbc:postgresql://127.0.0.1:5432/biblivre4"/>
<Resource name="jdbc/biblivre4" auth="Container"
factory="com.zaxxer.hikari.HikariJNDIFactory"
type="javax.sql.DataSource"
minimumIdle="5"
maximumPoolSize="10"
connectionTimeout="300000"
jdbcUrl="jdbc:postgresql://127.0.0.1:5432/biblivre4"
leakDetectionThreshold="60"
dataSource.user="biblivre"
dataSource.password="abracadabra" />
</Context>
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@
<version>2.2.3</version>
</dependency>

<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.3.1</version>
</dependency>
<!-- / -->

</dependencies>
Expand Down

0 comments on commit 2712081

Please sign in to comment.