> Hi,
>    I have declared my Connection Object as static and initialising it in
> the init of the servlet.
>
> I am using this for all my database opertaions. Is this safe ? I did not
> see any problem when more than one user is using also.  What problems
> can I foresee ? Can this be a better alternative than Connection pooling
> ?
        [Scheiderer, Stephan]  This may work if there are not many users on
your system, but I read in a servlet book, that this will cause trouble on
many users...
> Can I synchronise connection object when I perform some database updates
        [Scheiderer, Stephan]  You can but this slows down performance...
then better use the SingleThreadModel interface.

        [Scheiderer, Stephan]  Connection pooling is one solution. The other
is to store the connections in the session...
> (ie only the execute statment will be in syncronised tag) so others will
> wait a
> second  and continue to use the connection object or should I put the
> connection object in syncronised tag for all operations.
>
> Please advice me.
>
> Thanks
> Venkatesh
>
> __________________________________________________________________________
> _
> 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

___________________________________________________________________________
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

Reply via email to