datasource

JDBC Connection Pool test query “SELECT 1” does not catch AWS RDS Writer/Reader failover

久未见 提交于 2019-12-19 16:57:11
问题 We are running an AWS RDS Aurora/MySQL database in a cluster with a writer and a reader instance where the writer is replicated to the reader. The application accessing the database is a standard java application using a HikariCP Connection Pool. The pool is configured to use a "SELECT 1" test query on checkout. What we noticed is that once in a while RDS fails over the writer to the reader. The failover can also be replicated manually by clicking "Instance Actions/Failover" in the AWS

How to access JNDI data source defined in weblogic 10.3.6

自作多情 提交于 2019-12-19 16:18:11
问题 I have created a JNDI data-source using my weblogic console but I am not able to access the object from my web application. Below are the details In weblogic 10.3.6, I have given the JNDI name for datasource as : jdbc/mydb To get DB connection from my web application I have written this code in my web application: Context initContext = new InitialContext(); DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/mydb"); jndiConnection = ds.getConnection(); Earlier I was using

Configure spring datasource for hibernate and @Transactional

帅比萌擦擦* 提交于 2019-12-19 09:19:42
问题 At this moment I'm using DriverManagerDataSource with @Transactional annotation to manage transactions. But all transactions are very very slow, probably because data source open and close connection to db each time. What data source should I use to speed up transaction? 回答1: DriverManagerDataSource isn't actually a connection pool and should only be used for testing. You should try BasicDataSource from Apache Commons DBCP. Something like: <bean id="dataSource" destroy-method="close" class=

grails 2.5: “Another unnamed CacheManager already exists in the same VM” when using multiple datasources

笑着哭i 提交于 2019-12-19 06:30:10
问题 With an out of the box installation of Grails 2.5 and a clean default, config, adding a second datasource always gives this exception when trying to start the app. This used to work no problem with grails 2.3.x DataSource.groovy : environments { development { dataSource { dbCreate = "update" url = "jdbc:mysql://127.0.0.1:3306/myapp" username = "myuser" password = "mypass" } dataSource_report { url = "jdbc:mysql://127.0.0.1:3306/myapp_reporting" username = "someuser" password = "somepass" } }

grails 2.5: “Another unnamed CacheManager already exists in the same VM” when using multiple datasources

独自空忆成欢 提交于 2019-12-19 06:30:03
问题 With an out of the box installation of Grails 2.5 and a clean default, config, adding a second datasource always gives this exception when trying to start the app. This used to work no problem with grails 2.3.x DataSource.groovy : environments { development { dataSource { dbCreate = "update" url = "jdbc:mysql://127.0.0.1:3306/myapp" username = "myuser" password = "mypass" } dataSource_report { url = "jdbc:mysql://127.0.0.1:3306/myapp_reporting" username = "someuser" password = "somepass" } }

Cannot create PoolableConnectionFactory (Access denied for user ''@'localhost'

时光毁灭记忆、已成空白 提交于 2019-12-19 06:24:48
问题 I have been trying to set up a DatabaseConnectionPool for a web app for the last couple of days with no success. I have read the relevant sections of the Tomcat docs and a great deal around the subject and think I'm doing everything right, but obviously not because I keep on getting the following error: Cannot create PoolableConnectionFactory (Access denied for user ''@'localhost' (using password: YES)) I'm not getting the error when I start Tomcat running, but when I try to run the following

Cannot create PoolableConnectionFactory (Access denied for user ''@'localhost'

核能气质少年 提交于 2019-12-19 06:24:06
问题 I have been trying to set up a DatabaseConnectionPool for a web app for the last couple of days with no success. I have read the relevant sections of the Tomcat docs and a great deal around the subject and think I'm doing everything right, but obviously not because I keep on getting the following error: Cannot create PoolableConnectionFactory (Access denied for user ''@'localhost' (using password: YES)) I'm not getting the error when I start Tomcat running, but when I try to run the following

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

My UITableView won't scroll down through the end of the data! Why?

╄→гoц情女王★ 提交于 2019-12-18 14:41:50
问题 Ok I don't know why this isn't working, but I have hooked up a tableView, with 19 items of text I'd like to set to each cell. The cells populate just fine, but when I try and scroll, it goes down there and I can see the cells that aren't visible on the initial view, it hangs, and won't scroll down. It just snaps back. REALLY WEIRD! What am I doing wrong? - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:

jboss 7 AS datasource for sqlserver

百般思念 提交于 2019-12-18 11:48:18
问题 I run jboss in standalone mode and have set my datasource in the standalone.xml to the following: <datasource jndi-name="MyDenaliDS" pool-name="MyDenaliDs_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true"> <connection-url> jdbc:sqlserver://myip:1433;databaseName=mydb;integratedSecurity=true </connection-url> <driver> sqljdbc </driver> <security> <user-name> username </user-name> <password> password </password> </security> </datasource> <drivers> <driver name="sqljdbc"