pool 1 « Connection « Java Database Q&A





1. Database connection pooling datastructure    stackoverflow.com

I would like to develop database connection pooling. Could anyone please tell me about which data structure need to use to maintain the pool ?

2. [Java]Do we need connection pool if we only use 1 connection?    stackoverflow.com

I would like to ask, if I am going to use a single connection in the whole program, do I need to use a connection pool? Does using a connection pool ...

3. JedisPool number of connections issue    stackoverflow.com

am new to redis and use a JedisPool in my multi-threaded app.

 JedisPoolConfig config = new JedisPoolConfig();
 config.setMaxActive(200);
 config.setMaxIdle(200);
 pool = new JedisPool(config,"localhost",6379,-1,jedisPasswd);
I want to have 200 connections with out getting ...

4. java - redis pool of 300+ connections - possible?    stackoverflow.com

I find it hard to create a connection pool of Redis with 300+ connections. am about use it with volatile nature in a multi-threaded app . Anyone experienced with a deployment ...

5. What is the best jdbc connection pooling tool?    stackoverflow.com

Possible Duplicate:
Connection pooling options with JDBC: DBCP vs C3P0
I need to use best jdbc connection pooling in my application. Please suggest me which is ...

6. Simple JDBC Connection Pool    stackoverflow.com

guys can somebody show me how to create simple JDBC connection pool to help me understand how it works. I appreciates in advance

7. I can not create JDBC Connection Pool    forums.netbeans.org

Zastra, I'm afraid you used the wrong wizard. The tutorial specifies the New JDBC Resource wizard, but you wrote that you used the New JDBC Connection Pool wizard. The New JDBC Connection Pool wizard does not include a step for configuring a JDBC resource. New JDBC Resource wizard = JDBC Connection Pool + JDBC Resource attributes. Jeff PS If you have ...

8. JDBC Connection Pool questions    jmeter.512774.n5.nabble.com

Hi, I'm running some JDBC load tests against Oracle, using a 'prepared select' statement. My latency and thruput are excellent at up to ~16 threads (users), then falls off the cliff. The latency increases by over a factor of 100, and the aggregate thruput decreases by a factor of about 40. I need to be able to maintain roughly the same ...

9. JDBC connection pooling - should it be used at all?    jmeter.512774.n5.nabble.com

I use the JDBC Connection Configuration element to define a connection pool, then use the pool to access database resources via beanshell to add some "intelligence" to my load tests. This allows me to script dynamic load tests that can behave differently depending on the state of the application, users, etc. This is probably not it's intended use, but ...





10. JDBC Request and Connection Pools    jmeter.512774.n5.nabble.com

11. RE: JDBC connection pooling - should it be used at all?    jmeter.512774.n5.nabble.com

Thought I'd jump in... :^) Regarding JDBC connections pools in load testing, here's an earlier conversation where Sebb mentioned this http://snipurl.com/1qn0x Yes! per-thread connection handling is a good idea. The main question I have though, is will the extra per-thread DB connection setup and teardown expense be low enough to not make a difference to both: (a) Jmeter ...

13. Connection Pooling    coderanch.com

Hi all , I have a few Questions regarding connection pooling 1) is it database vendor specific or not ? 2) we can change setting for no of connection at a time thru web server or servlet container? in my application I am using Apache web server with Tomcat. while one query is being running on the database if some other ...

14. Connection Pool    coderanch.com

Hi If you want to start playing with connection pooling you need to lookup (no pun intended) JNDI. Also, you need some kind of "service provider" that will provide a mechanism to control the resource you are pooling. In this case it's DB connections. Most Apllication Servers do this for you. Ex: Jrun, Weblogin, WebShpere etc etc). Personally if you want ...

15. Connection Pooling with jconnect 5.2    coderanch.com

Is there a way for me to use jConnect5.2 for connection pooling without using LDAP as my service provider. I am using Tomcat 3.2 and Apache. I am wondering if I can save the database properies in normal text file and use that. Can somebody tell me a way so that I dont have to use LDAP. TIA





