connection-pooling

JMeter JDBC Pool configuration

一个人想着一个人 提交于 2019-12-11 04:33:35
问题 Is there a practical use of JMeter's JDBC Pool configuration I tried to use Max Number of Connections 10 and it caused issues with Oracle max connection reached. It seems from documentation below that its usage is discourage, so I still wonder if there's scenarios that it could be useful. Max Number of Connections Maximum number of connections allowed in the pool. In most cases, set this to zero (0). This means that each thread will get its own pool with a single connection in it, i.e. the

Multiple Data sources for C3P0

坚强是说给别人听的谎言 提交于 2019-12-11 03:57:40
问题 I am developing a tool that receives different connection parameters to test values in different databases (a plugin for Nagios in jNRPE that keeps an open connection to different databases). Because the configuration is dynamic (there could be more databases or they can be removed) I cannot have a configuration file. I want to know if I should have an instance of C3P0 per database or can I use the same instance and just change the URL each time I ask for a connection? The code is at github:

How to implement TCP connection pooling in java?

帅比萌擦擦* 提交于 2019-12-11 03:47:12
问题 Here, I managed to get a connection between a single server and single client but now my new hurdle is how to achieve a pool of TCP connections on client side in JAVA. I had gone through many sites but at the end no fruitful solution was found. Here the class which I had used for obtaining connection to a server public class TCPIPCommunicator { private final String MODULE="TCPIPCommunicator :"; //private DeviceEntity deviceEntity; private static InetAddress inetServer = null; private static

How to use connection pooling for Monetdb?

六月ゝ 毕业季﹏ 提交于 2019-12-11 02:33:54
问题 Can some tell me how to use connection pooling with MonetDb? Do I just append these args to the URL "poolminimum=1;poolmaximum=5;"? 回答1: No, by itself, the driver does not pool connections. You could use c3p0 (http://www.mchange.com/projects/c3p0/) to create a connection pool for MonetDB JDBC connections. However, please be aware that MonetDB uses optimistic concurrency control and table-level locking, so firing updates at a single table from multiple connections will have an increasing risk

Is there ever a reason to set maxIdle > maxActive for connection pools?

巧了我就是萌 提交于 2019-12-11 01:58:29
问题 I'm just learning about connection pools, and I was wondering if there's ever any reason to set maxIdle > maxActive . This is my understanding: Idle connections are connections that have been created and are waiting to be used. It becomes an active connection once a client borrows it. minIdle determines the number of initial connections to create in a pool. When a client tries to use the pool, an idle connection is given. If there are no available idle connections, the pool will create one.

Will pooled SQL Connections be scavenged if there is still a reference to them?

﹥>﹥吖頭↗ 提交于 2019-12-10 23:26:31
问题 @usr and I are having a disagreement in another question about whether or not .NET will scavenge open connections that have been idle, but still maintain a held reference. I maintain, based on documentation, that if the physical connection is idle for a period of time, it will be reclaimed after a period of time even if a SQLConnection object reference remains held. usr claims that this won't happen, and it only reclaims connections that no longer have references. His assertion as this would

Performance difference between global database connection and opening connection everytime on Golang

若如初见. 提交于 2019-12-10 17:46:03
问题 In my current project I was opening a new database connection every time when user makes request. For example: func login(w http.ResponseWriter, r *http.Request) { ... db, err := sqlx.Connect("postgres", "user=postgres password=*** dbname=postgres") if err != nil { ErrorWithJSON(w, err.Error(), http.StatusBadRequest) return } db.SetMaxIdleConns(0) db.SetConnMaxLifetime(time.Second * 30) user, err := loginManager(db, m) ... err = db.Close() } When I searched for other people's code, I've seen

Cannot find oracle.ucp.jdbc.PoolDataSourceFactory in Oracle ucp

杀马特。学长 韩版系。学妹 提交于 2019-12-10 17:19:18
问题 I want to create Oracle UCP using this code: import oracle.ucp.jdbc.PoolDataSource; import oracle.ucp.jdbc.PoolDataSourceFactory; System.out.println("***** OracleDS_UCP -> start init of PoolDataSource"); PoolDataSource pool = PoolDataSourceFactory.getPoolDataSource(); pool.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource"); pool.setURL("jdbc:oracle:thin:@localhost:1521:XE"); pool.setUser("test"); pool.setPassword("test"); pool.setMaxStatements(10); // the maximum number of

Hikaricp Oracle connection issue

泄露秘密 提交于 2019-12-10 16:43:43
问题 I have the following code to get connection to the oracle database. But using hikaricp I am getting the exception. java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL Code: private static HikariDataSource dataSource() { final HikariDataSource hikariDataSource = new HikariDataSource(); hikariDataSource.setMaximumPoolSize(100); hikariDataSource.setMinimumIdle(10); hikariDataSource.setDataSourceClassName("oracle.jdbc.pool.OracleDataSource"); Properties properties = new

Struggling to create MySQL Connection Pool on Glassfish

╄→尐↘猪︶ㄣ 提交于 2019-12-10 16:13:25
问题 I've done this before but for some reason I'm really having some difficulty creating this connection pool. When I ping the connection pool after creating it I get this error: Ping Connection Pool for bondsaver is Failed. Ping failed Exception - Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details. Ping failed Exception - Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional