Grate Anantha, Thanks.
I already created one Connection Pool Object on the
lines of your Idea but instead of usning Hash table I
am using a vector and array of boolean values. I think
u got it, when some request comes I am giving the
connection object from the vector and I am changing
the corresponding (position) value in the boolean
array. Once the connection objects work is completed I
am just changing the corresponding value of the
boolean array.
My question is when a request comes I am just giving
the reference of the connection pool object from the
vector but not the object it self. So we can also give
the same reference to the different request reight?
Then what is the need of pool ?
Sagar.
--- ananthakrishnan <[EMAIL PROTECTED]> wrote:
> Hi,
> Yes it is possible.
> 1) first try attempting creating a Hashtable with
> connection objects and
>
> associate each connection object with a "Boolean"
> value[True/False].
> This "Key Value pair" will help in identifying
> whether a connection
> object is currently in use or not.
>
> 2) Initially open about say 10 connections and add
> them to ur hashtable.
> Then as and when a request comes retrieve this
> connection object from
> the hashtable and useit.
>
> 3) when the operations are over do not forget to
> return the connection
> object to the pool created [here pool refers to a
> datastructure as
> simple as a hashtable.]
>
> 4) Other than this many connection pooling
> techniques are available at
> the sun's site. The afore mentioned idea is borrowed
> from jason hunters
> technique of implementing connection pooling
> mechanism.
>
> 5) When a hashtable with connection objects are
> possible it must be
> possible defntly to create a "stack of the same" and
> do a push or pop
> operations ..
>
>
> Hope this idea helps
>
> Anantha Krishnan
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html