17. Connection Pool    coderanch.com

Hi, I am quite new to JDBC, and I have a code snippet that I am baffled with. It is a simple connection pool: public Connection getConnection() throws SQLException { Connection con = null; Enumeration cons = connections.keys(); synchronized (connections) { while(cons.hasMoreElements()) { con = (Connection)cons.nextElement(); Boolean b = (Boolean)connections.get(con); if (b == Boolean.FALSE) { // So we found an unused ...

18. JDBC / JRUN / Connection Pool    coderanch.com

20. Sample code for Connection pooling    coderanch.com

21. JDBC connection pool    coderanch.com

Hi all, I have a question on JDBC connection pools. I have created a connection pool in WebLogic Server and using it from my application. As we know, in case of hand-coded connection pools we release the connection to the pool, once it is used. How do we release a connection in case of server specific connection pool. I am getting ...

22. JDBC Connection pool - weblogic6.1    coderanch.com

23. What is "Connection Pooling"    coderanch.com

Connection Pooling is a concept in which u can make a pool of connections to enhance the performance of your application.This is quite helpful as sometimes making and tearing a connection is more costly than actually executing the sql command.For this reason a pool is made to keep the connection alive and application can get the connection frm this pool to ...

24. Connection Pool    coderanch.com

I am currently working on an application that requires the creation of a Database Connection Pool class. The problem is that I haven't created such a class before and I can't seem to find any sound documentation outlining guidelines on what is required or used to create a connection pool. Could you guys either provide a sample class or point to ...

25. jdbc 2.0 connection pooling    coderanch.com

26. Connection Pool    coderanch.com

A connection pool is useful when you have multiple threads that need short-lived database connections, as in web applications. In this situation, the time and effort required to create and release a database connection is more than the work that is done with the connection. Therefore we gather a pool of shared connections so that we don't have to constantly open ...

27. connection pooling config?    coderanch.com

28. Problem with Connection Pooling    coderanch.com

Hi there, I have a problem about using a connection pool in a servlet.Server giving error(Can't open socket on MyPool:1433.check host and port number and make sure security manager allows this connection.You can also try running Socket Applet(java.net .unknownhostException: MyPool).In Driver classname:-weblogic.jdbc.mssqlserver4.Driver.In key=value section(user=sa password=none because in sqlserver there is no password).And in "target" section I chosen myserver.Please guide me how ...

29. Connection Pooling Problem    coderanch.com

30. Connection Pooling    coderanch.com

Hi Bosun, I also aggree that closing the conection will in turn close the statement and the resultset. By "closing" you must mean that that the particular statement/resultset is not available for further use.. My query is what will happen if a reference to the closed resultset still exists in the memory..?? Will the connection pool manager of WebSphere release the ...

31. Pool Connection Limit    coderanch.com

32. Recognizing stale connections in connection pool    coderanch.com

Does anyone know the best way to identify stale connections in a connection pool? Our application resides on a webfarm and connects to a DB2 database on an OS/390 mainframe using DB2Connect. The problem is the database is set to break connections after 10 minutes but the database does not notify DB2Connect when a connection has timed out and therefore my ...

33. Connection Pool    coderanch.com

34. Connection Pooling    coderanch.com

35. the problem of connection pool    coderanch.com

36. firewall and db connection pool    coderanch.com

37. Connection pool and restart database problem    coderanch.com

Hi there, Thank you for your message. I am using the connection pool from oracle thin driver. Now I start to think that the connection pool which is maintained by datasource can take care of itself. If database restarts, connection pool refresh itself. (This means some code is check the pool constantly with some time intervals. Perhaps, the connection pool will ...

38. jdbc simple connection pool problem    coderanch.com

40. connection pooling    coderanch.com

Hi , As they are in java will run any where. However why would someone want to sell their code for free . So each comany comes with connections pools that are closely integrated with their products. Yes it is possible to do the thing which you want you just have to know a lot of drivers and their intricies to ...

41. why need connection pool    coderanch.com

Connection pooling is usually done to improve application performance and decrease the load on the database. DriverManager is only responsible for creating new connection to the database. As you probably know, creating a connection and logging in to the database is relatively time-consuming. Therefore, connection pool is often used. A connection pool is like a facade to the DriverManager. Application can ...

42. Connection Pooling - Urget Help    coderanch.com

43. Question on connection pool size.    coderanch.com

Hi all, I want to use the Connection pooling and Datasourace support given by JDBC in my project. I am configuring and looking up the Datasource in IBM websphere. What are the various points to be considered to decide the size of the pool. In my application I have both real-time as well as the batch updates to the database. In ...

44. Connection pools - database shutdown    coderanch.com

In theory (dependin on how the driver was written), it may be possible to test Connection.isClosed() before using the Connection - but this neither guaranteed nor recommended. The description for isClosed also says: This method generally cannot be called to determine whether a connection to a database is valid or invalid. A typical client can determine that a connection is invalid ...

45. optimal Connection pool size?    coderanch.com

I am having WAS 3.5.3 running on Windows 2000, Oracle 8.1.7 database on a UNIX box. I am having 200 client application hitting the WAS box through a Servlet. Each application opens 4 connections directly from the oracle DB for some non WebSphere activity (as the client apps are written in VJ++, they use ADO to connection to the DB). Also, ...

46. why should i use connection pooling ?    coderanch.com

The biggest performance problem when dealing with remote databases is the time taken to establish a connection. In the case of very short operations like selecting a single attribute from a single row, the connection time might be orders of magnitude longer, such as a fraction of a second for the operation, but over a second to connect. Connection Pooling gets ...

47. Connection Pool Authentication    coderanch.com

I was wondering how DB User Authentication is handled using a Connection Pool. Since the Connections are created all at once, and the API requires a username and password for the database, how are users authenticated? When I use a single Connection, I just have the users login through a Dialog and I pass that info to the Connection object when ...

48. Need some good connection pool    coderanch.com

Hi all, I am planning to use some good connection pool class in my project. I am interested in pooling capability as well as statement caching capability of the pool. I am thinking of using the pool class provided by oracle thin driver (OracleConnectionCacheImpl.class). Sample code ------------ OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ocpds.setURL(dbprop.getProperty("url")); ocpds.setUser(dbprop.getProperty("user")); ocpds.setPassword(dbprop.getProperty("password")); OracleConnectionCacheImpl cache = new OracleConnectionCacheImpl(ocpds); cache.setMaxLimit(Integer.parseInt(dbprop.getProperty("maxconn"))); ...

51. Connection Pool!!    coderanch.com

52. basic connection pooling question    coderanch.com

Hey, I'm new to JDBC and I am looking at a connection pooling mechanism. OnCore Servlets I found a basic implementation. But in ConnectionPool.getConnection() I see public synchronized Connection getConnection() throws SQLException { if (!availableConnections.isEmpty()) { Connection existingConnection = (Connection)availableConnections.lastElement(); int lastIndex = availableConnections.size() - 1; availableConnections.removeElementAt(lastIndex); // If connection on available list is closed (e.g., // it timed out), then ...

53. Apache's Connection Pooling    coderanch.com

54. Connection Pooling    coderanch.com

Hi Java Guru's, I have come across the following scenerio's on connection pooling at my work. I am really not sure whether it is a better approach to initialize a connection object inside each and every method of Adapter class or just initialize it once in a constructor and eventually use it and release it upon usage. The reason I have ...

55. Connection pooling tricky question    coderanch.com

We are currently not using connection pooling in our applications, but are pushing the use of CMP EJB, and so, the use of connection pooling as well. The Oracle DBA is reluctant to use such a means because of the consequences of connection pooling if the Oracle database is not aware of the real userid behind a connection. They would like ...

56. Connection Pooling: please help    coderanch.com

I have question to ask ,I have made small shopping . Now I want to use Connection Pool ,so How many connection should be active in Connection Pool at one time. (suppose consider there are 100 users ,at one time,or less it might be 50,can one connection can serve only one request or more then )

57. regarding connection pool    coderanch.com

hi peter, thanks for ur expert advice..i truly appretiate ur instant response.. peter, does any latest version of Tomcat server has default Connection pool facility ?? as far as i know, Tomcat 4.0, doesnt support Connection pool facility.. if the server handles the connection pool as in Weblogic , its the better option right ??? here my company is sticking on ...

58. connection pool    coderanch.com

60. Questions Regarding Connection Pooling    coderanch.com

61. Connection Pooling    coderanch.com

62. How do close/destroy connection pool?    coderanch.com

63. Connection pooling    coderanch.com

Hi Mike, I had the same question yesterday and the answer I got back was that I don't particularly need to use a database connection pooling package since Tomcat (not sure what you are planning to use) will allow me to setup and JNDI datasource. If you are using an app server they mostly (I think) have the connection pooling facility. ...

64. How to use WAS connection pooling?    coderanch.com

65. Connection Pooling - Urgent    coderanch.com

Hi, Need urgent help on this. My application needs to interact with two different Databases. I am using weblogic 8.1 as my application server and oracle 9i as my DB.i am also using EJB's for DB interactions. With one DB i am doing all the operations(insert,update,delete)through entity beans but the other DB i am using only for "SELECT" purpose through Stateless ...

66. what is connection pooling?    coderanch.com

Connection Pooling is a wayof handling connections to the database. The application server would create a set number of connections to the datasource (i,e the database) and would allow the users to use these connections within their code. Obtaining a connection to a DB is considered to be a costly operation and hence creating a pool at appserver startup is thought ...

67. Connection pooling with weblogic6.1    coderanch.com

68. Open source connection pools    coderanch.com

Is this a java application or a Web App? The reason I ask is because I don't think there is a need for a connection pool in a stand alone application. Each client gets there own connection anyway and the Pool would be supporting 1 person. With a Web App, most App Servers will have their own Connection Pooling libraries. So ...

69. connection pool issues    coderanch.com

With Oracle and other products, teams that I have worked with seem to always encounter this same problem: too many connections, even though the developers think they did everything right to use connection pooling. e.g. XAConntection object via getXAResrouce. I haven't had my hands in that particular code, however. I am concerned that as I go forward with EJB 2.x implementations ...

70. Connection Pool (standalone/server)    coderanch.com

If I have a database installed in a machine which can be accessed by different machines on the network, how can connection pooling be achieved? 1. Is it possible for a ConnectionPool class to pool connections for all machines in the network? Or does each machine have to just manage its own connections and no-one else's? 2. Do I have to ...

71. Connection Pooling help needed    coderanch.com

Greetings. I am trying to get a database connection in Websphere 5.0 (running on Redhat Adv. Server) and my connection times are very, very slow. Below is the code to get the connection: Properties parms = new Properties(); parms.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); // Create the Initial Naming Context Context ctx = new InitialContext(parms); DataSource ds = (DataSource) ctx.lookup("jdbc/customer"); Connection con = ds.getConnection(); Here ...

72. Connection Pooling and JDBC lookup.    coderanch.com

Hi, I am trying to setup a connection pool and its not quite working the intended way. Here's the code which sort of works *********************************************************************** Code that works with an exception *********************************************************************** String poolName = "jdbc/aaa"; Hashtable parms = new Hashtable(); parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); InitialContext ctx = new InitialContext(parms); DataSource dSource = ctx.lookup(poolName); ************************************************************************ I get a datasource but i do see ...

73. Connection Pools won't recycle connections    coderanch.com

Hello, I am experiencing a problem with connection pooling. Our Java app is using Weblogic61SP3 and an Oracle 8.1.7 database, connection via oracle:thin. Each call by the application to our production database, opens up a new connection. Once the db call is done the connection isn't recycled and sent back into the pool, like it should. It's kept alive, and each ...

74. Connection pool    coderanch.com

Hi ranchers! I have made a class that implements the ServletContextListener. In this servlet I make a Connection that I can use in my application. ( I put it in the Context.setAttribute() ). My problem is that when I use this the Connection will be opened the whole time the application is alive. I want to make a Connection pool soo ...

75. connection pooling    coderanch.com

Where did you get that code? They probably provided the code for the ConnectionPool class as well. Connections are expensive to allocate in Java, so it is a common practice to open a few and keep them around in a pool to reuse. If you are using Oracle, a pool is implemented as oracle.jdbc.pool.OracleDataSource. If you aren't, you do have that ...

76. Connection Pooling in JDBC    coderanch.com

77. Invalid connection pool when database is down    coderanch.com

I have a java thread, it will update the database every 15 minutes, only when the thread got started, it creates a connection pool to the database. But our database will be shut down during the weekend, after this, the connection pool contains unuseful connections. I have to restart the thread to recreate the connection pool. Does anybody got experience to ...

78. xa connection & pooled connection    coderanch.com

79. Free Connection Pooling Component    coderanch.com

Hi, I am developing a huge database reading / writing system. I want to use some Connection pooling mechanism. I have my old connection pooling but I feel it is not as good performance when it comes for queueing the requests. Can anybody suggest me free good pooling components from where can I get. thaking you from saloon..^^ regards lm.

80. Connection Pool Usage    coderanch.com

Hi, I am using the Connector/J driver for connecting with MySql. I am using the connection pool to access the connections. Now I am looking for a way to monitor my connection pool. i.e., look at the number of connections in the pool, the number of connections open, etc. also if a connection is frozen or hung for whatever reason. I ...

81. connection pooling    coderanch.com

Hi all Here is my Working Environment: Windows 2000 Professional J2SDK 1.4 Tomcat 4.0.6 mysql server version: 4.1.0-alpha ( on linux server) JDBCdriver mysql-connector-java-3.0.8-stable-bin.jar I am trying to implement connection pooling as described in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/printer/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example After modifying server.xml, web.xml and creating connection class and jsp, I start Tomcat through the short-cut which executes startup.bat file. This pops-up tomcat console with all ...

82. How can I find a right connection pool?    coderanch.com

83. Connection Pooling    coderanch.com

84. problem in web application with connection pooling    coderanch.com

Web Application with Connection Pooling problem Below are software installed in my PC: Windows98 Tomcat v. 4.1.27 J2SE/JDK v. 1.3.1 MySQL Server v. 4.0.17 MySQL Connector/J v. 3.0.10 Below is the content of AUTOEXEC.BAT: rem - By Windows Setup - C:\WINDOWS\COMMAND\MSCDEX /V /D:ATAPI_CD /M:10 set PATH=c:\jdk1.3.1\bin;%PATH% set CLASSPATH=%CLASSPATH%;.;c:\jdk1.3.1\jre\lib\rt.jar;c:\mysql-connector-java\mysql-connector-java\mysql-connector-java-3.0.10-stable-bin.jar;c:\ServletDevel;c:\ServletDevel\database\lib\conn_pool.jar;c:\ServletDevel\jsp;c:\ServletDevel\database set JAVA_HOME=c:\jdk1.3.1 From MySQL Server, I've created the database wordgames with tables (word, ...

85. Problems with connection pooling.    coderanch.com

Hi , I relativly new to this but i am trying to run a program to demonstrate pooling using a jdbc connection to my sql database. Everytime i try to run this program i receive an error "Exception in thread "main" java.lang.NoSuchMethodError: main" The code is as follows.... import java.io.*; import java.sql.*; import java.util.*; import java.lang.*; public class ConnectionPool implements Runnable ...

86. connection pooling problem    coderanch.com

You need to make sure that you are correctly closing the connections and resultsets so that they are able to be performed to the pool. Otherwise you get nasty errors like yours. If you're doing that correctly, you will want to either increase the number of connections in your pool (or set it no limit), or increase the timeout so that ...

87. Database Connection Pooling -Where to download Jakarta components    coderanch.com

I am relativly new to Java.(5-6 months) I am looking to download the following components , can you please advise as to where i might be able to downlaod them from. I tried google , sourceforge and a few others without success. The components i need are Jakarta-Commons Pool 1.0 Jakarta-Commons Collections 2.0 Jakarta-Commons Pool 1.0 Thanks PAT

88. Disadvantages of connection pooling    coderanch.com

What is your opinion? One problem is that database resources are 'system' resources and not 'java' resources. This tends to make them heavier, and also causes issues like resource leakage problems. This is true of connections when not using pooling though. A 'problem' with pooling is that you have to pay for all of these resources at the beginning. Opening and ...

89. About connection pooling    coderanch.com

Does each connection in the pool corresponds to an Oracle user's session? It seems no. I've configured a pool of 50 connections in my datasource in WAS and run my web application which use the above DS to connect to Database but when I open the Oracle Enterprise manager console there's only one session for the user from the WAS machine. ...

90. Problem with connection pooling,unable to establish connection    coderanch.com

Hi, I am new enough to Java, about 9 months. I am trying to run the example of connection pooling of the Tomcat documentation. I am running tomcat version 5 have manged to establish a connection to my sql database using jdbc driver but cannot this example working For anyone who has tomcat installed the example is called "JNDI Datasource HOW-TO" ...

91. How to manage the connections in a pool    coderanch.com

92. Connection pool problem    coderanch.com

93. Connection Pool    coderanch.com

Repost wrong forum sorry -------------------------------------------------------------------------------- I have a question about when to initialize the connection pool currently I am using a class for connection pooling and it is not performing correctly because multiple instances are being created. I am using a mvc approach and only have one servlet into the webApp. Can anyone tell me where I should initialize the connection ...

94. Do you know a good Connection pooling utility    coderanch.com

Hi folks, any knowns a good Connection Pooling utility ? I don't want to use Tomcat Datasource/JNDI setup (somehow it works on my windows platform but not on my RedHat linux, the JDNDI lookup always fails, if someone has this working well on linux, please post your server.xml/web.xml and connection class source). Regards, eRic

95. Connection pooling using Informix.    coderanch.com

Does any body has any info inregards to this error. [5/7/04 8:26:58:210 CDT] 6d4cc485 Helpers W NMSV0605E: A Reference object looked up from the context "domainRoots/UnspecifiedDomainName/legacyRoot" with the name "jdbc/proviso" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows: Reference Factory Class Name: com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory Reference Factory Class Location URLs: Reference Class Name: com.ibm.ejs.cm.portability.PortableDataSource Type: name ...

96. DataTap Connection pool usage?    coderanch.com

I wish to use A DataTap to select a Database name and detail from a Properties file.I want to use a Business Object, DAO, Connection Pool and POJO. I have a Data Tap,BO template,DAO Template,Connection Pool example(From DAO example on this site "I wish to add transaction support."). I need some guidance to how to link these together. This is a ...

97. Connection Pool Implementation ... ?    coderanch.com

Thanks Jeanne Boyarsky, I am already aware of connection pooling and have used it in some projects, but recently in one of the interviews the interviewer asked me how to implement the connection pooling, if I have to write the customized connection pool for some application. So I was more interested in writing a customized connection pool application.

98. Connection Pooling    coderanch.com

99. connection pool manager    coderanch.com

100. Values for connection pool parameters    coderanch.com

Hi all, I want to use a connection pool given in the book "Core Servlets" by Marty Hall. I was wondering if there are guidelines for values to be used for a connection pool. I understand that it might be different values depending upon the application's nature and load but if there are any recommended values for configuring database connection pool ...