hikaricp

Setting up Play 2.4.0 with Postgres and HikariCP yields configuration error

拜拜、爱过 提交于 2019-12-22 19:01:07
问题 I'm trying to set up a play framework server with a connection to a local postgres. My current applications.conf is like this: dbplugin=disabled db { default { dataSourceClassName=org.postgresql.ds.PGSimpleDataSource dataSource { user="postgres" password="postgres" databaseName="timeseries" serverName="localhost" } hikaricp { connectionTestQuery = "SELECT 1" } } } My build.sbt has only the newest jdbc for postgres added: lazy val root = (project in file(".")).enablePlugins(PlayJava)

Cache Slick DBIO Actions

こ雲淡風輕ζ 提交于 2019-12-22 11:37:18
问题 I am trying to speed up "SELECT * FROM WHERE name=?" kind of queries in Play! + Scala app. I am using Play 2.4 + Scala 2.11 + play-slick-1.1.1 package. This package uses Slick-3.1 version. My hypothesis was that slick generates Prepared statements from DBIO actions and they get executed. So I tried to cache them buy turning on flag cachePrepStmts=true However I still see "Preparing statement..." messages in the log which means that PS are not getting cached! How should one instructs slick to

Hibernate 5 + HikariCP + MySQL

﹥>﹥吖頭↗ 提交于 2019-12-22 00:13:13
问题 I've started a project using Hibernate 5 and a MySQL database. Prior to this project, I've been using Hibernate 4, PostgreSQL and C3P0 connection pool. Now, I want to use HikariCP as it seems really promising, with Hibernate 5 . Here it's my IVY configuration part for hibernate: <?xml version="1.0"?> <!DOCTYPE ivy-module [ <!ENTITY vaadin.version "7.5.5"> <!ENTITY highcharts.version "1.1"> <!ENTITY vaadin.charts.version "3.0.0-alpha5"> <!ENTITY hibernate.version "5.0.1.Final"> <!ENTITY mysql

Hikari connection pooling + Hibernate 4.3.8 + Spring Data JPA configuration?

喜夏-厌秋 提交于 2019-12-20 06:28:01
问题 please tell me. How can I configure the "Hikari connection pooling + Hibernate 4.3.8 + Spring Data JPA configuration"? Here is my configuration, but for some reason I am sure that this configuration is not correct. Because the the console does not appear anything like the "connetction pooling". On the Internet I can not find the tutorial for the beginner. Thanks. <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:dataSource-ref=

how to check HikariCP connection pooling is working or not in Java?

只愿长相守 提交于 2019-12-19 13:31:31
问题 I have written following properties in my configuration files I am using Log4j in my application When I am running a project. I am getting following message.does that mean connection pooling is configured in my project? if not then how it will be? INFO: internal.ConnectionProviderInitiator - HHH000130: Instantiating explicit connection provider: com.zaxxer.hikari.hibernate.HikariConnectionProvider I have referred following link also link here Datasource settings hibernate.datasource.driver

how to check HikariCP connection pooling is working or not in Java?

只谈情不闲聊 提交于 2019-12-19 13:31:15
问题 I have written following properties in my configuration files I am using Log4j in my application When I am running a project. I am getting following message.does that mean connection pooling is configured in my project? if not then how it will be? INFO: internal.ConnectionProviderInitiator - HHH000130: Instantiating explicit connection provider: com.zaxxer.hikari.hibernate.HikariConnectionProvider I have referred following link also link here Datasource settings hibernate.datasource.driver

Tomcat: HikariCP issue when deploying two applications with DB connection

南笙酒味 提交于 2019-12-19 06:46:20
问题 I am trying to deploye two WAR files (app1.war and app2.war) on the same tomcat7 instance. I am getting this error : Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'; nested exception is javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource I don't have this error if I have only one application deployed on tomcat. Is there a way to solve this issue? 回答1: in spring boot, jmx bean is loaded at run time and it

Tomcat: HikariCP issue when deploying two applications with DB connection

浪尽此生 提交于 2019-12-19 06:46:05
问题 I am trying to deploye two WAR files (app1.war and app2.war) on the same tomcat7 instance. I am getting this error : Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'; nested exception is javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource I don't have this error if I have only one application deployed on tomcat. Is there a way to solve this issue? 回答1: in spring boot, jmx bean is loaded at run time and it

HikariPool-1 - Connection is not available, request timed out after 30000ms for very tiny load server

本秂侑毒 提交于 2019-12-19 03:57:29
问题 I have a small Java application for testing purposes. I have moved to hikari recently. What I notice is that I keep getting this error. java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:602) at com.zaxxer.hikari.pool.HikariPool

Defining an alternate connection pool in Grails 2.3.6

醉酒当歌 提交于 2019-12-19 02:42:30
问题 I know that, at some point between Grails 1.X and Grails 2.X, the default connection pooling library changed from commons-dbcp to tomcat-dbcp . Now, I'm trying to configure either BoneCP or HikariCP as the connection pooling library for my Grails application. However, I see that this answer offers a solution which might only apply to Grails 1.X. I also found this Gist, but again, I don't know which Grails version it applies to. So, is it possible to define a custom connection pool inside a