connection pool

hiany one can tell me. how to improve and maintain connection pooling in java
[91 byte] By [Java_Jsp_servleta] at [2007-11-27 6:34:22]
# 1
can i define global variable in JSP. and how can i define/declear global variable.give me any example how can i define/declear global variable in jsp.
Java_Jsp_servleta at 2007-7-12 18:00:42 > top of Java-index,Java Essentials,New To Java...
# 2

JSP_dood,

What exactly do you mean by "global variable"... there is no such thing as a "global" anything in java, and therefore a servlet and therefore a JSP page.

If you mean session scoped attributes google "servlet session scope"

[url=http://www.exampledepot.com/egs/javax.servlet/State.html]Saving Data in a Servlet[/url] looks like a good beginners guide to me.

Keith.

corlettka at 2007-7-12 18:00:42 > top of Java-index,Java Essentials,New To Java...
# 3
c3po
corlettka at 2007-7-12 18:00:42 > top of Java-index,Java Essentials,New To Java...
# 4

> hi

>

> any one can tell me. how to improve and maintain

> connection pooling in java

Your app server should provide an admin interface where you can fine-tune the connection pool, for example, by specifying the number of connections in the pool.

Consult your server docs.

karma-9a at 2007-7-12 18:00:43 > top of Java-index,Java Essentials,New To Java...
# 5

> can i define global variable in JSP. and how can i

> define/declear global variable.

> give me any example how can i define/declear global

> variable in jsp.

If by "global", you mean application scope, use the JSP application implicit object ( it's really an instance of ServletContext) to store data in that scope.

On lower-level scope, session scope has already been commented in this thread.

Or maybe you should start by studying the different scopes and their related implicit objects, to determine the one most suited for what you're trying to do.

karma-9a at 2007-7-12 18:00:43 > top of Java-index,Java Essentials,New To Java...
# 6

and u can bound ur pool by define min and max no of connection in ur pool...and so whenever we need a connection object then we have to check is there any object is free if yes then u can provied it otherwise u have to wait until any object will becoze free....

this technique help to mantain a connection poolling concept...

devs_desirea at 2007-7-12 18:00:43 > top of Java-index,Java Essentials,New To Java...