| Author |
Questions on EJB
|
thomas davis
Ranch Hand
Joined: Feb 01, 2003
Posts: 207
|
|
What is the difference between EJB1.2 and 2.0 versions? What is instance pooling in EJB? What is database pooling in EJB? :roll:
|
 |
Edy Yu
Ranch Hand
Joined: Nov 21, 2000
Posts: 264
|
|
|
I guess you want to same database connection pooling instead of database pooling.
|
<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
|
 |
thomas davis
Ranch Hand
Joined: Feb 01, 2003
Posts: 207
|
|
|
I did not understand your query.
|
 |
Edy Yu
Ranch Hand
Joined: Nov 21, 2000
Posts: 264
|
|
|
Tom, there is nothing called "database pooling"...
|
 |
thomas davis
Ranch Hand
Joined: Feb 01, 2003
Posts: 207
|
|
|
connection pooling and instance pooling in EJB
|
 |
Manish Sharma
Greenhorn
Joined: Apr 11, 2003
Posts: 10
|
|
Hi Connection Pooling :- Creating a connection to the database server is expensive. It is even more expensive if the server is located on another machine. Connection pool contains a number of open database connections, and has open connections between minimum and maximum number that you specify in vendor specific manner. The pool expands and shrinks between minimum and maximum size depending on incremental capacity. You need to give minimum, maximum and incremental sizes as properties to the pool in order to maintain that functionality. You get the connection from the pool instead of getting it directly from the database. For example, if you give properties like min, max and incremental sizes as 3, 10 and 1 then pool is created with size 3 initially and if it reaches its capacity 3 and if a client requests a connection concurrently, it increments its capacity by 1 till it reaches 10 and later on it puts all it's clients in a queue. You need to configure connection pool size in vendor specific manner and you need to to take care of properties like min, max and increment sizes. The maximum number of connections to be opened depend on your application's requirement and the maximum number of open connections your database can support. In EJB deployment descriptor files, you need to configure DataSource reference that uses connection pool. Your EJB application improves performance significantly depending on connection pool size. So configure optimal connection pool to reduce expensive creation and destruction of database connections thus improving performance significantly.
Originally posted by thomas davis: connection pooling and instance pooling in EJB
|
 |
 |
|
|
subject: Questions on EJB
|
|
|