Yap!, if you are creating the new instance of a DbBroker obviously it will be
create new instance for every other servlet( i mean Servlet A and Servlet B). So
have a wrapper over the DbConnection and use a singleton pattern
regards
ravi
Stuart Norton wrote:
> Hi,
>
> This is my first post on the list, so I've finally come out of the woodwork!
>
> I'm using the com.javaexchange.dbConnectionPool class (from
> www.javaexchange.com) to access a database through an ODBC driver. This
> works with one servlet, where I define a new instance of the class in the
> init() of my servlet, but I'm confused about what happens when I use another
> servlet that needs to talk to the same DbConnectionPool class.
>
> The init() code in my second class contains the same code as the first (ie.
> myBroker = new DbConnectionPool(...blah, blah..);), so I'm wondering whether
> it's talking to the other instance from the first servlet, or making a new
> instance.
>
> Can anyone please help me.
>
> Stuart Norton,
> Densitron Technologies plc, UK
> e: [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> 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